Skip to content

Commit

Permalink
deploy: 548c6eb
Browse files Browse the repository at this point in the history
  • Loading branch information
visr committed Nov 16, 2023
1 parent 5087ccb commit 3fbe491
Show file tree
Hide file tree
Showing 9 changed files with 366 additions and 1,190 deletions.
254 changes: 127 additions & 127 deletions build/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/equations.html
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ <h2 data-number="2.1" class="anchored" data-anchor-id="sec-reduction_factor"><sp
<div class="cell-output cell-output-stderr">
<pre><code>&lt;&gt;:31: SyntaxWarning: invalid escape sequence '\p'
&lt;&gt;:31: SyntaxWarning: invalid escape sequence '\p'
/tmp/ipykernel_4431/665069857.py:31: SyntaxWarning: invalid escape sequence '\p'
/tmp/ipykernel_4422/665069857.py:31: SyntaxWarning: invalid escape sequence '\p'
ax.set_ylabel("$\phi(x;p)$", fontsize=fontsize)</code></pre>
</div>
<div class="cell-output cell-output-display">
Expand Down
8 changes: 4 additions & 4 deletions python/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ <h1 data-number="1"><span class="header-section-number">1</span> Basic model wit
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a>to_id <span class="op">=</span> np.array(</span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a> [<span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>, <span class="dv">5</span>, <span class="dv">8</span>, <span class="dv">6</span>, <span class="dv">7</span>, <span class="dv">9</span>, <span class="dv">9</span>, <span class="dv">10</span>, <span class="dv">12</span>, <span class="dv">3</span>, <span class="dv">13</span>, <span class="dv">14</span>, <span class="dv">6</span>, <span class="dv">1</span>, <span class="dv">17</span>], dtype<span class="op">=</span>np.int64</span>
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a>)</span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a>lines <span class="op">=</span> ribasim.utils.geometry_from_connectivity(node, from_id, to_id)</span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a>lines <span class="op">=</span> node.geometry_from_connectivity(from_id, to_id)</span>
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a>edge <span class="op">=</span> ribasim.Edge(</span>
<span id="cb12-9"><a href="#cb12-9" aria-hidden="true" tabindex="-1"></a> df<span class="op">=</span>gpd.GeoDataFrame(</span>
<span id="cb12-10"><a href="#cb12-10" aria-hidden="true" tabindex="-1"></a> data<span class="op">=</span>{</span>
Expand Down Expand Up @@ -553,7 +553,7 @@ <h1 data-number="2"><span class="header-section-number">2</span> Update the basi
<span id="cb28-4"><a href="#cb28-4" aria-hidden="true" tabindex="-1"></a>ax <span class="op">=</span> df_flow.pivot_table(index<span class="op">=</span><span class="st">"time"</span>, columns<span class="op">=</span><span class="st">"edge"</span>, values<span class="op">=</span><span class="st">"flow_m3d"</span>).plot()</span>
<span id="cb28-5"><a href="#cb28-5" aria-hidden="true" tabindex="-1"></a>ax.legend(bbox_to_anchor<span class="op">=</span>(<span class="fl">1.3</span>, <span class="dv">1</span>), title<span class="op">=</span><span class="st">"Edge"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display" data-execution_count="26">
<pre><code>&lt;matplotlib.legend.Legend at 0x7fe34307b8f0&gt;</code></pre>
<pre><code>&lt;matplotlib.legend.Legend at 0x7fda1c9f33e0&gt;</code></pre>
</div>
<div class="cell-output cell-output-display">
<p><img src="examples_files/figure-html/cell-27-output-2.png" width="727" height="561"></p>
Expand Down Expand Up @@ -612,7 +612,7 @@ <h1 data-number="3"><span class="header-section-number">3</span> Model with disc
<span id="cb33-3"><a href="#cb33-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb33-4"><a href="#cb33-4" aria-hidden="true" tabindex="-1"></a>edge_type <span class="op">=</span> <span class="dv">6</span> <span class="op">*</span> [<span class="st">"flow"</span>] <span class="op">+</span> <span class="dv">2</span> <span class="op">*</span> [<span class="st">"control"</span>]</span>
<span id="cb33-5"><a href="#cb33-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb33-6"><a href="#cb33-6" aria-hidden="true" tabindex="-1"></a>lines <span class="op">=</span> ribasim.utils.geometry_from_connectivity(node, from_id, to_id)</span>
<span id="cb33-6"><a href="#cb33-6" aria-hidden="true" tabindex="-1"></a>lines <span class="op">=</span> node.geometry_from_connectivity(from_id, to_id)</span>
<span id="cb33-7"><a href="#cb33-7" aria-hidden="true" tabindex="-1"></a>edge <span class="op">=</span> ribasim.Edge(</span>
<span id="cb33-8"><a href="#cb33-8" aria-hidden="true" tabindex="-1"></a> df<span class="op">=</span>gpd.GeoDataFrame(</span>
<span id="cb33-9"><a href="#cb33-9" aria-hidden="true" tabindex="-1"></a> data<span class="op">=</span>{<span class="st">"from_node_id"</span>: from_id, <span class="st">"to_node_id"</span>: to_id, <span class="st">"edge_type"</span>: edge_type},</span>
Expand Down Expand Up @@ -893,7 +893,7 @@ <h1 data-number="4"><span class="header-section-number">4</span> Model with PID
<div class="sourceCode cell-code" id="cb49"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb49-1"><a href="#cb49-1" aria-hidden="true" tabindex="-1"></a>from_id <span class="op">=</span> np.array([<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>, <span class="dv">6</span>, <span class="dv">5</span>, <span class="dv">7</span>], dtype<span class="op">=</span>np.int64)</span>
<span id="cb49-2"><a href="#cb49-2" aria-hidden="true" tabindex="-1"></a>to_id <span class="op">=</span> np.array([<span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>, <span class="dv">6</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">6</span>], dtype<span class="op">=</span>np.int64)</span>
<span id="cb49-3"><a href="#cb49-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb49-4"><a href="#cb49-4" aria-hidden="true" tabindex="-1"></a>lines <span class="op">=</span> ribasim.utils.geometry_from_connectivity(node, from_id, to_id)</span>
<span id="cb49-4"><a href="#cb49-4" aria-hidden="true" tabindex="-1"></a>lines <span class="op">=</span> node.geometry_from_connectivity(from_id, to_id)</span>
<span id="cb49-5"><a href="#cb49-5" aria-hidden="true" tabindex="-1"></a>edge <span class="op">=</span> ribasim.Edge(</span>
<span id="cb49-6"><a href="#cb49-6" aria-hidden="true" tabindex="-1"></a> df<span class="op">=</span>gpd.GeoDataFrame(</span>
<span id="cb49-7"><a href="#cb49-7" aria-hidden="true" tabindex="-1"></a> data<span class="op">=</span>{</span>
Expand Down
138 changes: 131 additions & 7 deletions python/reference/Node.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ <h2 id="toc-title">On this page</h2>
<ul class="collapse">
<li><a href="#methods" id="toc-methods" class="nav-link" data-scroll-target="#methods"><span class="header-section-number">1.1</span> Methods</a>
<ul class="collapse">
<li><a href="#ribasim.Node.plot" id="toc-ribasim.Node.plot" class="nav-link" data-scroll-target="#ribasim.Node.plot"><span class="header-section-number">1.1.1</span> plot</a></li>
<li><a href="#ribasim.Node.connectivity_from_geometry" id="toc-ribasim.Node.connectivity_from_geometry" class="nav-link" data-scroll-target="#ribasim.Node.connectivity_from_geometry"><span class="header-section-number">1.1.1</span> connectivity_from_geometry</a></li>
<li><a href="#ribasim.Node.geometry_from_connectivity" id="toc-ribasim.Node.geometry_from_connectivity" class="nav-link" data-scroll-target="#ribasim.Node.geometry_from_connectivity"><span class="header-section-number">1.1.2</span> geometry_from_connectivity</a></li>
<li><a href="#ribasim.Node.plot" id="toc-ribasim.Node.plot" class="nav-link" data-scroll-target="#ribasim.Node.plot"><span class="header-section-number">1.1.3</span> plot</a></li>
</ul></li>
</ul></li>
</ul>
Expand All @@ -157,18 +159,140 @@ <h2 data-number="1.1" class="anchored" data-anchor-id="methods"><span class="hea
</thead>
<tbody>
<tr class="odd">
<td><a href="#ribasim.Node.connectivity_from_geometry">connectivity_from_geometry</a></td>
<td>Derive from_node_id and to_node_id for every edge in lines. LineStrings</td>
</tr>
<tr class="even">
<td><a href="#ribasim.Node.geometry_from_connectivity">geometry_from_connectivity</a></td>
<td>Create edge shapely geometries from connectivities.</td>
</tr>
<tr class="odd">
<td><a href="#ribasim.Node.plot">plot</a></td>
<td>Plot the nodes. Each node type is given a separate marker.</td>
</tr>
</tbody>
</table>
<section id="ribasim.Node.plot" class="level3" data-number="1.1.1">
<h3 data-number="1.1.1" class="anchored" data-anchor-id="ribasim.Node.plot"><span class="header-section-number">1.1.1</span> plot</h3>
<p><code>Node.plot(ax=None, zorder=None)</code></p>
<p>Plot the nodes. Each node type is given a separate marker.</p>
<section id="ribasim.Node.connectivity_from_geometry" class="level3" data-number="1.1.1">
<h3 data-number="1.1.1" class="anchored" data-anchor-id="ribasim.Node.connectivity_from_geometry"><span class="header-section-number">1.1.1</span> connectivity_from_geometry</h3>
<p><code>Node.connectivity_from_geometry(lines)</code></p>
<p>Derive from_node_id and to_node_id for every edge in lines. LineStrings may be used to connect multiple nodes in a sequence, but every linestring vertex must also a node.</p>
<section id="parameters" class="level4" data-number="1.1.1.1">
<h4 data-number="1.1.1.1" class="anchored" data-anchor-id="parameters"><span class="header-section-number">1.1.1.1</span> Parameters</h4>
<table class="table">
<thead>
<tr class="header">
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>node</code></td>
<td>Node</td>
<td></td>
<td><em>required</em></td>
</tr>
<tr class="even">
<td><code>lines</code></td>
<td>np.ndarray</td>
<td>Array of shapely linestrings.</td>
<td><em>required</em></td>
</tr>
</tbody>
</table>
</section>
<section id="returns" class="level4" data-number="1.1.1.2">
<h4 data-number="1.1.1.2" class="anchored" data-anchor-id="returns"><span class="header-section-number">1.1.1.2</span> Returns</h4>
<table class="table">
<thead>
<tr class="header">
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>np.ndarray of int</td>
<td></td>
</tr>
<tr class="even">
<td>np.ndarray of int</td>
<td></td>
</tr>
</tbody>
</table>
</section>
</section>
<section id="ribasim.Node.geometry_from_connectivity" class="level3" data-number="1.1.2">
<h3 data-number="1.1.2" class="anchored" data-anchor-id="ribasim.Node.geometry_from_connectivity"><span class="header-section-number">1.1.2</span> geometry_from_connectivity</h3>
<p><code>Node.geometry_from_connectivity(from_id, to_id)</code></p>
<p>Create edge shapely geometries from connectivities.</p>
<section id="parameters-1" class="level4" data-number="1.1.2.1">
<h4 data-number="1.1.2.1" class="anchored" data-anchor-id="parameters-1"><span class="header-section-number">1.1.2.1</span> Parameters</h4>
<table class="table">
<colgroup>
<col style="width: 16%">
<col style="width: 25%">
<col style="width: 41%">
<col style="width: 17%">
</colgroup>
<thead>
<tr class="header">
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>node</code></td>
<td>Ribasim.Node</td>
<td></td>
<td><em>required</em></td>
</tr>
<tr class="even">
<td><code>from_id</code></td>
<td>Sequence[int]</td>
<td>First node of every edge.</td>
<td><em>required</em></td>
</tr>
<tr class="odd">
<td><code>to_id</code></td>
<td>Sequence[int]</td>
<td>Second node of every edge.</td>
<td><em>required</em></td>
</tr>
</tbody>
</table>
</section>
<section id="returns-1" class="level4" data-number="1.1.2.2">
<h4 data-number="1.1.2.2" class="anchored" data-anchor-id="returns-1"><span class="header-section-number">1.1.2.2</span> Returns</h4>
<table class="table">
<thead>
<tr class="header">
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>np.ndarray</td>
<td>Array of shapely LineStrings.</td>
</tr>
</tbody>
</table>
</section>
</section>
<section id="ribasim.Node.plot" class="level3" data-number="1.1.3">
<h3 data-number="1.1.3" class="anchored" data-anchor-id="ribasim.Node.plot"><span class="header-section-number">1.1.3</span> plot</h3>
<p><code>Node.plot(ax=None, zorder=None)</code></p>
<p>Plot the nodes. Each node type is given a separate marker.</p>
<section id="parameters-2" class="level4" data-number="1.1.3.1">
<h4 data-number="1.1.3.1" class="anchored" data-anchor-id="parameters-2"><span class="header-section-number">1.1.3.1</span> Parameters</h4>
<table class="table">
<colgroup>
<col style="width: 10%">
<col style="width: 13%">
Expand All @@ -193,8 +317,8 @@ <h4 data-number="1.1.1.1" class="anchored" data-anchor-id="parameters"><span cla
</tbody>
</table>
</section>
<section id="returns" class="level4" data-number="1.1.1.2">
<h4 data-number="1.1.1.2" class="anchored" data-anchor-id="returns"><span class="header-section-number">1.1.1.2</span> Returns</h4>
<section id="returns-2" class="level4" data-number="1.1.3.2">
<h4 data-number="1.1.3.2" class="anchored" data-anchor-id="returns-2"><span class="header-section-number">1.1.3.2</span> Returns</h4>
<table class="table">
<thead>
<tr class="header">
Expand Down
17 changes: 0 additions & 17 deletions python/reference/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ <h2 id="toc-title">On this page</h2>
<li><a href="#model" id="toc-model" class="nav-link" data-scroll-target="#model"><span class="header-section-number">1.1</span> Model</a></li>
<li><a href="#network" id="toc-network" class="nav-link" data-scroll-target="#network"><span class="header-section-number">1.2</span> Network</a></li>
<li><a href="#node-types" id="toc-node-types" class="nav-link" data-scroll-target="#node-types"><span class="header-section-number">1.3</span> Node types</a></li>
<li><a href="#utility-functions" id="toc-utility-functions" class="nav-link" data-scroll-target="#utility-functions"><span class="header-section-number">1.4</span> Utility functions</a></li>
</ul></li>
</ul>
</nav>
Expand Down Expand Up @@ -267,22 +266,6 @@ <h2 data-number="1.3" class="anchored" data-anchor-id="node-types"><span class="
</tr>
</tbody>
</table>
</section>
<section id="utility-functions" class="level2" data-number="1.4">
<h2 data-number="1.4" class="anchored" data-anchor-id="utility-functions"><span class="header-section-number">1.4</span> Utility functions</h2>
<p>Collection of utility functions.</p>
<table class="table">
<tbody>
<tr class="odd">
<td><a href="../../python/reference/utils.geometry_from_connectivity.html#ribasim.utils.geometry_from_connectivity">utils.geometry_from_connectivity</a></td>
<td>Create edge shapely geometries from connectivities.</td>
</tr>
<tr class="even">
<td><a href="../../python/reference/utils.connectivity_from_geometry.html#ribasim.utils.connectivity_from_geometry">utils.connectivity_from_geometry</a></td>
<td>Derive from_node_id and to_node_id for every edge in lines. LineStrings</td>
</tr>
</tbody>
</table>


</section>
Expand Down
Loading

0 comments on commit 3fbe491

Please sign in to comment.