Code
using Ribasim
@@ -597,26 +597,26 @@ println(p.allocation.allocation_models[1].problem)
-
diff --git a/guide/examples.html b/guide/examples.html
index 5995f8a39..e05e1da2e 100644
--- a/guide/examples.html
+++ b/guide/examples.html
@@ -658,7 +658,7 @@ Min F[(Basin #5, UserDemand #6)]² + F[(Basin #2, UserDemand #3)]²
+Min F[(Basin #2, UserDemand #3)]² + F[(Basin #5, UserDemand #6)]²
Subject to
- F[(Basin #5, UserDemand #6)] ≥ 0
- F[(UserDemand #6, Basin #5)] ≥ 0
+ F[(FlowBoundary #1, Basin #2)] ≥ 0
+ F[(Basin #2, UserDemand #3)] ≥ 0
+ F[(TabulatedRatingCurve #7, Terminal #8)] ≥ 0
F[(Basin #2, LinearResistance #4)] ≥ 0
F[(LinearResistance #4, Basin #2)] ≥ 0
F[(Basin #5, TabulatedRatingCurve #7)] ≥ 0
- F[(TabulatedRatingCurve #7, Terminal #8)] ≥ 0
F[(UserDemand #3, Basin #2)] ≥ 0
- F[(Basin #2, UserDemand #3)] ≥ 0
- F[(FlowBoundary #1, Basin #2)] ≥ 0
+ F[(Basin #5, UserDemand #6)] ≥ 0
+ F[(UserDemand #6, Basin #5)] ≥ 0
F[(LinearResistance #4, Basin #5)] ≥ 0
F[(Basin #5, LinearResistance #4)] ≥ 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[Basin #5] : -F[(Basin #5, UserDemand #6)] + F[(UserDemand #6, Basin #5)] - F[(Basin #5, TabulatedRatingCurve #7)] + F[(LinearResistance #4, Basin #5)] - F[(Basin #5, LinearResistance #4)] = 0
- flow_conservation[TabulatedRatingCurve #7] : F[(Basin #5, TabulatedRatingCurve #7)] - F[(TabulatedRatingCurve #7, Terminal #8)] = 0
+ flow_conservation[TabulatedRatingCurve #7] : -F[(TabulatedRatingCurve #7, Terminal #8)] + F[(Basin #5, TabulatedRatingCurve #7)] = 0
+ flow_conservation[Basin #2] : F[(FlowBoundary #1, Basin #2)] - F[(Basin #2, UserDemand #3)] - F[(Basin #2, LinearResistance #4)] + F[(LinearResistance #4, Basin #2)] + F[(UserDemand #3, Basin #2)] = 0
+ flow_conservation[Basin #5] : -F[(Basin #5, TabulatedRatingCurve #7)] - F[(Basin #5, UserDemand #6)] + F[(UserDemand #6, Basin #5)] + F[(LinearResistance #4, Basin #5)] - F[(Basin #5, LinearResistance #4)] = 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[(Basin #2, UserDemand #3)] + F[(FlowBoundary #1, Basin #2)] = 0
flow_conservation[Terminal #8] : F[(TabulatedRatingCurve #7, Terminal #8)] = 0
2 Model with disc
model.plot()
-/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:344: FutureWarning:
+/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:349: FutureWarning:
The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.
@@ -806,7 +806,7 @@ 3 Model with PID
model.plot()
-/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:329: FutureWarning:
+/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:334: FutureWarning:
The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.
@@ -1367,7 +1367,7 @@ 6 Guidance of mod
model.plot()
-/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:329: FutureWarning:
+/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:334: FutureWarning:
The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.
@@ -1570,7 +1570,7 @@ 7 Model with cont
model.plot()
-/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:344: FutureWarning:
+/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:349: FutureWarning:
The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.
diff --git a/guide/examples_files/figure-html/cell-18-output-1.png b/guide/examples_files/figure-html/cell-18-output-1.png
index ca5bf5153..74f00a40d 100644
Binary files a/guide/examples_files/figure-html/cell-18-output-1.png and b/guide/examples_files/figure-html/cell-18-output-1.png differ
diff --git a/guide/examples_files/figure-html/cell-19-output-1.png b/guide/examples_files/figure-html/cell-19-output-1.png
index 9a3501b52..f9cf57246 100644
Binary files a/guide/examples_files/figure-html/cell-19-output-1.png and b/guide/examples_files/figure-html/cell-19-output-1.png differ
diff --git a/guide/examples_files/figure-html/cell-68-output-1.png b/guide/examples_files/figure-html/cell-68-output-1.png
index 45b4f4e39..9d1c067b8 100644
Binary files a/guide/examples_files/figure-html/cell-68-output-1.png and b/guide/examples_files/figure-html/cell-68-output-1.png differ
diff --git a/reference/node/basin.html b/reference/node/basin.html
index c6a6ead1c..5393055b5 100644
--- a/reference/node/basin.html
+++ b/reference/node/basin.html
@@ -472,7 +472,7 @@
1.2.1 Interpolation
At the given timestamps the values are set in the simulation, such that the timeseries can be seen as forward filled.
-
+
Code
import numpy as np
@@ -671,7 +671,7 @@
1.4.1.1 Level to area
The level to area relationship is defined with the Basin / profile
data using linear interpolation. An example of such a relationship is shown below.
-
+
Code
= plt.subplots()
@@ -754,7 +754,7 @@ fig, ax \[
S(h) = \int_{h_0}^h A(h')\text{d}h'.
\]
-
+
Code
= np.diff(level) * area[:-1] + 0.5 * np.diff(area) * np.diff(level)
@@ -799,7 +799,7 @@ storage
1.4.1.3 Interactive basin example
The profile data is not detailed enough to create a full 3D picture of the basin. However, if we assume the profile data is for a stretch of canal of given length, the following plot shows a cross section of the basin.
-
+
Code
import plotly.graph_objects as go
@@ -914,9 +914,9 @@
fig.show()
-
model.plot()
-
/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:344: FutureWarning:
+/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:349: FutureWarning:
The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.
@@ -806,7 +806,7 @@ 3 Model with PID
model.plot()
-/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:329: FutureWarning:
+/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:334: FutureWarning:
The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.
@@ -1367,7 +1367,7 @@ 6 Guidance of mod
model.plot()
-/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:329: FutureWarning:
+/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:334: FutureWarning:
The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.
@@ -1570,7 +1570,7 @@ 7 Model with cont
model.plot()
-/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:344: FutureWarning:
+/home/runner/work/Ribasim/Ribasim/python/ribasim/ribasim/model.py:349: FutureWarning:
The behavior of array concatenation with empty entries is deprecated. In a future version, this will no longer exclude empty items when determining the result dtype. To retain the old behavior, exclude the empty entries before the concat operation.
diff --git a/guide/examples_files/figure-html/cell-18-output-1.png b/guide/examples_files/figure-html/cell-18-output-1.png
index ca5bf5153..74f00a40d 100644
Binary files a/guide/examples_files/figure-html/cell-18-output-1.png and b/guide/examples_files/figure-html/cell-18-output-1.png differ
diff --git a/guide/examples_files/figure-html/cell-19-output-1.png b/guide/examples_files/figure-html/cell-19-output-1.png
index 9a3501b52..f9cf57246 100644
Binary files a/guide/examples_files/figure-html/cell-19-output-1.png and b/guide/examples_files/figure-html/cell-19-output-1.png differ
diff --git a/guide/examples_files/figure-html/cell-68-output-1.png b/guide/examples_files/figure-html/cell-68-output-1.png
index 45b4f4e39..9d1c067b8 100644
Binary files a/guide/examples_files/figure-html/cell-68-output-1.png and b/guide/examples_files/figure-html/cell-68-output-1.png differ
diff --git a/reference/node/basin.html b/reference/node/basin.html
index c6a6ead1c..5393055b5 100644
--- a/reference/node/basin.html
+++ b/reference/node/basin.html
@@ -472,7 +472,7 @@
1.2.1 Interpolation
At the given timestamps the values are set in the simulation, such that the timeseries can be seen as forward filled.
-
+
Code
import numpy as np
@@ -671,7 +671,7 @@
1.4.1.1 Level to area
The level to area relationship is defined with the Basin / profile
data using linear interpolation. An example of such a relationship is shown below.
-
+
Code
= plt.subplots()
@@ -754,7 +754,7 @@ fig, ax \[
S(h) = \int_{h_0}^h A(h')\text{d}h'.
\]
-
+
Code
= np.diff(level) * area[:-1] + 0.5 * np.diff(area) * np.diff(level)
@@ -799,7 +799,7 @@ storage
1.4.1.3 Interactive basin example
The profile data is not detailed enough to create a full 3D picture of the basin. However, if we assume the profile data is for a stretch of canal of given length, the following plot shows a cross section of the basin.
-
+
Code
import plotly.graph_objects as go
@@ -914,9 +914,9 @@
fig.show()
-