From 2e690c45d89c0f547b4da80e0bf968074f2c7b02 Mon Sep 17 00:00:00 2001 From: Bart de Koning <74617371+SouthEndMusic@users.noreply.github.com> Date: Wed, 17 Apr 2024 11:04:15 +0200 Subject: [PATCH] Fix example plot (#1395) Fixes #1395 example plot --- docs/python/examples.ipynb | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/python/examples.ipynb b/docs/python/examples.ipynb index 32bbb556b..55e8b3244 100644 --- a/docs/python/examples.ipynb +++ b/docs/python/examples.ipynb @@ -1455,7 +1455,7 @@ " basin.State(level=[0.5]),\n", "]\n", "model.basin.add(\n", - " Node(2, Point(1.0, 0.0)),\n", + " Node(2, Point(1.0, 0.0), subnetwork_id=2),\n", " [\n", " *basin_data,\n", " basin.Time(\n", @@ -1469,7 +1469,7 @@ " ],\n", ")\n", "model.basin.add(\n", - " Node(5, Point(2.0, -1.0)),\n", + " Node(5, Point(2.0, -1.0), subnetwork_id=2),\n", " [\n", " *basin_data,\n", " basin.Static(\n", @@ -1480,9 +1480,6 @@ " urban_runoff=[0.0],\n", " ),\n", " ],\n", - ")\n", - "profile = pd.DataFrame(\n", - " data={\"node_id\": [2, 2, 5, 5], \"area\": 1e3, \"level\": [0.0, 1.0, 0.0, 1.0]}\n", ")" ] }, @@ -1500,7 +1497,7 @@ "outputs": [], "source": [ "model.flow_boundary.add(\n", - " Node(1, Point(0.0, 0.0)), [flow_boundary.Static(flow_rate=[1e-3])]\n", + " Node(1, Point(0.0, 0.0), subnetwork_id=2), [flow_boundary.Static(flow_rate=[1e-3])]\n", ")" ] }, @@ -1508,7 +1505,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Setup allocation level control:\n" + "Setup level demand:\n" ] }, { @@ -1518,7 +1515,7 @@ "outputs": [], "source": [ "model.level_demand.add(\n", - " Node(4, Point(1.0, -1.0)),\n", + " Node(4, Point(1.0, -1.0), subnetwork_id=2),\n", " [level_demand.Static(priority=[1], min_level=[1.0], max_level=[1.5])],\n", ")" ] @@ -1537,7 +1534,7 @@ "outputs": [], "source": [ "model.user_demand.add(\n", - " Node(3, Point(2.0, 0.0)),\n", + " Node(3, Point(2.0, 0.0), subnetwork_id=2),\n", " [\n", " user_demand.Static(\n", " priority=[2], demand=[1.5e-3], return_factor=[0.2], min_level=[0.2]\n",