JumpSystem
System Constructors
ModelingToolkit.JumpSystem
— Typestruct JumpSystem{U<:RecursiveArrayTools.ArrayPartition} <: AbstractTimeDependentSystem
A system of jump processes.
Fields
eqs
The jumps of the system. Allowable types are
ConstantRateJump
,VariableRateJump
,MassActionJump
.
iv
The independent variable, usually time.
states
The dependent variables, representing the state of the system. Must not contain the independent variable.
ps
The parameters of the system. Must not contain the independent variable.
var_to_name
Array variables.
observed
name
The name of the system. . These are required to have unique names.
systems
The internal systems.
defaults
defaults: The default values to use when initial conditions and/or parameters are not supplied in
ODEProblem
.
connector_type
type: type of the system
discrete_events
discreteevents: A
Vector{SymbolicDiscreteCallback}
that models events. Symbolic analog toSciMLBase.DiscreteCallback
that exectues an affect when a given condition is true at the end of an integration step. *Note, one must make sure to call `resetaggregated_jumps!(integrator)` if using a custom affect function that changes any state value or parameter.*
Example
using ModelingToolkit
@parameters β γ
@variables t S(t) I(t) R(t)
rate₁ = β*S*I
affect₁ = [S ~ S - 1, I ~ I + 1]
rate₂ = γ*I
affect₂ = [I ~ I - 1, R ~ R + 1]
j₁ = ConstantRateJump(rate₁,affect₁)
j₂ = ConstantRateJump(rate₂,affect₂)
j₃ = MassActionJump(2*β+γ, [R => 1], [S => 1, R => -1])
@named js = JumpSystem([j₁,j₂,j₃], t, [S,I,R], [β,γ])
Composition and Accessor Functions
get_eqs(sys)
orequations(sys)
: The equations that define the jump system.get_states(sys)
orstates(sys)
: The set of states in the jump system.get_ps(sys)
orparameters(sys)
: The parameters of the jump system.get_iv(sys)
: The independent variable of the jump system.
Transformations
ModelingToolkit.structural_simplify
— Functionstructural_simplify(sys)
structural_simplify(sys, io; simplify, kwargs...)
Structurally simplify algebraic equations in a system and compute the topological sort of the observed equations. When simplify=true
, the simplify
function will be applied during the tearing process. It also takes kwargs allow_symbolic=false
and allow_parameter=true
which limits the coefficient types during tearing.
Analyses
Problem Constructors
Missing docstring for SciMLBase.DiscreteProblem(sys::JumpSystem,args...)
. Check Documenter's build log for details.
Missing docstring for JumpProcesses.JumpProblem(sys::JumpSystem,args...)
. Check Documenter's build log for details.