Skip to content

Commit

Permalink
build based on 01d964b
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Nov 27, 2024
1 parent 0999285 commit a33f1f2
Show file tree
Hide file tree
Showing 32 changed files with 755 additions and 748 deletions.
2 changes: 1 addition & 1 deletion previews/PR187/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-27T13:05:57","documenter_version":"1.8.0"}}
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-27T14:29:49","documenter_version":"1.8.0"}}
46 changes: 23 additions & 23 deletions previews/PR187/API/index.html

Large diffs are not rendered by default.

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 previews/PR187/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.502523192233235
Line 1 tripped at t=3.1947647115093654
Line 3 tripped at t=3.3380530127462587
Line 2 tripped at t=3.4042696241577888</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="a6250fb5.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="../heterogeneous_system/">« Heterogeneous Systems</a><a class="docs-footer-nextpage" href="../stress_on_truss/">Stress on Truss »</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.8.0 on <span class="colophon-date" title="Wednesday 27 November 2024 13:05">Wednesday 27 November 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Line 2 tripped at t=3.4042696241577888</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="1378455c.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="../heterogeneous_system/">« Heterogeneous Systems</a><a class="docs-footer-nextpage" href="../stress_on_truss/">Stress on Truss »</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.8.0 on <span class="colophon-date" title="Wednesday 27 November 2024 14:29">Wednesday 27 November 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
Edge-Aggregation using SequentialAggregator(+)</code></pre><p>Since this system is a directed one with thus directed edges, the keyword argument <code>coupling</code> is used to set the coupling of the edges to <code>Directed()</code>.</p><h2 id="Parameter-handling"><a class="docs-heading-anchor" href="#Parameter-handling">Parameter handling</a><a id="Parameter-handling-1"></a><a class="docs-heading-anchor-permalink" href="#Parameter-handling" title="Permalink"></a></h2><p>Some of the parameters have been declared with default values. Those default values will be used when creating the <code>NWParameter</code> object. We can use getindex on the parameter objects to set the missing weight values.</p><pre><code class="language-julia hljs">p = NWParameter(fhn_network!)
p.e[1:ne(g_directed), :weight] = edge_weights</code></pre><p>The initial conditions could be created similarly to the parameters as an indexable <code>NWState</code> obejct. Since we chose a random initial condition we initialize the flat array directly:</p><pre><code class="language-julia hljs">x0 = randn(StableRNG(42), dim(fhn_network!)) * 5</code></pre><h2 id="Solving-the-system"><a class="docs-heading-anchor" href="#Solving-the-system">Solving the system</a><a id="Solving-the-system-1"></a><a class="docs-heading-anchor-permalink" href="#Solving-the-system" title="Permalink"></a></h2><p>Now we are ready to create an <code>ODEProblem</code>. Since for some choices of parameters the FitzHugh-Nagumo model is <em>stiff</em> (i.e. numerically unstable), we use a solver with automated stiffness detection. Such a solver switches to a more stable solver only when the solution enters a region of phase space where the problem is numerically unstable. In this case we use <code>Tsit5</code> and switch to <code>TRBDF2</code> when necessary. <code>AutoTsit5</code> is the switching version of the <code>Tsit5</code> algorithm.</p><p>Not that we call <code>pflat</code> on the <code>NWParameter</code> object to get the flat array of parameters.</p><pre><code class="language-julia hljs">tspan = (0.0, 200.0)
prob = ODEProblem(fhn_network!, x0, tspan, pflat(p))
sol = solve(prob, AutoTsit5(TRBDF2()));</code></pre><h2 id="Plotting"><a class="docs-heading-anchor" href="#Plotting">Plotting</a><a id="Plotting-1"></a><a class="docs-heading-anchor-permalink" href="#Plotting" title="Permalink"></a></h2><p>The plot of the excitatory variables shows that they synchronize for this choice of parameters.</p><pre><code class="language-julia hljs">plot(sol; idxs=vidxs(fhn_network!, :, :u), legend=false, ylim=(-5, 5), fmt=:png)</code></pre><img src="5fb21645.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="../getting_started_with_network_dynamics/">« Getting Started</a><a class="docs-footer-nextpage" href="../heterogeneous_system/">Heterogeneous Systems »</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.8.0 on <span class="colophon-date" title="Wednesday 27 November 2024 13:05">Wednesday 27 November 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
sol = solve(prob, AutoTsit5(TRBDF2()));</code></pre><h2 id="Plotting"><a class="docs-heading-anchor" href="#Plotting">Plotting</a><a id="Plotting-1"></a><a class="docs-heading-anchor-permalink" href="#Plotting" title="Permalink"></a></h2><p>The plot of the excitatory variables shows that they synchronize for this choice of parameters.</p><pre><code class="language-julia hljs">plot(sol; idxs=vidxs(fhn_network!, :, :u), legend=false, ylim=(-5, 5), fmt=:png)</code></pre><img src="5cb0671a.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="../getting_started_with_network_dynamics/">« Getting Started</a><a class="docs-footer-nextpage" href="../heterogeneous_system/">Heterogeneous Systems »</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.8.0 on <span class="colophon-date" title="Wednesday 27 November 2024 14:29">Wednesday 27 November 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion previews/PR187/generated/gas_network/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,4 @@
end
axislegend(ax, position=:rb)
_fig
end</code></pre><img src="43f744c5.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="../stress_on_truss/">« Stress on Truss</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.8.0 on <span class="colophon-date" title="Wednesday 27 November 2024 13:05">Wednesday 27 November 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
end</code></pre><img src="43f744c5.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="../stress_on_truss/">« Stress on Truss</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.8.0 on <span class="colophon-date" title="Wednesday 27 November 2024 14:29">Wednesday 27 November 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit a33f1f2

Please sign in to comment.