Skip to content

Commit

Permalink
deploy: 201b18f
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed Oct 25, 2024
1 parent 39f0d31 commit aadc0f3
Show file tree
Hide file tree
Showing 16 changed files with 130 additions and 130 deletions.
20 changes: 10 additions & 10 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="78c60697" class="cell" data-execution_count="1">
<div id="8f19670b" 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 @@ -602,22 +602,22 @@ <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[(Basin #5, UserDemand #6)]² + F[(Basin #2, UserDemand #3)]²
Subject to
F[(Basin #2, LinearResistance #4)] ≥ 0
F[(LinearResistance #4, Basin #2)] ≥ 0
F[(FlowBoundary #1, Basin #2)] ≥ 0
F[(UserDemand #6, Basin #5)] ≥ 0
F[(LinearResistance #4, Basin #5)] ≥ 0
F[(Basin #5, LinearResistance #4)] ≥ 0
F[(TabulatedRatingCurve #7, Terminal #8)] ≥ 0
F[(Basin #5, UserDemand #6)] ≥ 0
F[(Basin #2, LinearResistance #4)] ≥ 0
F[(LinearResistance #4, Basin #2)] ≥ 0
F[(UserDemand #3, Basin #2)] ≥ 0
F[(FlowBoundary #1, Basin #2)] ≥ 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
F[(Basin #5, UserDemand #6)] ≥ 0
F[(Basin #2, UserDemand #3)] ≥ 0
F[(UserDemand #3, Basin #2)] ≥ 0
flow_conservation[Basin #2] : -F[(Basin #2, LinearResistance #4)] + F[(LinearResistance #4, Basin #2)] + F[(FlowBoundary #1, Basin #2)] - F[(Basin #2, UserDemand #3)] + F[(UserDemand #3, Basin #2)] = 0
flow_conservation[Terminal #8] : F[(TabulatedRatingCurve #7, Terminal #8)] = 0
flow_conservation[Basin #5] : F[(UserDemand #6, Basin #5)] + F[(LinearResistance #4, Basin #5)] - F[(Basin #5, LinearResistance #4)] - F[(Basin #5, UserDemand #6)] - F[(Basin #5, TabulatedRatingCurve #7)] = 0
flow_conservation[LinearResistance #4] : -F[(LinearResistance #4, Basin #5)] + F[(Basin #5, LinearResistance #4)] + F[(Basin #2, LinearResistance #4)] - F[(LinearResistance #4, Basin #2)] = 0
flow_conservation[TabulatedRatingCurve #7] : -F[(TabulatedRatingCurve #7, Terminal #8)] + F[(Basin #5, TabulatedRatingCurve #7)] = 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 #2] : -F[(Basin #2, LinearResistance #4)] + F[(LinearResistance #4, Basin #2)] + F[(UserDemand #3, Basin #2)] + F[(FlowBoundary #1, Basin #2)] - F[(Basin #2, UserDemand #3)] = 0
flow_conservation[Basin #5] : F[(UserDemand #6, Basin #5)] + F[(LinearResistance #4, Basin #5)] - F[(Basin #5, LinearResistance #4)] - F[(Basin #5, TabulatedRatingCurve #7)] - F[(Basin #5, UserDemand #6)] = 0
flow_conservation[Terminal #8] : F[(TabulatedRatingCurve #7, Terminal #8)] = 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
Expand Down
Loading

0 comments on commit aadc0f3

Please sign in to comment.