Skip to content

Commit

Permalink
deploy: de2203f
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofer-Julian committed Feb 23, 2024
1 parent 1a93863 commit d188b83
Show file tree
Hide file tree
Showing 37 changed files with 265 additions and 265 deletions.
370 changes: 185 additions & 185 deletions build/index.html

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions core/allocation.html
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ <h1 data-number="5"><span class="header-section-number">5</span> Solving the all
<section id="example" class="level2" data-number="5.1">
<h2 data-number="5.1" class="anchored" data-anchor-id="example"><span class="header-section-number">5.1</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="b75298ca" class="cell" data-execution_count="1">
<div id="b7ccfdc9" 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 @@ -648,45 +648,45 @@ <h2 data-number="5.1" class="anchored" data-anchor-id="example"><span class="hea
<span id="cb1-20"><a href="#cb1-20" aria-hidden="true" tabindex="-1"></a><span class="fu">println</span>(p.allocation.allocation_models[<span class="fl">1</span>].problem)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output cell-output-stdout">
<pre><code>Min F_abs_user[User #13] + F_abs_user[User #6] + F_abs_user[User #3] + F_abs_basin[Basin #12] + F_abs_basin[Basin #2] + F_abs_basin[Basin #5]
<pre><code>Min F_abs_user[User #13] + F_abs_user[User #3] + F_abs_user[User #6] + F_abs_basin[Basin #5] + F_abs_basin[Basin #12] + F_abs_basin[Basin #2]
Subject to
flow_conservation[Basin #12] : -F[(TabulatedRatingCurve #7, Basin #12)] + F[(Basin #12, User #13)] + F_basin_in[Basin #12] - F_basin_out[Basin #12] = 0
flow_conservation[Basin #2] : -F[(FlowBoundary #1, Basin #2)] + F[(Basin #2, User #3)] + F[(Basin #2, Basin #5)] - F[(Basin #5, Basin #2)] + F_basin_in[Basin #2] - F_basin_out[Basin #2] = 0
flow_conservation[Basin #5] : F[(Basin #5, User #6)] + F[(Basin #5, TabulatedRatingCurve #7)] - F[(Basin #2, Basin #5)] + F[(Basin #5, Basin #2)] + F_basin_in[Basin #5] - F_basin_out[Basin #5] = 0
flow_conservation[Basin #5] : F[(Basin #5, Basin #2)] - F[(Basin #2, Basin #5)] + F[(Basin #5, User #6)] + F[(Basin #5, TabulatedRatingCurve #7)] + F_basin_in[Basin #5] - F_basin_out[Basin #5] = 0
flow_conservation[Basin #12] : F[(Basin #12, User #13)] - F[(TabulatedRatingCurve #7, Basin #12)] + F_basin_in[Basin #12] - F_basin_out[Basin #12] = 0
flow_conservation[Basin #2] : -F[(Basin #5, Basin #2)] + F[(Basin #2, Basin #5)] - F[(FlowBoundary #1, Basin #2)] + F[(Basin #2, User #3)] + F_basin_in[Basin #2] - F_basin_out[Basin #2] = 0
abs_positive_user[User #13] : -F[(Basin #12, User #13)] + F_abs_user[User #13] ≥ 0
abs_positive_user[User #6] : -F[(Basin #5, User #6)] + F_abs_user[User #6] ≥ -1.5
abs_positive_user[User #3] : -F[(Basin #2, User #3)] + F_abs_user[User #3] ≥ 0
abs_positive_user[User #6] : -F[(Basin #5, User #6)] + F_abs_user[User #6] ≥ -1.5
abs_negative_user[User #13] : F[(Basin #12, User #13)] + F_abs_user[User #13] ≥ 0
abs_negative_user[User #6] : F[(Basin #5, User #6)] + F_abs_user[User #6] ≥ 1.5
abs_negative_user[User #3] : F[(Basin #2, User #3)] + F_abs_user[User #3] ≥ 0
abs_negative_user[User #6] : F[(Basin #5, User #6)] + F_abs_user[User #6] ≥ 1.5
abs_positive_basin[Basin #5] : -F_basin_in[Basin #5] + F_abs_basin[Basin #5] ≥ 0
abs_positive_basin[Basin #12] : -F_basin_in[Basin #12] + F_abs_basin[Basin #12] ≥ 0
abs_positive_basin[Basin #2] : -F_basin_in[Basin #2] + F_abs_basin[Basin #2] ≥ 0
abs_positive_basin[Basin #5] : -F_basin_in[Basin #5] + F_abs_basin[Basin #5] ≥ 0
abs_negative_basin[Basin #5] : F_basin_in[Basin #5] + F_abs_basin[Basin #5] ≥ 0
abs_negative_basin[Basin #12] : F_basin_in[Basin #12] + F_abs_basin[Basin #12] ≥ 0
abs_negative_basin[Basin #2] : F_basin_in[Basin #2] + F_abs_basin[Basin #2] ≥ 0
abs_negative_basin[Basin #5] : F_basin_in[Basin #5] + F_abs_basin[Basin #5] ≥ 0
source[(FlowBoundary #1, Basin #2)] : F[(FlowBoundary #1, Basin #2)] ≤ 1
return_flow[User #13] : F[(User #13, Terminal #10)] ≤ 0
fractional_flow[(TabulatedRatingCurve #7, Basin #12)] : -0.4 F[(Basin #5, TabulatedRatingCurve #7)] + F[(TabulatedRatingCurve #7, Basin #12)] ≤ 0
basin_outflow[Basin #5] : F_basin_out[Basin #5] ≤ 0
basin_outflow[Basin #12] : F_basin_out[Basin #12] ≤ 0
basin_outflow[Basin #2] : F_basin_out[Basin #2] ≤ 0
basin_outflow[Basin #5] : F_basin_out[Basin #5] ≤ 0
F[(FlowBoundary #1, Basin #2)] ≥ 0
F[(Basin #5, Basin #2)] ≥ 0
F[(Basin #2, Basin #5)] ≥ 0
F[(User #13, Terminal #10)] ≥ 0
F[(Basin #5, User #6)] ≥ 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
F[(Basin #12, User #13)] ≥ 0
F[(FlowBoundary #1, Basin #2)] ≥ 0
F[(TabulatedRatingCurve #7, Terminal #10)] ≥ 0
F[(TabulatedRatingCurve #7, Basin #12)] ≥ 0
F[(Basin #2, User #3)] ≥ 0
F[(User #13, Terminal #10)] ≥ 0
F[(Basin #12, User #13)] ≥ 0
F[(Basin #2, Basin #5)] ≥ 0
F[(Basin #5, Basin #2)] ≥ 0
F_basin_in[Basin #5] ≥ 0
F_basin_in[Basin #12] ≥ 0
F_basin_in[Basin #2] ≥ 0
F_basin_in[Basin #5] ≥ 0
F_basin_out[Basin #5] ≥ 0
F_basin_out[Basin #12] ≥ 0
F_basin_out[Basin #2] ≥ 0
F_basin_out[Basin #5] ≥ 0
</code></pre>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion 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="558333d1" class="cell" data-execution_count="1">
<div id="2748c121" 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
24 changes: 12 additions & 12 deletions core/usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ <h2 id="toc-title">On this page</h2>
<ul class="collapse">
<li><a href="#user-time" id="toc-user-time" class="nav-link" data-scroll-target="#user-time"><span class="header-section-number">10.1</span> User / time</a></li>
</ul></li>
<li><a href="#sec-target_level" id="toc-sec-target_level" class="nav-link" data-scroll-target="#sec-target_level"><span class="header-section-number">11</span> TargetLevel</a>
<li><a href="#sec-level_demand" id="toc-sec-level_demand" class="nav-link" data-scroll-target="#sec-level_demand"><span class="header-section-number">11</span> LevelDemand</a>
<ul class="collapse">
<li><a href="#targetlevel-time" id="toc-targetlevel-time" class="nav-link" data-scroll-target="#targetlevel-time"><span class="header-section-number">11.1</span> TargetLevel / time</a></li>
<li><a href="#leveldemand-time" id="toc-leveldemand-time" class="nav-link" data-scroll-target="#leveldemand-time"><span class="header-section-number">11.1</span> LevelDemand / time</a></li>
</ul></li>
<li><a href="#sec-level-boundary" id="toc-sec-level-boundary" class="nav-link" data-scroll-target="#sec-level-boundary"><span class="header-section-number">12</span> LevelBoundary</a>
<ul class="collapse">
Expand Down Expand Up @@ -631,10 +631,10 @@ <h1 data-number="3"><span class="header-section-number">3</span> Node</h1>
<li><code>User / static</code>: demands</li>
<li><code>User / time</code>: dynamic demands</li>
</ul></li>
<li>TargetLevel: Indicates minimum and maximum target level of connected basins for allocation
<li>LevelDemand: Indicates minimum and maximum target level of connected basins for allocation
<ul>
<li><code>TargetLevel / static</code>: static target levels</li>
<li><code>TargetLevel / time</code>: dynamic target levels</li>
<li><code>LevelDemand / static</code>: static target levels</li>
<li><code>LevelDemand / time</code>: dynamic target levels</li>
</ul></li>
<li>Terminal: Water sink without state or properties
<ul>
Expand Down Expand Up @@ -1361,9 +1361,9 @@ <h2 data-number="10.1" class="anchored" data-anchor-id="user-time"><span class="
</table>
</section>
</section>
<section id="sec-target_level" class="level1" data-number="11">
<h1 data-number="11"><span class="header-section-number">11</span> TargetLevel</h1>
<p>An <code>TargetLevel</code> node associates a minimum and a maximum level with connected basins to be used by the allocation algorithm. Below the minimum level the basin has a demand of the supplied priority, above the maximum level the basin acts as a source, used by all nodes with demands in order of priority. The same <code>TargetLevel</code> node can be used for basins in different subnetworks.</p>
<section id="sec-level_demand" class="level1" data-number="11">
<h1 data-number="11"><span class="header-section-number">11</span> LevelDemand</h1>
<p>An <code>LevelDemand</code> node associates a minimum and a maximum level with connected basins to be used by the allocation algorithm. Below the minimum level the basin has a demand of the supplied priority, above the maximum level the basin acts as a source, used by all nodes with demands in order of priority. The same <code>LevelDemand</code> node can be used for basins in different subnetworks.</p>
<table class="table">
<thead>
<tr class="header">
Expand Down Expand Up @@ -1400,9 +1400,9 @@ <h1 data-number="11"><span class="header-section-number">11</span> TargetLevel</
</tr>
</tbody>
</table>
<section id="targetlevel-time" class="level2" data-number="11.1">
<h2 data-number="11.1" class="anchored" data-anchor-id="targetlevel-time"><span class="header-section-number">11.1</span> TargetLevel / time</h2>
<p>This table is the transient form of the <code>TargetLevel</code> table, in which time-dependent minimum and maximum levels can be supplied. Similar to the static version, only a single priority per <code>TargetLevel</code> node can be provided.</p>
<section id="leveldemand-time" class="level2" data-number="11.1">
<h2 data-number="11.1" class="anchored" data-anchor-id="leveldemand-time"><span class="header-section-number">11.1</span> LevelDemand / time</h2>
<p>This table is the transient form of the <code>LevelDemand</code> table, in which time-dependent minimum and maximum levels can be supplied. Similar to the static version, only a single priority per <code>LevelDemand</code> node can be provided.</p>
<table class="table">
<thead>
<tr class="header">
Expand Down Expand Up @@ -2100,7 +2100,7 @@ <h2 data-number="19.4" class="anchored" data-anchor-id="allocation---allocation.
</tr>
</tbody>
</table>
<p>For Basins the values <code>demand</code>, <code>allocated</code> and <code>realized</code> are positive if the Basin level is below the minimum level given by a <code>TargetLevel</code> node. The values are negative if the Basin supplies due to a surplus of water.</p>
<p>For Basins the values <code>demand</code>, <code>allocated</code> and <code>realized</code> are positive if the Basin level is below the minimum level given by a <code>LevelDemand</code> node. The values are negative if the Basin supplies due to a surplus of water.</p>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
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="9b959978" class="cell" data-execution_count="1">
<div id="f0c9dc03" 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="91e2a348" class="cell" data-execution_count="2">
<div id="6601bc2c" 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
Loading

0 comments on commit d188b83

Please sign in to comment.