Skip to content

Commit

Permalink
deploy: b3b57b0
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed Nov 26, 2024
1 parent 8bd147c commit 83da8c8
Show file tree
Hide file tree
Showing 18 changed files with 5,422 additions and 5,422 deletions.
18 changes: 9 additions & 9 deletions concept/allocation.html
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ <h2 data-number="4.3" class="anchored" data-anchor-id="the-optimization-constrai
<section id="example" class="level2" data-number="4.4">
<h2 data-number="4.4" class="anchored" data-anchor-id="example"><span class="header-section-number">4.4</span> Example</h2>
<p>The following is an example of an optimization problem for the example shown <a href="../guide/examples.html#model-with-allocation-user-demand">here</a>:</p>
<div id="3638e2b0" class="cell" data-execution_count="1">
<div id="79f1263b" class="cell" data-execution_count="1">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">using</span> <span class="bu">Ribasim</span></span>
Expand All @@ -604,18 +604,18 @@ <h2 data-number="4.4" class="anchored" data-anchor-id="example"><span class="hea
F[(Basin #2, LinearResistance #4)] ≥ 0
F[(LinearResistance #4, Basin #2)] ≥ 0
F[(Basin #5, UserDemand #6)] ≥ 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
F[(LinearResistance #4, Basin #5)] ≥ 0
F[(Basin #5, LinearResistance #4)] ≥ 0
F[(Basin #2, UserDemand #3)] ≥ 0
F[(TabulatedRatingCurve #7, Terminal #8)] ≥ 0
F[(UserDemand #3, Basin #2)] ≥ 0
F[(UserDemand #6, Basin #5)] ≥ 0
flow_conservation[Basin #2] : F[(FlowBoundary #1, Basin #2)] - F[(Basin #2, LinearResistance #4)] + F[(LinearResistance #4, Basin #2)] - F[(Basin #2, UserDemand #3)] + F[(UserDemand #3, Basin #2)] = 0
flow_conservation[TabulatedRatingCurve #7] : F[(Basin #5, TabulatedRatingCurve #7)] - F[(TabulatedRatingCurve #7, Terminal #8)] = 0
flow_conservation[Terminal #8] : F[(TabulatedRatingCurve #7, Terminal #8)] = 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
F[(Basin #2, UserDemand #3)] ≥ 0
F[(LinearResistance #4, Basin #5)] ≥ 0
F[(Basin #5, LinearResistance #4)] ≥ 0
flow_conservation[LinearResistance #4] : F[(Basin #2, LinearResistance #4)] - F[(LinearResistance #4, Basin #2)] - F[(LinearResistance #4, Basin #5)] + F[(Basin #5, LinearResistance #4)] = 0
flow_conservation[Basin #5] : -F[(Basin #5, UserDemand #6)] - F[(Basin #5, TabulatedRatingCurve #7)] + F[(LinearResistance #4, Basin #5)] - F[(Basin #5, LinearResistance #4)] + F[(UserDemand #6, Basin #5)] = 0
flow_conservation[Terminal #8] : F[(TabulatedRatingCurve #7, Terminal #8)] = 0
flow_conservation[Basin #2] : F[(FlowBoundary #1, Basin #2)] - F[(Basin #2, LinearResistance #4)] + F[(LinearResistance #4, Basin #2)] + F[(UserDemand #3, Basin #2)] - F[(Basin #2, UserDemand #3)] = 0
flow_conservation[Basin #5] : -F[(Basin #5, UserDemand #6)] + F[(UserDemand #6, Basin #5)] - F[(Basin #5, TabulatedRatingCurve #7)] + F[(LinearResistance #4, Basin #5)] - F[(Basin #5, LinearResistance #4)] = 0
flow_conservation[TabulatedRatingCurve #7] : -F[(TabulatedRatingCurve #7, Terminal #8)] + F[(Basin #5, TabulatedRatingCurve #7)] = 0
source[(FlowBoundary #1, Basin #2)] : F[(FlowBoundary #1, Basin #2)] ≤ 0
source_user[UserDemand #6] : F[(UserDemand #6, Basin #5)] ≤ 0
source_user[UserDemand #3] : F[(UserDemand #3, Basin #2)] ≤ 0
Expand Down
16 changes: 8 additions & 8 deletions dev/callstacks.html
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ <h2 id="toc-title">On this page</h2>

<section id="call-stacks" class="level1" data-number="1">
<h1 data-number="1"><span class="header-section-number">1</span> Call stacks</h1>
<div id="892d4b4e" class="cell" data-execution_count="1">
<div id="536c3d80" class="cell" data-execution_count="1">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">using</span> <span class="bu">CairoMakie</span></span>
Expand All @@ -319,7 +319,7 @@ <h1 data-number="1"><span class="header-section-number">1</span> Call stacks</h1
<section id="parameter-initialization" class="level2" data-number="1.1">
<h2 data-number="1.1" class="anchored" data-anchor-id="parameter-initialization"><span class="header-section-number">1.1</span> Parameter initialization</h2>
<p>Parameter initialization is the process of reading the parameter values from the input files and storing them in data structures for easy access in the core. Most notable here is the convergence of many paths to <code>load_structvector</code> and <code>parse_static_and_time</code>, as these are needed for parameter initialization for most node types.</p>
<div id="5272315a" class="cell" data-execution_count="2">
<div id="41e372ab" class="cell" data-execution_count="2">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb2"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="im">using</span> <span class="bu">SQLite</span></span>
Expand Down Expand Up @@ -353,7 +353,7 @@ <h2 data-number="1.1" class="anchored" data-anchor-id="parameter-initialization"
<section id="water_balance" class="level2" data-number="1.2">
<h2 data-number="1.2" class="anchored" data-anchor-id="water_balance"><span class="header-section-number">1.2</span> <code>water_balance!</code></h2>
<p><code>water_balance!</code> is the right hand side function of the system of ODEs that is solved by the Ribasim core (for more details see <a href="../concept/equations.html#formal-model-description">here</a>). The various <code>formulate_flow!</code> methods are for flow rates as determined by different node types.</p>
<div id="e4e479d4" class="cell" data-execution_count="3">
<div id="43d80518" class="cell" data-execution_count="3">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb3"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="im">using</span> <span class="bu">OrdinaryDiffEqCore</span>: get_du</span>
Expand All @@ -375,7 +375,7 @@ <h2 data-number="1.2" class="anchored" data-anchor-id="water_balance"><span clas
<section id="allocation-initialization" class="level2" data-number="1.3">
<h2 data-number="1.3" class="anchored" data-anchor-id="allocation-initialization"><span class="header-section-number">1.3</span> Allocation initialization</h2>
<p>In this part of the code the data structures for allocation are set up. Most endpoints in <code>allocation_init.jl</code> set up data structures as defined in <a href="https://jump.dev/JuMP.jl/stable/">JuMP.jl</a>.</p>
<div id="c3824c30" class="cell" data-execution_count="4">
<div id="3ed343af" class="cell" data-execution_count="4">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb4"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>toml_path <span class="op">=</span> <span class="fu">normpath</span>(</span>
Expand All @@ -401,7 +401,7 @@ <h2 data-number="1.3" class="anchored" data-anchor-id="allocation-initialization
<section id="allocation-run" class="level2" data-number="1.4">
<h2 data-number="1.4" class="anchored" data-anchor-id="allocation-run"><span class="header-section-number">1.4</span> Allocation run</h2>
<p>Running the allocation algorithm consists of running the optimization itself (which is handled in <code>JuMP.jl</code>), and all Ribasim functions around it are used for communicating data between the optimization problem and the physical layer, as well as gathering output data. Fore more information on the allocation algorithm see <a href="../concept/allocation.html">here</a>.</p>
<div id="65669b7a" class="cell" data-execution_count="5">
<div id="78f12216" class="cell" data-execution_count="5">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb5"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>model <span class="op">=</span> Ribasim.<span class="fu">Model</span>(toml_path)</span>
Expand All @@ -420,7 +420,7 @@ <h2 data-number="1.4" class="anchored" data-anchor-id="allocation-run"><span cla
<section id="discrete-control" class="level2" data-number="1.5">
<h2 data-number="1.5" class="anchored" data-anchor-id="discrete-control"><span class="header-section-number">1.5</span> Discrete control</h2>
<p>Discrete control works by a <a href="https://docs.sciml.ai/DiffEqCallbacks/stable/output_saving/#DiffEqCallbacks.FunctionCallingCallback"><code>FunctionCallingCallback</code></a>, changing parameters when a change in control state is detected (see also <a href="../reference/node/discrete-control.html">here</a>).</p>
<div id="b94b450c" class="cell" data-execution_count="6">
<div id="b7fd1f8c" class="cell" data-execution_count="6">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb6"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>toml_path <span class="op">=</span></span>
Expand All @@ -444,7 +444,7 @@ <h2 data-number="1.5" class="anchored" data-anchor-id="discrete-control"><span c
<section id="writing-output" class="level2" data-number="1.6">
<h2 data-number="1.6" class="anchored" data-anchor-id="writing-output"><span class="header-section-number">1.6</span> Writing output</h2>
<p>Writing output (currently) happens only after the full simulation is finished. For more information on the different output tables see <a href="../reference/usage.html#results">here</a>.</p>
<div id="b076c20d" class="cell" data-execution_count="7">
<div id="85d4acb6" class="cell" data-execution_count="7">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb7"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>toml_path <span class="op">=</span> <span class="fu">normpath</span>(<span class="pp">@__DIR__</span>, <span class="st">"../../generated_testmodels/basic_transient/ribasim.toml"</span>)</span>
Expand Down Expand Up @@ -899,7 +899,7 @@ <h2 data-number="1.6" class="anchored" data-anchor-id="writing-output"><span cla
</div>
</nav>
</div> <!-- /content -->
<script>var lightboxQuarto = GLightbox({"openEffect":"zoom","selector":".lightbox","closeEffect":"zoom","descPosition":"bottom","loop":false});
<script>var lightboxQuarto = GLightbox({"loop":false,"closeEffect":"zoom","selector":".lightbox","descPosition":"bottom","openEffect":"zoom"});
(function() {
let previousOnload = window.onload;
window.onload = () => {
Expand Down
Loading

0 comments on commit 83da8c8

Please sign in to comment.