diff --git a/docs/python/examples.ipynb b/docs/python/examples.ipynb index 315ce4777..5a76e3ae7 100644 --- a/docs/python/examples.ipynb +++ b/docs/python/examples.ipynb @@ -854,7 +854,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Setup flow boundary:\n" + "Setup level boundary:\n" ] }, { @@ -865,7 +865,7 @@ "source": [ "model.level_boundary.add(\n", " Node(4, Point(3.0, 0.0)),\n", - " [level_boundary.Static(level=[1])],\n", + " [level_boundary.Static(level=[5.0])],\n", ")" ] }, @@ -882,24 +882,27 @@ "metadata": {}, "outputs": [], "source": [ - "pid_control_data = [\n", - " pid_control.Time(\n", - " time=[\n", - " \"2020-01-01\",\n", - " \"2020-05-01\",\n", - " \"2020-07-01\",\n", - " \"2020-12-01\",\n", - " ],\n", - " listen_node_id=[2, 2, 2, 2],\n", - " listen_node_type=[\"Basin\", \"Basin\", \"Basin\", \"Basin\"],\n", - " target=[5.0, 5.0, 7.5, 7.5],\n", - " proportional=[-1e-3, 1e-3, 1e-3, 1e-3],\n", - " integral=[-1e-7, 1e-7, -1e-7, 1e-7],\n", - " derivative=[0.0, 0.0, 0.0, 0.0],\n", - " )\n", - "]\n", - "model.pid_control.add(Node(5, Point(1.5, 1.0)), pid_control_data)\n", - "model.pid_control.add(Node(7, Point(1.5, -1.0)), pid_control_data)" + "for node, proportional, integral in [\n", + " (Node(5, Point(1.5, 1.0)), -1e-3, -1e-7),\n", + " (Node(7, Point(1.5, -1.0)), 1e-3, 1e-7),\n", + "]:\n", + " pid_control_data = [\n", + " pid_control.Time(\n", + " time=[\n", + " \"2020-01-01\",\n", + " \"2020-05-01\",\n", + " \"2020-07-01\",\n", + " \"2020-12-01\",\n", + " ],\n", + " listen_node_id=2,\n", + " listen_node_type=\"Basin\",\n", + " target=[5.0, 5.0, 7.5, 7.5],\n", + " proportional=proportional,\n", + " integral=integral,\n", + " derivative=0.0,\n", + " )\n", + " ]\n", + " model.pid_control.add(node, pid_control_data)" ] }, {