autoreduce.solvers.ssm.SSM
- class SSM(x, f, params=None, C=None, g=None, h=None, u=None, params_values=None, x_init=None, timepoints=None)[source]
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). Both the Jacobian matrix and the Z matrix are estimated using 4th order central difference as given in the paper.
- __init__(x, f, params=None, C=None, g=None, h=None, u=None, params_values=None, x_init=None, timepoints=None)[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_J(x, **kwargs)Compute the Jacobian J = df/dx at a timepoint k.
compute_SSM([normalize])Returns the sensitivity coefficients S_j for each parameter p_j.
compute_Zj(x, j, **kwargs)Compute Z_j, i.e. df/dp_j at a particular timepoint k for the parameter p_j.
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_system()Return the sensitivity solver state as a base
System.normalize_SSM()Returns normalized sensitivity coefficients.
pretty_print()Print a concise model summary with LaTeX system equations.
sensitivity_to_parameter(x, j, **kwargs)Calculates the response of each derivative (defined by ode) to changes in a single parameter (the jth one) at point x.
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
solve_extended_ode([ode, params, t_min, ...])Augments an ODE system (as a scipy-integratable function) into an ODE representing the original ODE plus sensitivities, then solves them all.
write_sbml(filename, **kwargs)Writes an SBML file for AutoReduce System model.