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

Methods Summary

__init__(identifier, name, init, dt)

Create a new State instance.

get_dt()

Gets the time derivative

get_free_symbols()

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

set_val(val)

Set ModelQuantity value

Methods

__init__(identifier, name, init, dt)[source]

Create a new State instance. Extends ModelQuantity.__init__() by dt

Parameters
get_dt()[source]

Gets the time derivative

Return type

sympy.core.expr.Expr

Returns

time derivative

get_free_symbols()[source]

Gets the set of free symbols in time derivative and initial conditions

Return type

typing.Set[sympy.core.symbol.Symbol]

Returns

free symbols

get_id()

ModelQuantity identifier

Return type

sympy.core.symbol.Symbol

Returns

identifier of the ModelQuantity

get_name()

ModelQuantity name

Return type

str

Returns

name of the ModelQuantity

get_val()

ModelQuantity value

Return type

sympy.core.expr.Expr

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

None

set_dt(dt)[source]

Sets the time derivative

Parameters

dt (sympy.core.expr.Expr) – time derivative

Return type

None

set_val(val)

Set ModelQuantity value

Returns

value of the ModelQuantity