Skip to content

Commit

Permalink
build based on 269f555
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Sep 13, 2024
1 parent 9bf45ff commit d58b24b
Show file tree
Hide file tree
Showing 24 changed files with 708 additions and 712 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-04T10:41:24","documenter_version":"1.7.0"}}
{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-13T09:01:13","documenter_version":"1.7.0"}}
22 changes: 11 additions & 11 deletions dev/Library/index.html

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions dev/generated/StochasticSystem/4de1a734.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 0 additions & 48 deletions dev/generated/StochasticSystem/6ffcf21f.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions dev/generated/StochasticSystem/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
ode_prob = ODEProblem(nd, uflat(u0), (0.0, 500.0), pflat(p))
ode_sol = solve(ode_prob, Tsit5())

plot(ode_sol; idxs=vidxs(nd,:,:ω), ylims=(-1.0, 1.0), ylabel=L&quot;\omega&quot;, legend=false, fmt=:png)</code></pre><img src="1f4d6a2a.svg" alt="Example block output"/><p>We see that this is in fact a fixpoint solution. We will later use this as an initial condition for the numerical integration of the SDE system.</p><h2 id="Adding-a-Stochastic-Layer"><a class="docs-heading-anchor" href="#Adding-a-Stochastic-Layer">Adding a Stochastic Layer</a><a id="Adding-a-Stochastic-Layer-1"></a><a class="docs-heading-anchor-permalink" href="#Adding-a-Stochastic-Layer" title="Permalink"></a></h2><p>For adding the stochastic part of the dynamics we have to define a second graph layer. In our example, the fluctuations at different nodes are independent of each other. Therefore, we define a second graph with the same number of vertices but without any edges.</p><pre><code class="language-julia hljs">h = SimpleGraph(4, 0)</code></pre><p>The dynamics at the nodes has to have the same dimension as in the deterministic case. In our example we only have fluctuations in the second variable.</p><pre><code class="language-julia hljs">function fluctuation!(dx, x, edges, p, t)
plot(ode_sol; idxs=vidxs(nd,:,:ω), ylims=(-1.0, 1.0), ylabel=L&quot;\omega&quot;, legend=false, fmt=:png)</code></pre><img src="c86650e9.svg" alt="Example block output"/><p>We see that this is in fact a fixpoint solution. We will later use this as an initial condition for the numerical integration of the SDE system.</p><h2 id="Adding-a-Stochastic-Layer"><a class="docs-heading-anchor" href="#Adding-a-Stochastic-Layer">Adding a Stochastic Layer</a><a id="Adding-a-Stochastic-Layer-1"></a><a class="docs-heading-anchor-permalink" href="#Adding-a-Stochastic-Layer" title="Permalink"></a></h2><p>For adding the stochastic part of the dynamics we have to define a second graph layer. In our example, the fluctuations at different nodes are independent of each other. Therefore, we define a second graph with the same number of vertices but without any edges.</p><pre><code class="language-julia hljs">h = SimpleGraph(4, 0)</code></pre><p>The dynamics at the nodes has to have the same dimension as in the deterministic case. In our example we only have fluctuations in the second variable.</p><pre><code class="language-julia hljs">function fluctuation!(dx, x, edges, p, t)
dx[1] = 0.0
dx[2] = 0.05
end</code></pre><p>Now we can construct the dynamics of the second layer by using <code>network_dynamics()</code>. Since the graph structure of the stochastic layer has no edges we can take the edge function of the deterministic case as a placeholder.</p><pre><code class="language-julia hljs">fluctuation_vertex = ODEVertex(fluctuation!; dim=2)
nd_noise = Network(h, fluctuation_vertex, NetworkDynamics.EdgeFunction[])</code></pre><h2 id="Simulating-the-SDE"><a class="docs-heading-anchor" href="#Simulating-the-SDE">Simulating the SDE</a><a id="Simulating-the-SDE-1"></a><a class="docs-heading-anchor-permalink" href="#Simulating-the-SDE" title="Permalink"></a></h2><p>Finally, we can create an <code>SDEProblem</code> and solve it with <code>DifferentialEquations</code>.</p><pre><code class="language-julia hljs">sde_prob = SDEProblem(nd, nd_noise, uflat(u0), (0.0, 500.0), pflat(p))
sde_sol = solve(sde_prob, SOSRA())
plot(sde_sol; idxs=vidxs(nd,:,:ω), ylims=(-1.0, 1.0), ylabel=L&quot;\omega&quot;, legend=false, fmt=:png)</code></pre><img src="6ffcf21f.svg" alt="Example block output"/><p>More details on SDE problems, e.g. how to include correlations or how to define an <code>EnsembleProblem</code>, can be found in the <a href="https://diffeq.sciml.ai/stable/types/sde_types/">documentation</a> of <code>DifferentialEquations</code>.</p><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../heterogeneous_system/">« Heterogeneous systems</a><a class="docs-footer-nextpage" href="../cascading_failure/">Cascading failure »</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Wednesday 4 September 2024 10:41">Wednesday 4 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
plot(sde_sol; idxs=vidxs(nd,:,:ω), ylims=(-1.0, 1.0), ylabel=L&quot;\omega&quot;, legend=false, fmt=:png)</code></pre><img src="4de1a734.svg" alt="Example block output"/><p>More details on SDE problems, e.g. how to include correlations or how to define an <code>EnsembleProblem</code>, can be found in the <a href="https://diffeq.sciml.ai/stable/types/sde_types/">documentation</a> of <code>DifferentialEquations</code>.</p><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../heterogeneous_system/">« Heterogeneous systems</a><a class="docs-footer-nextpage" href="../cascading_failure/">Cascading failure »</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Friday 13 September 2024 09:01">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
62 changes: 0 additions & 62 deletions dev/generated/cascading_failure/0dbf998c.svg

This file was deleted.

62 changes: 62 additions & 0 deletions dev/generated/cascading_failure/de95be3a.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dev/generated/cascading_failure/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@
Line 4 tripped at t=2.5025231922343427
Line 1 tripped at t=3.1947647115091087
Line 3 tripped at t=3.3380530127480017
Line 2 tripped at t=3.4042696241611816</code></pre><p>Through the magic of symbolic indexing we can plot the power flows on all lines:</p><pre><code class="language-julia hljs">plot(sol; idxs=eidxs(sol,:,:P))</code></pre><img src="0dbf998c.svg" alt="Example block output"/><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../StochasticSystem/">« Stochastic differential equations</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Wednesday 4 September 2024 10:40">Wednesday 4 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Line 2 tripped at t=3.4042696241611816</code></pre><p>Through the magic of symbolic indexing we can plot the power flows on all lines:</p><pre><code class="language-julia hljs">plot(sol; idxs=eidxs(sol,:,:P))</code></pre><img src="de95be3a.svg" alt="Example block output"/><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../StochasticSystem/">« Stochastic differential equations</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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Friday 13 September 2024 09:00">Friday 13 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit d58b24b

Please sign in to comment.