autoreduce.reductions.timescale.Reduce

class Reduce(x, f, params=None, C=None, g=None, h=None, u=None, params_values=None, x_init=None, input_values=None, timepoints_ode=None, timepoints_ssm=None, error_tol=None, nstates_tol=None, nstates_tol_min=None, **kwargs)[source]

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

__init__(x, f, params=None, C=None, g=None, h=None, u=None, params_values=None, x_init=None, input_values=None, timepoints_ode=None, timepoints_ssm=None, error_tol=None, nstates_tol=None, nstates_tol_min=None, **kwargs)[source]

The general system dynamics : x_dot = f(x, P) + g(x, P)u, y = h(x,P) Use the utility function ode_to_sympy to write these.

x : (Symbolic) state variable vector

fThe system model dynamics.

Written symbolically with symbols x = [x_0, x_1, …] for states and P = [P_0, P_1, …] for parameters.

params(Symbolic) parameters used to

define f, g, h. None if no symbolic parameters.

gThe actuator / input dynamics.

None by default if the system is autonomous.

CThe output matrix for y = Cx,

size of C must be #outputs times #states. If None, the argument h is expected. Cannot set C and h both.

hThe output description y = h(x, P)

where x are states and P are parameters.

params_values : Values for model parameters

u : List of inputs

x_init : Model initial conditions

Methods

__init__(x, f[, params, C, g, h, u, ...])

The general system dynamics : x_dot = f(x, P) + g(x, P)u, y = h(x,P) Use the utility function ode_to_sympy to write these.

compute_reduced_model()

Dispatch to the reduction workflow matching the system structure.

create_C_hat(x_hat)

Returns C_hat matrix for the reduced system given the x_hat (reduced system state vector) and using the C matrix for the full system (if any)

evaluate(f, x, P[, u])

Evaluate the given symbolic function (f) that is part of the System at the values given by x for self.x and P for self.params

generate_sbml_model([show_warnings])

Creates an new SBML model and populates with the species and their ODE in the System object :param show_warnings: bool, to display warnings :param kwargs: extra keywords pass onto create_sbml_model() :return: tuple: (document,model) SBML objects

get_T(attempt)

Construct transformation matrices for retained and collapsed states.

get_all_combinations()

Combinatorially create sets of all states that can be reduced in self.all_reductions.

get_conservation_laws([...])

Find conserved species sets using the conservation module.

get_error_metric(reduced_sys)

Returns the error defined as the 2-norm of y - y_hat.

get_error_metric_with_input(reduced_sys)

Returns the error defined as the 2-norm of y - y_hat.

get_invariant_manifold(reduced_sys)

Evaluate collapsed-state expressions along reduced trajectories.

get_output_states()

Return state symbols that appear in the system output.

get_robustness_metric(reduced_sys, **kwargs)

Compute robustness metrics comparing full and reduced systems.

get_robustness_metric_with_input(reduced_sys)

Return the robustness metric for systems with inputs.

get_solutions()

Return cached full-model ODE, SSM-time ODE, and SSM objects.

get_system()

Return the current reduction object as a base System.

pretty_print()

Print a concise model summary with LaTeX system equations.

reduce_general()

Return the placeholder result set for the general reduction path.

reduce_simple(**kwargs)

Compute candidate reductions for autonomous systems.

reduce_with_input()

Compute candidate reductions for systems with explicit inputs.

set_conservation_laws(conservation_laws, ...)

Apply conservation laws using the conservation module.

set_dynamics([f, g, h, C, u, params])

Set either f, g, h, or C to the System object or parameter values using P.

set_ic_from_params(x_init, ic_param, ic_index)

Set System initial conditions using parameter values

set_parameters([params_values, x_init])

Set model parameters and initial conditions

setup_conservation_laws(total_quantities, ...)

Create conservation-law expressions from conserved species sets.

solve_approximations()

Run abundance-based approximations from the abundance module.

solve_conservation_laws([conservation_laws, ...])

Apply conservation laws using the conservation module.

solve_timescale_separation(slow_states[, ...])

This function solves the time-scale separation problem for the System object passed through.

solve_timescale_separation_with_input(...)

Solve time-scale separation for systems with explicit inputs.

write_sbml(filename, **kwargs)

Writes an SBML file for AutoReduce System model.