Skip to content

Commit

Permalink
Fix example plot (#1395)
Browse files Browse the repository at this point in the history
Fixes #1395 example plot
  • Loading branch information
SouthEndMusic authored Apr 17, 2024
1 parent f6108a0 commit 2e690c4
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions docs/python/examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
")"
]
},
Expand All @@ -1500,15 +1497,15 @@
"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",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Setup allocation level control:\n"
"Setup level demand:\n"
]
},
{
Expand All @@ -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",
")"
]
Expand All @@ -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",
Expand Down

0 comments on commit 2e690c4

Please sign in to comment.