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.

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

Time-scale separation and model-reduction orchestration.

Reduce

The class can be used to compute the various possible reduced models for the System object and then find out the best reduced model choice using doi : https://doi.org/10.1101/640276

ReduceUtils

For various utility methods developed on top of Reduce class and other utility functions

solve_timescale_separation

Solve time-scale separation directly from a System.

sympy_variables_exist

Check whether variables appear in symbolic ODE expressions.

sympy_solve_and_substitute

A function to solve using sympy and substitute into the equation

sympy_get_steady_state_solutions

Solve for each collapsed_variable from corresponding collapsed_dynamics one by one.

create_system

Create a base System from symbolic model data.

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

Raise until abundance-based reduction is 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 ODE with sympy

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

A function that takes in an SBML file and returns x,f,P,params_values.

Convenience constructors for solvers and reducible systems.

get_ODE

For the given timepoints, create an ODE class object for this System object.

solve_ODE_SSM

For the given timepoints, returns the full solution (states, sensitivity coefficients, outputs)

get_SSM

For the given timepoints, create an SSM class object for this System object.

get_reducible

Create a Reduce object from a base 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.

reduce_utils

Create a ReduceUtils object from a Reduce object.

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