Skip to content

Commit

Permalink
deploy: db46d1e
Browse files Browse the repository at this point in the history
  • Loading branch information
visr committed Mar 28, 2024
1 parent b656f77 commit 7f30bac
Show file tree
Hide file tree
Showing 9 changed files with 250 additions and 229 deletions.
398 changes: 197 additions & 201 deletions build/index.html

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions core/allocation.html
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,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="../python/examples.html#model-with-allocation">here</a>:</p>
<div id="9a644023" class="cell" data-execution_count="1">
<div id="2081b65f" 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 @@ -575,9 +575,9 @@ <h2 data-number="4.4" class="anchored" data-anchor-id="example"><span class="hea
<div class="cell-output cell-output-stdout">
<pre><code>Min F_abs_user_demand[UserDemand #13] + F_abs_user_demand[UserDemand #6] + F_abs_user_demand[UserDemand #3]
Subject to
flow_conservation_basin[Basin #12] : -F[(TabulatedRatingCurve #7, Basin #12)] + F[(Basin #12, UserDemand #13)] = 0
flow_conservation_basin[Basin #5] : F[(Basin #5, TabulatedRatingCurve #7)] + F[(Basin #5, UserDemand #6)] - F[(UserDemand #6, Basin #5)] + F[(Basin #5, Basin #2)] - F[(Basin #2, Basin #5)] = 0
flow_conservation_basin[Basin #2] : -F[(UserDemand #3, Basin #2)] - F[(FlowBoundary #1, Basin #2)] - F[(Basin #5, Basin #2)] + F[(Basin #2, Basin #5)] + F[(Basin #2, UserDemand #3)] = 0
flow_conservation_basin[Basin #12] : F[(Basin #12, UserDemand #13)] - F[(TabulatedRatingCurve #7, Basin #12)] = 0
flow_conservation_basin[Basin #2] : F[(Basin #2, Basin #5)] - F[(UserDemand #3, Basin #2)] - F[(FlowBoundary #1, Basin #2)] - F[(Basin #5, Basin #2)] + F[(Basin #2, UserDemand #3)] = 0
flow_conservation_basin[Basin #5] : -F[(Basin #2, Basin #5)] - F[(UserDemand #6, Basin #5)] + F[(Basin #5, Basin #2)] + F[(Basin #5, UserDemand #6)] + F[(Basin #5, TabulatedRatingCurve #7)] = 0
abs_positive_user_demand[UserDemand #13] : -F[(Basin #12, UserDemand #13)] + F_abs_user_demand[UserDemand #13] ≥ 0
abs_positive_user_demand[UserDemand #6] : -F[(Basin #5, UserDemand #6)] + F_abs_user_demand[UserDemand #6] ≥ 0
abs_positive_user_demand[UserDemand #3] : -F[(Basin #2, UserDemand #3)] + F_abs_user_demand[UserDemand #3] ≥ -1.5
Expand All @@ -588,19 +588,19 @@ <h2 data-number="4.4" class="anchored" data-anchor-id="example"><span class="hea
F[(UserDemand #13, Terminal #10)] ≤ 0
F[(UserDemand #6, Basin #5)] ≤ 0
F[(UserDemand #3, Basin #2)] ≤ 0
fractional_flow[(TabulatedRatingCurve #7, Basin #12)] : -0.4 F[(Basin #5, TabulatedRatingCurve #7)] + F[(TabulatedRatingCurve #7, Basin #12)] ≤ 0
F[(UserDemand #13, Terminal #10)] ≥ 0
F[(TabulatedRatingCurve #7, Terminal #10)] ≥ 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
F[(Basin #5, UserDemand #6)] ≥ 0
F[(UserDemand #6, Basin #5)] ≥ 0
fractional_flow[(TabulatedRatingCurve #7, Basin #12)] : F[(TabulatedRatingCurve #7, Basin #12)] - 0.4 F[(Basin #5, TabulatedRatingCurve #7)] ≤ 0
F[(Basin #2, Basin #5)] ≥ 0
F[(UserDemand #3, Basin #2)] ≥ 0
F[(FlowBoundary #1, Basin #2)] ≥ 0
F[(UserDemand #6, Basin #5)] ≥ 0
F[(Basin #12, UserDemand #13)] ≥ 0
F[(Basin #5, Basin #2)] ≥ 0
F[(Basin #5, UserDemand #6)] ≥ 0
F[(TabulatedRatingCurve #7, Terminal #10)] ≥ 0
F[(TabulatedRatingCurve #7, Basin #12)] ≥ 0
F[(Basin #12, UserDemand #13)] ≥ 0
F[(Basin #2, Basin #5)] ≥ 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
F[(Basin #2, UserDemand #3)] ≥ 0
F[(UserDemand #13, Terminal #10)] ≥ 0
</code></pre>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions core/equations.html
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ <h2 data-number="2.1" class="anchored" data-anchor-id="sec-reduction_factor"><sp
\end{cases}
\end{align}\]</span></p>
<p>Here <span class="math inline">\(p &gt; 0\)</span> is the threshold value which determines the interval <span class="math inline">\([0,p]\)</span> of the smooth transition between <span class="math inline">\(0\)</span> and <span class="math inline">\(1\)</span>, see the plot below.</p>
<div id="556f3613" class="cell" data-execution_count="1">
<div id="f9223d80" class="cell" data-execution_count="1">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> numpy <span class="im">as</span> np</span>
Expand Down Expand Up @@ -475,7 +475,7 @@ <h2 data-number="2.1" class="anchored" data-anchor-id="sec-reduction_factor"><sp

invalid escape sequence '\p'

/tmp/ipykernel_5122/665069857.py:31: SyntaxWarning:
/tmp/ipykernel_5013/665069857.py:31: SyntaxWarning:

invalid escape sequence '\p'
</code></pre>
Expand Down
33 changes: 29 additions & 4 deletions core/usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -2075,7 +2075,12 @@ <h2 data-number="19.1" class="anchored" data-anchor-id="pidcontrol-time"><span c
<h1 data-number="20"><span class="header-section-number">20</span> Results</h1>
<section id="basin---basin.arrow" class="level2" data-number="20.1">
<h2 data-number="20.1" class="anchored" data-anchor-id="basin---basin.arrow"><span class="header-section-number">20.1</span> Basin - <code>basin.arrow</code></h2>
<p>The basin table contains results of the storage and level of each basin at every solver timestep. The initial condition is also written to the file.</p>
<p>The basin table contains:</p>
<ul>
<li>results of the storage and level of each basin, which are instantaneous values;</li>
<li>results of the vertical fluxes on each basin, which are mean values over the <code>saveat</code> intervals. In the time column the start of the period is indicated. This means that for the final time in the table the mean vertical fluxes are not computed, and thus are <code>missing</code>.</li>
</ul>
<p>The initial condition is also written to the file.</p>
<table class="table">
<thead>
<tr class="header">
Expand Down Expand Up @@ -2105,13 +2110,33 @@ <h2 data-number="20.1" class="anchored" data-anchor-id="basin---basin.arrow"><sp
<td>Float64</td>
<td><span class="math inline">\(m\)</span></td>
</tr>
<tr class="odd">
<td>precipitation</td>
<td>Union{Float64, Missing}</td>
<td><span class="math inline">\(m^3 s^{-1}\)</span></td>
</tr>
<tr class="even">
<td>evaporation</td>
<td>Union{Float64, Missing}</td>
<td><span class="math inline">\(m^3 s^{-1}\)</span></td>
</tr>
<tr class="odd">
<td>drainage</td>
<td>Union{Float64, Missing}</td>
<td><span class="math inline">\(m^3 s^{-1}\)</span></td>
</tr>
<tr class="even">
<td>infiltration</td>
<td>Union{Float64, Missing}</td>
<td><span class="math inline">\(m^3 s^{-1}\)</span></td>
</tr>
</tbody>
</table>
<p>The table is sorted by time, and per time it is sorted by <code>node_id</code>.</p>
</section>
<section id="flow---flow.arrow" class="level2" data-number="20.2">
<h2 data-number="20.2" class="anchored" data-anchor-id="flow---flow.arrow"><span class="header-section-number">20.2</span> Flow - <code>flow.arrow</code></h2>
<p>The flow table contains calculated mean flows for every flow edge in the model. In the time column the start of the period is indicated.</p>
<p>The flow table contains calculated mean flows over the <code>saveat</code> intervals for every flow edge in the model. In the time column the start of the period is indicated.</p>
<table class="table">
<thead>
<tr class="header">
Expand All @@ -2128,7 +2153,7 @@ <h2 data-number="20.2" class="anchored" data-anchor-id="flow---flow.arrow"><span
</tr>
<tr class="even">
<td>edge_id</td>
<td>Union{Int32, Missing}</td>
<td>Int32</td>
<td>-</td>
</tr>
<tr class="odd">
Expand Down Expand Up @@ -2158,7 +2183,7 @@ <h2 data-number="20.2" class="anchored" data-anchor-id="flow---flow.arrow"><span
</tr>
</tbody>
</table>
<p>The table is sorted by time, and per time the same <code>edge_id</code> order is used, though not sorted. The <code>edge_id</code> value is the same as the <code>fid</code> written to the Edge table, and can be used to directly look up the Edge geometry. Flows that are added to the model at a node, have a missing <code>edge_id</code>, and identical <code>from_node_id</code> and <code>to_node_id</code>. Flows out of the model always have a negative sign, and additions a positive sign.</p>
<p>The table is sorted by time, and per time the same <code>edge_id</code> order is used, though not sorted. The <code>edge_id</code> value is the same as the <code>fid</code> written to the Edge table, and can be used to directly look up the Edge geometry. Flows from the “from” to the “to” node have a positive sign, and if the flow is reversed it will be negative.</p>
</section>
<section id="discretecontrol---control.arrow" class="level2" data-number="20.3">
<h2 data-number="20.3" class="anchored" data-anchor-id="discretecontrol---control.arrow"><span class="header-section-number">20.3</span> DiscreteControl - <code>control.arrow</code></h2>
Expand Down
4 changes: 2 additions & 2 deletions core/validation.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ <h1 class="title">Validation</h1>
<section id="connectivity" class="level1" data-number="1">
<h1 data-number="1"><span class="header-section-number">1</span> Connectivity</h1>
<p>In the table below, each column shows which node types are allowed to be downstream (or ‘down-control’) of the node type at the top of the column.</p>
<div id="87566987" class="cell" data-execution_count="1">
<div id="da56efbd" 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 Down Expand Up @@ -546,7 +546,7 @@ <h1 data-number="1"><span class="header-section-number">1</span> Connectivity</h
<section id="neighbor-amounts" class="level1" data-number="2">
<h1 data-number="2"><span class="header-section-number">2</span> Neighbor amounts</h1>
<p>The table below shows for each node type between which bounds the amount of in- and outneighbors must be, for both flow and control edges.</p>
<div id="e394c92f" class="cell" data-execution_count="2">
<div id="fed3f8ce" 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>flow_in_min <span class="op">=</span> <span class="fu">Vector</span><span class="dt">{String}</span>()</span>
Expand Down
2 changes: 1 addition & 1 deletion python/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ <h1 data-number="1"><span class="header-section-number">1</span> Basic model wit
<div class="cell-output cell-output-display">
<div>
<figure class="figure">
<p><img src="examples_files/figure-html/cell-20-output-1.png" width="727" height="561" class="figure-img"></p>
<p><img src="examples_files/figure-html/cell-20-output-1.png" width="727" height="444" class="figure-img"></p>
</figure>
</div>
</div>
Expand Down
Binary file modified python/examples_files/figure-html/cell-20-output-1.png
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 python/test-models.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ <h1 class="title">Test models</h1>


<p>Ribasim developers use the following models in their testbench and in order to test new features.</p>
<div id="520e3f0f" class="cell" data-execution_count="1">
<div id="06c15a09" class="cell" data-execution_count="1">
<details class="code-fold">
<summary>Code</summary>
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> ribasim_testmodels</span>
Expand Down
12 changes: 6 additions & 6 deletions search.json

Large diffs are not rendered by default.

0 comments on commit 7f30bac

Please sign in to comment.