autoreduce.system.system.System

class System(x, f, params=None, C=None, g=None, h=None, u=None, params_values=None, x_init=None, input_values=None, **kwargs)[source]

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

__init__(x, f, params=None, C=None, g=None, h=None, u=None, params_values=None, x_init=None, input_values=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.

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

pretty_print()

Print a concise model summary with LaTeX system equations.

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

write_sbml(filename, **kwargs)

Writes an SBML file for AutoReduce System model.