SDESystem

System Constructors

ModelingToolkit.SDESystemType
struct SDESystem <: ModelingToolkit.AbstractODESystem

A system of stochastic differential equations.

Fields

  • eqs

    The expressions defining the drift term.

  • noiseeqs

    The expressions defining the diffusion term.

  • iv

    Independent variable.

  • states

    Dependent (state) variables.

  • ps

    Parameter variables.

  • pins

  • observed

  • tgrad

    Time-derivative matrix. Note: this field will not be defined until calculate_tgrad is called on the system.

  • jac

    Jacobian matrix. Note: this field will not be defined until calculate_jacobian is called on the system.

  • Wfact

    Wfact matrix. Note: this field will not be defined until generate_factorized_W is called on the system.

  • Wfact_t

    Wfact_t matrix. Note: this field will not be defined until generate_factorized_W is called on the system.

  • name

    Name: the name of the system

  • systems

    Systems: the internal systems

Example

using ModelingToolkit

@parameters t σ ρ β
@variables x(t) y(t) z(t)
@derivatives D'~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]

de = SDESystem(eqs,noiseeqs,t,[x,y,z],[σ,ρ,β])
source

Composition and Accessor Functions

  • sys.eqs or equations(sys): The equations that define the SDE.
  • sys.states or states(sys): The set of states in the SDE.
  • sys.parameters or parameters(sys): The parameters of the SDE.
  • sys.iv or independent_variable(sys): The independent variable of the SDE.

Transformations

Applicable Calculation and Generation Functions

calculate_jacobian
calculate_tgrad
calculate_factorized_W
generate_jacobian
generate_tgrad
generate_factorized_W
jacobian_sparsity

Problem Constructors

DiffEqBase.SDEFunctionType
function DiffEqBase.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.

source
DiffEqBase.SDEProblemType
function DiffEqBase.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.

source