Skip to content

Commit

Permalink
deploy: dc6ddf3
Browse files Browse the repository at this point in the history
  • Loading branch information
evetion committed Nov 1, 2024
1 parent aadc0f3 commit 44f96df
Show file tree
Hide file tree
Showing 21 changed files with 2,158 additions and 1,483 deletions.
7 changes: 5 additions & 2 deletions changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,11 @@
</div>
</li>
<li class="sidebar-item">
<span class="menu-text">contact.qmd</span>
</li>
<div class="sidebar-item-container">
<a href="./contact.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Contact us</span></a>
</div>
</li>
</ul>
</div>
</nav>
Expand Down
30 changes: 15 additions & 15 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="8f19670b" class="cell" data-execution_count="1">
<div id="4aec2223" 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 #5, UserDemand #6)]² + F[(Basin #2, UserDemand #3)]²
<pre><code>Min F[(Basin #2, UserDemand #3)]² + F[(Basin #5, UserDemand #6)]²
Subject to
F[(UserDemand #6, Basin #5)] ≥ 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[(FlowBoundary #1, Basin #2)] ≥ 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
F[(UserDemand #3, Basin #2)] ≥ 0
F[(LinearResistance #4, Basin #5)] ≥ 0
F[(Basin #5, LinearResistance #4)] ≥ 0
F[(Basin #2, UserDemand #3)] ≥ 0
F[(Basin #5, UserDemand #6)] ≥ 0
F[(UserDemand #6, Basin #5)] ≥ 0
F[(TabulatedRatingCurve #7, Terminal #8)] ≥ 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
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[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[Basin #2] : F[(FlowBoundary #1, Basin #2)] + F[(UserDemand #3, Basin #2)] - F[(Basin #2, UserDemand #3)] - F[(Basin #2, LinearResistance #4)] + F[(LinearResistance #4, Basin #2)] = 0
flow_conservation[Basin #5] : -F[(Basin #5, TabulatedRatingCurve #7)] + F[(LinearResistance #4, Basin #5)] - F[(Basin #5, LinearResistance #4)] - F[(Basin #5, UserDemand #6)] + F[(UserDemand #6, Basin #5)] = 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
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
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
</code></pre>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion concept/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ <h1 data-number="3"><span class="header-section-number">3</span> Substance (trac
</div>
</div>
<div class="callout-body-container callout-body">
<p>This is an unsupported experimental feature and is disabled by default. We advise to use the <a href="@sec-waterquality">Delwaq coupling</a> for tracer calculations. If you’re interested in using this experimental feature, please <a href="../contact.qmd">contact us</a>.</p>
<p>This is an unsupported experimental feature and is disabled by default. We advise to use the <a href="@sec-waterquality">Delwaq coupling</a> for tracer calculations. If you’re interested in using this experimental feature, please <a href="../contact.html">contact us</a>.</p>
</div>
</div>
<p>Ribasim can calculate concentrations of conservative tracers (i.e.&nbsp;substances that are non-reactive). It does so by calculating the mass transports by flows for each timestep, in the <code>update_cumulative_flows!</code> callback. Specifically, for each Basin at each timestep it calculates:</p>
Expand Down
Loading

0 comments on commit 44f96df

Please sign in to comment.