amici.ode_model.Event
- class amici.ode_model.Event(identifier, name, value, state_update, event_observable, initial_value=True)[source]
An Event defines either a SBML event or a root of the argument of a Heaviside function. The Heaviside functions will be tracked via the vector
h
during simulation and are needed to inform the ODE solver about a discontinuity in either the right-hand side or the states themselves, causing a reinitialization of the solver.- __init__(identifier, name, value, state_update, event_observable, initial_value=True)[source]
Create a new Event instance.
- Parameters
identifier (
sympy.core.symbol.Symbol
) – unique identifier of the Eventname (
str
) – individual name of the Event (does not need to be unique)value (
sympy.core.expr.Expr
) – formula for the root / trigger functionstate_update (
typing.Optional
[sympy.core.expr.Expr
]) – formula for the bolus function (None for Heaviside functions, zero vector for events without bolus)event_observable (
typing.Optional
[sympy.core.expr.Expr
]) – formula a potential observable linked to the event (None for Heaviside functions, empty events without observable)initial_value (
typing.Optional
[bool
]) – initial boolean value of the trigger function at t0. If set to False, events may trigger att==t0
, otherwise not.
Methods Summary
__init__
(identifier, name, value, ...[, ...])Create a new Event instance.
get_id
()ModelQuantity identifier
Return the initial value for the root function.
get_name
()ModelQuantity name
get_val
()ModelQuantity value
set_val
(val)Set ModelQuantity value
Methods
- __init__(identifier, name, value, state_update, event_observable, initial_value=True)[source]
Create a new Event instance.
- Parameters
identifier (
sympy.core.symbol.Symbol
) – unique identifier of the Eventname (
str
) – individual name of the Event (does not need to be unique)value (
sympy.core.expr.Expr
) – formula for the root / trigger functionstate_update (
typing.Optional
[sympy.core.expr.Expr
]) – formula for the bolus function (None for Heaviside functions, zero vector for events without bolus)event_observable (
typing.Optional
[sympy.core.expr.Expr
]) – formula a potential observable linked to the event (None for Heaviside functions, empty events without observable)initial_value (
typing.Optional
[bool
]) – initial boolean value of the trigger function at t0. If set to False, events may trigger att==t0
, otherwise not.
- get_id()
ModelQuantity identifier
- Return type
- Returns
identifier of the ModelQuantity
- get_initial_value()[source]
Return the initial value for the root function.
- Return type
- Returns
initial value formula
- get_val()
ModelQuantity value
- Return type
- Returns
value of the ModelQuantity
- set_val(val)
Set ModelQuantity value
- Returns
value of the ModelQuantity