Skip to main content

AutoReduce: An Automated Model Reduction Toolbox

AutoReduce banner

Python toolbox to obtain reduced model expressions using time-scale separation, conservation laws, sensitivity analysis, and projection-based interfaces to established reduction libraries.

Build Lint codecov PyPI version Documentation Status

Overview

AutoReduce is a Python package for automated model reduction of nonlinear dynamical systems. It provides tools for:

  • Automated model reduction using QSSA (Quasi-Steady State Approximation)
  • Conservation-law based reductions
  • Local sensitivity analysis
  • SBML import/export through python-libsbml
  • Integration with BioCRNPyler for synthetic biology models
  • Optional python-control and PyDMD interfaces

See the bioRxiv paper and International Journal of Robust and Nonlinear Control paper for the model-reduction background.

Quick Start

import numpy as np
from sympy import symbols

from autoreduce import System, solve_timescale_separation

S, C, P, k1, k2, k3, E_total = symbols("S C P k1 k2 k3 E_total")

E = E_total - C
x = [S, C, P]
f = [
    -k1 * E * S + k2 * C,
    k1 * E * S - (k2 + k3) * C,
    k3 * C,
]

system = System(
    x,
    f,
    params_dict={k1: 1.0, k2: 0.5, k3: 0.25, E_total: 1.0},
    x_init=[10.0, 0.0, 0.0],
    C=np.array([[1, 0, 0], [0, 0, 1]]),
)

reduced_system, collapsed_system = solve_timescale_separation(
    system,
    [S, P],
    fast_states=[C],
)

params_dict can be used to set, get, and update parameters:

system.set_param(k1, 2.0)
system.get_param(k1)
system.set_param_dict({k2: 1.0, k3: 0.1})

For more examples, check out the documentation.

Installation

Supported Python versions are 3.9 - 3.13.

Install the latest version of AutoReduce:

pip install autoreduce

Install with all optional dependencies:

pip install autoreduce[all]

Install optional integrations explicitly:

pip install "autoreduce[bio]"
pip install "autoreduce[control]"
pip install "autoreduce[dmd]"

For development installation:

git clone https://github.com/ayush9pandey/autoreduce.git
cd autoreduce
pip install -e ".[dev]"

Documentation

Full documentation is available at autoreduce.readthedocs.io.

Contributing

We welcome contributions. Developer notes and release instructions are in the documentation.

Contact

For questions, feedback, or suggestions, please contact:

License

Released under the BSD 3-Clause License (see LICENSE)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autoreduce-0.9.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autoreduce-0.9-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file autoreduce-0.9.tar.gz.

File metadata

  • Download URL: autoreduce-0.9.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for autoreduce-0.9.tar.gz
Algorithm Hash digest
SHA256 443989746fe540c0ff04dc34a422dfd2be7ee10ad497b7ee60ac14c675170c81
MD5 63a8559de72f4b2e84b5e87b97018a59
BLAKE2b-256 c6154da46532a4ece0d3d726cd6d3d380efcf50f108ddebdcf504883f01946df

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoreduce-0.9.tar.gz:

Publisher: pypi-deploy.yml on ctsd-lab/AutoReduce

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file autoreduce-0.9-py3-none-any.whl.

File metadata

  • Download URL: autoreduce-0.9-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for autoreduce-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d3005d8eb77d6dab6828f783921742fc50a6d38e4b3bf4b8b55e2e0f92e8123c
MD5 1c6e3577763ce4831e0cc567e840cca4
BLAKE2b-256 67ae4578d6ab61a666554d23c6ca5354867c6756beadae8e426fa5235da97169

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoreduce-0.9-py3-none-any.whl:

Publisher: pypi-deploy.yml on ctsd-lab/AutoReduce

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.9 This release

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

3 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page