amici.ode_export.State¶
-
class
amici.ode_export.
State
(identifier, name, init, dt)[source]¶ A State variable defines an entity that evolves with time according to the provided time derivative, abbreviated by x
- Variables
_conservation_law – algebraic formula that allows computation of this state according to a conservation law
_dt – algebraic formula that defines the temporal derivative of this state
-
__init__
(identifier, name, init, dt)[source] Create a new State instance. Extends
ModelQuantity.__init__()
by dt- Parameters
identifier (
sympy.core.symbol.Symbol
) – unique identifier of the statename (
str
) – individual name of the state (does not need to be unique)init (
sympy.core.expr.Expr
) – initial valuedt (
sympy.core.expr.Expr
) – time derivative
Methods Summary
__init__
(identifier, name, init, dt)Create a new State instance.
get_dt
()Gets the time derivative
Gets the set of free symbols in time derivative and initial conditions
get_id
()ModelQuantity identifier
get_name
()ModelQuantity name
get_val
()ModelQuantity value
set_conservation_law
(law)Sets the conservation law of a state.
set_dt
(dt)Sets the time derivative
Methods
-
__init__
(identifier, name, init, dt)[source]¶ Create a new State instance. Extends
ModelQuantity.__init__()
by dt- Parameters
identifier (
sympy.core.symbol.Symbol
) – unique identifier of the statename (
str
) – individual name of the state (does not need to be unique)init (
sympy.core.expr.Expr
) – initial valuedt (
sympy.core.expr.Expr
) – time derivative
-
get_free_symbols
()[source]¶ Gets the set of free symbols in time derivative and initial conditions
- Return type
- Returns
free symbols
-
get_id
()¶ ModelQuantity identifier
- Return type
- Returns
identifier of the ModelQuantity
-
get_val
()¶ ModelQuantity value
- Return type
- Returns
value of the ModelQuantity
-
set_conservation_law
(law)[source]¶ Sets the conservation law of a state. If the a conservation law is set, the respective state will be replaced by an algebraic formula according to the respective conservation law.
- Parameters
law (
sympy.core.expr.Expr
) – linear sum of states that if added to this state remain constant over time- Return type
-
set_dt
(dt)[source]¶ Sets the time derivative
- Parameters
dt (
sympy.core.expr.Expr
) – time derivative- Return type