The AutoReduce Library

This chapter documents the public modules, classes, and functions that make up AutoReduce.

Systems

Core symbolic representation of nonlinear dynamical systems.

System

Class that stores the system model in this form: x_dot = f(x, theta), y = Cx.

Conversion from python-control input/output systems.

from_nonlinear_io_system

Create an AutoReduce System from a NonlinearIOSystem.

Conversion from PyDMD-style linear operators.

from_linear_operator

Create a System from a linear DMD operator matrix.

from_dmd_model

Create a System from a fitted PyDMD model.

Solvers

Numerical solvers for ordinary differential equation systems.

ODE

To solve the Model using scipy.odeint

Local sensitivity analysis solvers.

SSM

Class that computes local sensitivity analysis coefficients for the given Model using a numerical approximation method discussed in doi: https://doi.org/10.1016/0021-9991(76)90007-3 Uses numerical method to find sensitivity analysis matrix (SSM).

Reductions

Core reduction objects and shared reduction utilities.

Reduce

Working system used to build and compare reduced models.

ReduceUtils

Utility methods for reduction result objects.

get_error_metric

Compute the full-vs-reduced output error from systems.

get_robustness_metric

Compute robustness metrics from systems.

create_system

Create a base System from symbolic model data.

Time-scale separation reduction methods.

solve_timescale_separation

Solve a time-scale separation reduction for a system.

explore_all_QSS_models

Explore candidate QSS reductions for an autonomous system.

reduce_with_input

Compute candidate QSS reductions for systems with explicit inputs.

Symbolic helper functions for reduction algorithms.

sympy_variables_exist

Check whether variables appear in symbolic ODE expressions.

sympy_solve_and_substitute

Solve collapsed-state equations and substitute into ODEs.

sympy_get_steady_state_solutions

Solve each collapsed variable from its steady-state equation.

Conservation-law reduction methods.

find_conserved_sets

Find conserved species sets by summing ODE terms.

setup_conservation_laws

Create conservation-law expressions from conserved species sets.

apply_conservation_laws

Apply conservation laws to a system in place.

solve_conservation_laws

Find and apply conservation laws to a System.

Abundance-based model-reduction methods.

solve_approximations

Not implemented.

Projection-based reduced models using PyDMD.

DMDReduction

Fitted PyDMD model and the data used to construct it.

fit_dmd

Fit a dynamic mode decomposition model to state snapshots.

fit_dmdc

Fit a dynamic mode decomposition with control model.

Utilities

Model import and symbolic conversion utilities.

load_ode_model

Directly load an ODE skeleton with SymPy symbols.

ode_to_sympy

Returns Sympy object for the given ODE function

sympy_to_sbml

Return an SBML document for a SymPy-backed model.

load_sbml

Load an SBML file as a System object.

load_sbml(filename, outputs=None, rename_species=None, **kwargs) accepts an optional outputs argument naming one species or a list of species to preserve as linear outputs in the returned System. Output names must exactly match SBML species identifiers. If an output cannot be matched, load_sbml raises a ValueError listing the available species instead of failing with an internal lookup error.

The optional rename_species argument maps long SBML species identifiers to shorter SymPy symbol names for subsequent AutoReduce analysis.

Convenience functions for AutoReduce solvers.

get_ODE

Create an ODE solver for a system.

solve_ODE_SSM

Return state, output, and local sensitivity solutions.

get_SSM

Create an SSM solver for a system.

solve_ode

Solve a system over the given timepoints.

solve_ssm

Compute the local sensitivity matrix for a system.

solve_sensitivity

Solve the coupled state and local sensitivity equations.

get_ode_solutions

Solve a system over time and return transposed state trajectories.

SBML model construction utilities.

create_sbml_model

Creates an SBML Level 3 Version 2 model with some fixed standard settings.

add_species

Add species to SBML model

add_reaction

Add reaction to given model

add_parameters

Adds global parameters to the SBML Model