Skip to content

Commit

Permalink
deploy: 123c752
Browse files Browse the repository at this point in the history
  • Loading branch information
Jingru923 committed Aug 13, 2024
1 parent d76f0cc commit bfa2117
Show file tree
Hide file tree
Showing 18 changed files with 878 additions and 93 deletions.
22 changes: 11 additions & 11 deletions concept/allocation.html
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,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="66cb2861" class="cell" data-execution_count="1">
<div id="4b01d4ad" 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 @@ -607,27 +607,27 @@ <h2 data-number="4.4" class="anchored" data-anchor-id="example"><span class="hea
<span id="cb1-18"><a href="#cb1-18" 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
source[(FlowBoundary #1, Basin #2)] : F[(FlowBoundary #1, Basin #2)] ≤ 172800
source_user[UserDemand #6] : F[(UserDemand #6, Basin #5)] ≤ 0
source_user[UserDemand #3] : F[(UserDemand #3, Basin #2)] ≤ 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[Terminal #1] : F[(TabulatedRatingCurve #7, Terminal #1)] = 0
flow_conservation[Basin #5] : -F[(Basin #5, UserDemand #6)] + F[(UserDemand #6, Basin #5)] + F[(LinearResistance #4, Basin #5)] - F[(Basin #5, LinearResistance #4)] - F[(Basin #5, TabulatedRatingCurve #7)] = 0
flow_conservation[Basin #2] : F[(UserDemand #3, Basin #2)] + F[(FlowBoundary #1, Basin #2)] - F[(Basin #2, UserDemand #3)] - F[(Basin #2, LinearResistance #4)] + F[(LinearResistance #4, Basin #2)] = 0
flow_conservation[Basin #5] : F[(UserDemand #6, Basin #5)] - F[(Basin #5, UserDemand #6)] + F[(LinearResistance #4, Basin #5)] - F[(Basin #5, LinearResistance #4)] - 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 #1)] + F[(Basin #5, TabulatedRatingCurve #7)] = 0
F[(UserDemand #3, Basin #2)] ≥ 0
flow_conservation[Terminal #1] : F[(TabulatedRatingCurve #7, Terminal #1)] = 0
flow_conservation[Basin #2] : -F[(Basin #2, UserDemand #3)] + F[(FlowBoundary #1, Basin #2)] + F[(UserDemand #3, Basin #2)] - F[(Basin #2, LinearResistance #4)] + F[(LinearResistance #4, Basin #2)] = 0
F[(Basin #2, UserDemand #3)] ≥ 0
F[(FlowBoundary #1, Basin #2)] ≥ 0
F[(Basin #5, UserDemand #6)] ≥ 0
F[(UserDemand #3, Basin #2)] ≥ 0
F[(UserDemand #6, Basin #5)] ≥ 0
F[(Basin #2, UserDemand #3)] ≥ 0
F[(Basin #2, LinearResistance #4)] ≥ 0
F[(LinearResistance #4, Basin #2)] ≥ 0
F[(Basin #5, UserDemand #6)] ≥ 0
F[(TabulatedRatingCurve #7, Terminal #1)] ≥ 0
F[(LinearResistance #4, Basin #5)] ≥ 0
F[(Basin #5, LinearResistance #4)] ≥ 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
F[(Basin #2, LinearResistance #4)] ≥ 0
F[(LinearResistance #4, Basin #2)] ≥ 0
</code></pre>
</div>
</div>
Expand Down
12 changes: 9 additions & 3 deletions dev/addnode.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<script src="../site_libs/quarto-search/quarto-search.js"></script>
<meta name="quarto:offset" content="../">
<link href="../dev/python.html" rel="next">
<link href="../dev/core.html" rel="prev">
<link href="../dev/benchmark.html" rel="prev">
<script src="../site_libs/quarto-html/quarto.js"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
Expand Down Expand Up @@ -221,6 +221,12 @@
<a href="../dev/core.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Julia core development</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../dev/benchmark.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Benchmark</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
Expand Down Expand Up @@ -917,8 +923,8 @@ <h1 data-number="7"><span class="header-section-number">7</span> Finishing up</h
</script>
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="../dev/core.html" class="pagination-link" aria-label="Julia core development">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">Julia core development</span>
<a href="../dev/benchmark.html" class="pagination-link" aria-label="Benchmark">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">Benchmark</span>
</a>
</div>
<div class="nav-page nav-page-next">
Expand Down
6 changes: 6 additions & 0 deletions dev/allocation.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@
<a href="../dev/core.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Julia core development</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../dev/benchmark.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Benchmark</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
Expand Down
Loading

0 comments on commit bfa2117

Please sign in to comment.