Skip to content

Commit

Permalink
deploy: f5bfb50
Browse files Browse the repository at this point in the history
  • Loading branch information
visr committed Sep 26, 2024
1 parent 13ddde8 commit bb74a98
Show file tree
Hide file tree
Showing 71 changed files with 815 additions and 889 deletions.
26 changes: 13 additions & 13 deletions concept/allocation.html
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,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="aadeb2c3" class="cell" data-execution_count="1">
<div id="21a36341" 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 @@ -600,27 +600,27 @@ <h2 data-number="4.4" class="anchored" data-anchor-id="example"><span class="hea
<span id="cb1-17"><a href="#cb1-17" 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[(Basin #2, UserDemand #3)]² + F[(Basin #5, UserDemand #6)]²
<pre><code>Min F[(Basin #5, UserDemand #6)]² + F[(Basin #2, UserDemand #3)]²
Subject to
flow_conservation[TabulatedRatingCurve #7] : -F[(TabulatedRatingCurve #7, Terminal #8)] + F[(Basin #5, TabulatedRatingCurve #7)] = 0
flow_conservation[Terminal #8] : F[(TabulatedRatingCurve #7, Terminal #8)] = 0
flow_conservation[Basin #2] : -F[(Basin #2, LinearResistance #4)] + F[(LinearResistance #4, Basin #2)] - F[(Basin #2, UserDemand #3)] + F[(UserDemand #3, Basin #2)] + F[(FlowBoundary #1, Basin #2)] = 0
flow_conservation[Basin #5] : -F[(Basin #5, TabulatedRatingCurve #7)] - F[(Basin #5, UserDemand #6)] + F[(LinearResistance #4, Basin #5)] - F[(Basin #5, LinearResistance #4)] + F[(UserDemand #6, Basin #5)] = 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[(LinearResistance #4, Basin #5)] - F[(Basin #5, LinearResistance #4)] + F[(UserDemand #6, Basin #5)] - F[(Basin #5, UserDemand #6)] - F[(Basin #5, TabulatedRatingCurve #7)] = 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
flow_conservation[Basin #2] : -F[(Basin #2, LinearResistance #4)] + F[(LinearResistance #4, Basin #2)] + F[(FlowBoundary #1, Basin #2)] + F[(UserDemand #3, Basin #2)] - F[(Basin #2, UserDemand #3)] = 0
source[(FlowBoundary #1, Basin #2)] : F[(FlowBoundary #1, Basin #2)] ≤ 172800
source_user[UserDemand #3] : F[(UserDemand #3, Basin #2)] ≤ 0
source_user[UserDemand #6] : F[(UserDemand #6, Basin #5)] ≤ 0
F[(TabulatedRatingCurve #7, Terminal #8)] ≥ 0
source_user[UserDemand #3] : F[(UserDemand #3, Basin #2)] ≤ 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
F[(Basin #5, UserDemand #6)] ≥ 0
F[(Basin #2, LinearResistance #4)] ≥ 0
F[(LinearResistance #4, Basin #2)] ≥ 0
F[(TabulatedRatingCurve #7, Terminal #8)] ≥ 0
F[(FlowBoundary #1, Basin #2)] ≥ 0
F[(LinearResistance #4, Basin #5)] ≥ 0
F[(Basin #5, LinearResistance #4)] ≥ 0
F[(UserDemand #6, Basin #5)] ≥ 0
F[(Basin #2, UserDemand #3)] ≥ 0
F[(UserDemand #3, Basin #2)] ≥ 0
F[(Basin #5, UserDemand #6)] ≥ 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
F[(FlowBoundary #1, Basin #2)] ≥ 0
F[(Basin #2, UserDemand #3)] ≥ 0
F[(UserDemand #6, Basin #5)] ≥ 0
</code></pre>
</div>
</div>
Expand Down
36 changes: 18 additions & 18 deletions guide/delwaq.html
Original file line number Diff line number Diff line change
Expand Up @@ -343,95 +343,95 @@ <h1 class="title">Ribasim Delwaq coupling</h1>
<tr>
<td data-quarto-table-cell-role="th">0</td>
<td>1</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Cl</td>
<td>0.0</td>
<td>0.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">1</td>
<td>1</td>
<td>2020-01-02</td>
<td>2020-01-02 00:00:00</td>
<td>Cl</td>
<td>1.0</td>
<td>1.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">2</td>
<td>1</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Tracer</td>
<td>1.0</td>
<td>1.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">3</td>
<td>3</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Cl</td>
<td>0.0</td>
<td>0.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">4</td>
<td>3</td>
<td>2020-01-02</td>
<td>2020-01-02 00:00:00</td>
<td>Cl</td>
<td>1.0</td>
<td>1.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">5</td>
<td>3</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Tracer</td>
<td>1.0</td>
<td>1.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">6</td>
<td>6</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Cl</td>
<td>0.0</td>
<td>0.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">7</td>
<td>6</td>
<td>2020-01-02</td>
<td>2020-01-02 00:00:00</td>
<td>Cl</td>
<td>1.0</td>
<td>1.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">8</td>
<td>6</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Tracer</td>
<td>1.0</td>
<td>1.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">9</td>
<td>9</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Cl</td>
<td>0.0</td>
<td>0.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">10</td>
<td>9</td>
<td>2020-01-02</td>
<td>2020-01-02 00:00:00</td>
<td>Cl</td>
<td>1.0</td>
<td>1.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">11</td>
<td>9</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Tracer</td>
<td>1.0</td>
<td>1.0</td>
Expand Down Expand Up @@ -466,28 +466,28 @@ <h1 class="title">Ribasim Delwaq coupling</h1>
<tr>
<td data-quarto-table-cell-role="th">0</td>
<td>15</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Cl</td>
<td>0.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">1</td>
<td>15</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Tracer</td>
<td>1.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">2</td>
<td>16</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Cl</td>
<td>0.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">3</td>
<td>16</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Tracer</td>
<td>1.0</td>
</tr>
Expand Down Expand Up @@ -521,14 +521,14 @@ <h1 class="title">Ribasim Delwaq coupling</h1>
<tr>
<td data-quarto-table-cell-role="th">0</td>
<td>11</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Cl</td>
<td>34.0</td>
</tr>
<tr>
<td data-quarto-table-cell-role="th">1</td>
<td>17</td>
<td>2020-01-01</td>
<td>2020-01-01 00:00:00</td>
<td>Cl</td>
<td>34.0</td>
</tr>
Expand Down
Loading

0 comments on commit bb74a98

Please sign in to comment.