SDESystem
System Constructors
ModelingToolkit.SDESystem — Typestruct SDESystem <: ModelingToolkit.AbstractODESystemA system of stochastic differential equations.
Fields
tag: tag: a tag for the system. If two systems have the same tag, then they are structurally identical.
eqs: The expressions defining the drift term.noiseeqs: The expressions defining the diffusion term.iv: Independent variable.states: Dependent (state) variables. Must not contain the independent variable.ps: Parameter variables. Must not contain the independent variable.tspan: Time span.var_to_name: Array variables.ctrls: Control parameters (some subset ofps).observed: Observed states.tgrad: Time-derivative matrix. Note: this field will not be defined untilcalculate_tgradis called on the system.
jac: Jacobian matrix. Note: this field will not be defined untilcalculate_jacobianis called on the system.
ctrl_jac: Control Jacobian matrix. Note: this field will not be defined untilcalculate_control_jacobianis called on the system.
Wfact:Wfactmatrix. Note: this field will not be defined untilgenerate_factorized_Wis called on the system.
Wfact_t:Wfact_tmatrix. Note: this field will not be defined untilgenerate_factorized_Wis called on the system.
name: Name: the name of the system
systems: Systems: the internal systems. These are required to have unique names.
defaults: defaults: The default values to use when initial conditions and/or parameters are not supplied inODEProblem.
connector_type: type: type of the system
continuous_events: continuous_events: AVector{SymbolicContinuousCallback}that model events. The integrator will use root finding to guarantee that it steps at each zero crossing.
discrete_events: discrete_events: AVector{SymbolicDiscreteCallback}that models events. Symbolic analog toSciMLBase.DiscreteCallbackthat executes an affect when a given condition is true at the end of an integration step.
metadata: metadata: metadata for the system, to be used by downstream packages.
gui_metadata: gui_metadata: metadata for MTK GUI.
complete: complete: if a modelsysis complete, thensys.xno longer performs namespacing.
Example
using ModelingToolkit
@parameters σ ρ β
@variables t x(t) y(t) z(t)
D = Differential(t)
eqs = [D(x) ~ σ*(y-x),
D(y) ~ x*(ρ-z)-y,
D(z) ~ x*y - β*z]
noiseeqs = [0.1*x,
0.1*y,
0.1*z]
@named de = SDESystem(eqs,noiseeqs,t,[x,y,z],[σ,ρ,β]; tspan = (0, 1000.0))To convert an ODESystem to an SDESystem directly:
ode = ODESystem(eqs,t,[x,y,z],[σ,ρ,β])
sde = SDESystem(ode, noiseeqs)Composition and Accessor Functions
get_eqs(sys)orequations(sys): The equations that define the SDE.get_states(sys)orstates(sys): The set of states in the SDE.get_ps(sys)orparameters(sys): The parameters of the SDE.get_iv(sys): The independent variable of the SDE.
Transformations
Missing docstring for structural_simplify. Check Documenter's build log for details.
Missing docstring for alias_elimination. Check Documenter's build log for details.
Missing docstring for Girsanov_transform. Check Documenter's build log for details.
Analyses
Applicable Calculation and Generation Functions
calculate_jacobian
calculate_tgrad
calculate_factorized_W
generate_jacobian
generate_tgrad
generate_factorized_W
jacobian_sparsityProblem Constructors
SciMLBase.SDEFunction — MethodDiffEqBase.SDEFunction{iip}(sys::SDESystem, dvs = sys.states, ps = sys.ps;
version = nothing, tgrad = false, sparse = false,
jac = false, Wfact = false, kwargs...) where {iip}Create an SDEFunction from the SDESystem. The arguments dvs and ps are used to set the order of the dependent variable and parameter vectors, respectively.
SciMLBase.SDEProblem — MethodDiffEqBase.SDEProblem{iip}(sys::SDESystem, u0map, tspan, p = parammap;
version = nothing, tgrad = false,
jac = false, Wfact = false,
checkbounds = false, sparse = false,
sparsenoise = sparse,
skipzeros = true, fillzeros = true,
linenumbers = true, parallel = SerialForm(),
kwargs...)Generates an SDEProblem from an SDESystem and allows for automatically symbolically calculating numerical enhancements.
Expression Constructors
ModelingToolkit.SDEFunctionExpr — TypeDiffEqBase.SDEFunctionExpr{iip}(sys::AbstractODESystem, dvs = states(sys),
ps = parameters(sys);
version = nothing, tgrad = false,
jac = false, Wfact = false,
skipzeros = true, fillzeros = true,
sparse = false,
kwargs...) where {iip}Create a Julia expression for an SDEFunction from the SDESystem. The arguments dvs and ps are used to set the order of the dependent variable and parameter vectors, respectively.
ModelingToolkit.SDEProblemExpr — TypeDiffEqBase.SDEProblemExpr{iip}(sys::AbstractODESystem, u0map, tspan,
parammap = DiffEqBase.NullParameters();
version = nothing, tgrad = false,
jac = false, Wfact = false,
checkbounds = false, sparse = false,
linenumbers = true, parallel = SerialForm(),
kwargs...) where {iip}Generates a Julia expression for constructing an ODEProblem from an ODESystem and allows for automatically symbolically calculating numerical enhancements.