-
-
Notifications
You must be signed in to change notification settings - Fork 214
/
Copy pathindex.html
31 lines (27 loc) · 16 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>SDESystem · ModelingToolkit.jl</title><script data-outdated-warner src="../../assets/warner.js"></script><link rel="canonical" href="https://mtk.sciml.ai/stable/systems/SDESystem/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.039/juliamono-regular.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.png" alt="ModelingToolkit.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../../">ModelingToolkit.jl</a></span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Symbolic Modeling Tutorials</span><ul><li><a class="tocitem" href="../../tutorials/ode_modeling/">Composing Ordinary Differential Equations</a></li><li><a class="tocitem" href="../../tutorials/acausal_components/">Acausal Component-Based Modeling the RC Circuit</a></li><li><a class="tocitem" href="../../tutorials/higher_order/">Automatic Transformation of Nth Order ODEs to 1st Order ODEs</a></li><li><a class="tocitem" href="../../tutorials/tearing_parallelism/">Exposing More Parallelism By Tearing Algebraic Equations in ODESystems</a></li><li><a class="tocitem" href="../../tutorials/nonlinear/">Modeling Nonlinear Systems</a></li><li><a class="tocitem" href="../../tutorials/optimization/">Modeling Optimization Problems</a></li><li><a class="tocitem" href="../../tutorials/stochastic_diffeq/">Modeling with Stochasticity</a></li><li><a class="tocitem" href="../../tutorials/nonlinear_optimal_control/">Nonlinear Optimal Control</a></li></ul></li><li><span class="tocitem">ModelingToolkitize Tutorials</span><ul><li><a class="tocitem" href="../../mtkitize_tutorials/modelingtoolkitize/">Automatically Accelerating ODEProblem Code</a></li><li><a class="tocitem" href="../../mtkitize_tutorials/modelingtoolkitize_index_reduction/">Automated Index Reduction of DAEs</a></li></ul></li><li><span class="tocitem">Basics</span><ul><li><a class="tocitem" href="../../basics/AbstractSystem/">The AbstractSystem Interface</a></li><li><a class="tocitem" href="../../basics/ContextualVariables/">Contextual Variable Types</a></li><li><a class="tocitem" href="../../basics/Composition/">Composing Models and Building Reusable Components</a></li><li><a class="tocitem" href="../../basics/Validation/">Model Validation and Units</a></li><li><a class="tocitem" href="../../basics/DependencyGraphs/">Dependency Graphs</a></li><li><a class="tocitem" href="../../basics/FAQ/">Frequently Asked Questions</a></li></ul></li><li><span class="tocitem">System Types</span><ul><li><a class="tocitem" href="../ODESystem/">ODESystem</a></li><li class="is-active"><a class="tocitem" href>SDESystem</a><ul class="internal"><li><a class="tocitem" href="#System-Constructors"><span>System Constructors</span></a></li><li><a class="tocitem" href="#Composition-and-Accessor-Functions"><span>Composition and Accessor Functions</span></a></li><li><a class="tocitem" href="#Transformations"><span>Transformations</span></a></li><li><a class="tocitem" href="#Analyses"><span>Analyses</span></a></li><li><a class="tocitem" href="#Applicable-Calculation-and-Generation-Functions"><span>Applicable Calculation and Generation Functions</span></a></li><li><a class="tocitem" href="#Problem-Constructors"><span>Problem Constructors</span></a></li></ul></li><li><a class="tocitem" href="../JumpSystem/">JumpSystem</a></li><li><a class="tocitem" href="../NonlinearSystem/">NonlinearSystem</a></li><li><a class="tocitem" href="../OptimizationSystem/">OptimizationSystem</a></li><li><a class="tocitem" href="../ControlSystem/">ControlSystem</a></li><li><a class="tocitem" href="../ReactionSystem/">ReactionSystem</a></li><li><a class="tocitem" href="../PDESystem/">PDESystem</a></li></ul></li><li><a class="tocitem" href="../../comparison/">Comparison of ModelingToolkit vs Equation-Based Modeling Languages</a></li><li><a class="tocitem" href="../../internals/">Internal Details</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">System Types</a></li><li class="is-active"><a href>SDESystem</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>SDESystem</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/SciML/ModelingToolkit.jl/blob/master/docs/src/systems/SDESystem.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="SDESystem"><a class="docs-heading-anchor" href="#SDESystem">SDESystem</a><a id="SDESystem-1"></a><a class="docs-heading-anchor-permalink" href="#SDESystem" title="Permalink"></a></h1><h2 id="System-Constructors"><a class="docs-heading-anchor" href="#System-Constructors">System Constructors</a><a id="System-Constructors-1"></a><a class="docs-heading-anchor-permalink" href="#System-Constructors" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="ModelingToolkit.SDESystem" href="#ModelingToolkit.SDESystem"><code>ModelingToolkit.SDESystem</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct SDESystem <: ModelingToolkit.AbstractODESystem</code></pre><p>A system of stochastic differential equations.</p><p><strong>Fields</strong></p><ul><li><p><code>eqs</code></p><p>The expressions defining the drift term.</p></li><li><p><code>noiseeqs</code></p><p>The expressions defining the diffusion term.</p></li><li><p><code>iv</code></p><p>Independent variable.</p></li><li><p><code>states</code></p><p>Dependent (state) variables. Must not contain the independent variable.</p></li><li><p><code>ps</code></p><p>Parameter variables. Must not contain the independent variable.</p></li><li><p><code>var_to_name</code></p><p>Array variables.</p></li><li><p><code>ctrls</code></p><p>Control parameters (some subset of <code>ps</code>).</p></li><li><p><code>observed</code></p><p>Observed states.</p></li><li><p><code>tgrad</code></p><p>Time-derivative matrix. Note: this field will not be defined until <a href="../../basics/AbstractSystem/#ModelingToolkit.calculate_tgrad"><code>calculate_tgrad</code></a> is called on the system.</p></li></ul><ul><li><p><code>jac</code></p><p>Jacobian matrix. Note: this field will not be defined until <a href="../../basics/AbstractSystem/#ModelingToolkit.calculate_jacobian"><code>calculate_jacobian</code></a> is called on the system.</p></li></ul><ul><li><p><code>ctrl_jac</code></p><p>Control Jacobian matrix. Note: this field will not be defined until <a href="systems/@ref"><code>calculate_control_jacobian</code></a> is called on the system.</p></li></ul><ul><li><p><code>Wfact</code></p><p><code>Wfact</code> matrix. Note: this field will not be defined until <a href="../../basics/AbstractSystem/#ModelingToolkit.generate_factorized_W"><code>generate_factorized_W</code></a> is called on the system.</p></li></ul><ul><li><p><code>Wfact_t</code></p><p><code>Wfact_t</code> matrix. Note: this field will not be defined until <a href="../../basics/AbstractSystem/#ModelingToolkit.generate_factorized_W"><code>generate_factorized_W</code></a> is called on the system.</p></li></ul><ul><li><p><code>name</code></p><p>Name: the name of the system</p></li></ul><ul><li><p><code>systems</code></p><p>Systems: the internal systems. These are required to have unique names.</p></li></ul><ul><li><p><code>defaults</code></p><p>defaults: The default values to use when initial conditions and/or parameters are not supplied in <code>ODEProblem</code>.</p></li></ul><ul><li><p><code>connection_type</code></p><p>type: type of the system</p></li></ul><p><strong>Example</strong></p><pre><code class="language-julia hljs">using ModelingToolkit
@parameters t σ ρ β
@variables 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]
de = SDESystem(eqs,noiseeqs,t,[x,y,z],[σ,ρ,β])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/ModelingToolkit.jl/blob/b5a9867920ec172676627d6fc8a46d8d0bf5e38a/src/systems/diffeqs/sdesystem.jl#L1">source</a></section></article><h2 id="Composition-and-Accessor-Functions"><a class="docs-heading-anchor" href="#Composition-and-Accessor-Functions">Composition and Accessor Functions</a><a id="Composition-and-Accessor-Functions-1"></a><a class="docs-heading-anchor-permalink" href="#Composition-and-Accessor-Functions" title="Permalink"></a></h2><ul><li><code>get_eqs(sys)</code> or <code>equations(sys)</code>: The equations that define the SDE.</li><li><code>get_states(sys)</code> or <code>states(sys)</code>: The set of states in the SDE.</li><li><code>get_ps(sys)</code> or <code>parameters(sys)</code>: The parameters of the SDE.</li><li><code>independent_variable(sys)</code>: The independent variable of the SDE.</li></ul><h2 id="Transformations"><a class="docs-heading-anchor" href="#Transformations">Transformations</a><a id="Transformations-1"></a><a class="docs-heading-anchor-permalink" href="#Transformations" title="Permalink"></a></h2><div class="admonition is-warning"><header class="admonition-header">Missing docstring.</header><div class="admonition-body"><p>Missing docstring for <code>structural_simplify</code>. Check Documenter's build log for details.</p></div></div><div class="admonition is-warning"><header class="admonition-header">Missing docstring.</header><div class="admonition-body"><p>Missing docstring for <code>alias_elimination</code>. Check Documenter's build log for details.</p></div></div><h2 id="Analyses"><a class="docs-heading-anchor" href="#Analyses">Analyses</a><a id="Analyses-1"></a><a class="docs-heading-anchor-permalink" href="#Analyses" title="Permalink"></a></h2><h2 id="Applicable-Calculation-and-Generation-Functions"><a class="docs-heading-anchor" href="#Applicable-Calculation-and-Generation-Functions">Applicable Calculation and Generation Functions</a><a id="Applicable-Calculation-and-Generation-Functions-1"></a><a class="docs-heading-anchor-permalink" href="#Applicable-Calculation-and-Generation-Functions" title="Permalink"></a></h2><pre><code class="language-julia hljs">calculate_jacobian
calculate_tgrad
calculate_factorized_W
generate_jacobian
generate_tgrad
generate_factorized_W
jacobian_sparsity</code></pre><h2 id="Problem-Constructors"><a class="docs-heading-anchor" href="#Problem-Constructors">Problem Constructors</a><a id="Problem-Constructors-1"></a><a class="docs-heading-anchor-permalink" href="#Problem-Constructors" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="SciMLBase.SDEFunction" href="#SciMLBase.SDEFunction"><code>SciMLBase.SDEFunction</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">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}</code></pre><p>Create an <code>SDEFunction</code> from the <a href="#ModelingToolkit.SDESystem"><code>SDESystem</code></a>. The arguments <code>dvs</code> and <code>ps</code> are used to set the order of the dependent variable and parameter vectors, respectively.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/ModelingToolkit.jl/blob/b5a9867920ec172676627d6fc8a46d8d0bf5e38a/src/systems/diffeqs/sdesystem.jl#L179-L189">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SciMLBase.SDEProblem" href="#SciMLBase.SDEProblem"><code>SciMLBase.SDEProblem</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">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...)</code></pre><p>Generates an SDEProblem from an SDESystem and allows for automatically symbolically calculating numerical enhancements.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/ModelingToolkit.jl/blob/b5a9867920ec172676627d6fc8a46d8d0bf5e38a/src/systems/diffeqs/sdesystem.jl#L333-L347">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../ODESystem/">« ODESystem</a><a class="docs-footer-nextpage" href="../JumpSystem/">JumpSystem »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.4 on <span class="colophon-date" title="Tuesday 20 July 2021 18:59">Tuesday 20 July 2021</span>. Using Julia version 1.6.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>