Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Dupuy <[email protected]>
  • Loading branch information
flo-dup committed Sep 4, 2024
1 parent 7f4b3cd commit b2cc802
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
32 changes: 16 additions & 16 deletions examples/demo_mapviewer_features.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,31 +122,31 @@
"outputs": [],
"source": [
"# Example 3\n",
"# creates a network that contains lines and hvdc lines, and adds a substation and a tie line.\n",
"# creates a network that contains lines and HVDC lines, and adds a substation and a tie line.\n",
"# Then, adds some geographical data extensions, not present in the original network (fictitious coordinates).\n",
"# Finally, display the network using the mapviewer widget\n",
"\n",
"four_substations_network = pn.create_four_substations_node_breaker_network()\n",
"network3 = pn.create_four_substations_node_breaker_network()\n",
"\n",
"import pandas as pd\n",
"four_substations_network.create_substations(id='S5')\n",
"four_substations_network.create_voltage_levels(id='S5VL1', substation_id='S5', topology_kind='BUS_BREAKER', nominal_v=400)\n",
"four_substations_network.create_buses(id='S5VL1B1', voltage_level_id='S5VL1')\n",
"four_substations_network.create_dangling_lines(id='d1', voltage_level_id='S4VL1', node=1, p0=10, q0=3, r=0, x=5, g=0, b=1e-6)\n",
"four_substations_network.create_dangling_lines(id='d2', voltage_level_id='S5VL1', bus_id='S5VL1B1', p0=10, q0=3, r=0, x=5, g=0, b=1e-6)\n",
"four_substations_network.create_tie_lines(id='t1', dangling_line1_id='d1', dangling_line2_id='d2')\n",
"network3.create_substations(id='S5')\n",
"network3.create_voltage_levels(id='S5VL1', substation_id='S5', topology_kind='BUS_BREAKER', nominal_v=400)\n",
"network3.create_buses(id='S5VL1B1', voltage_level_id='S5VL1')\n",
"network3.create_dangling_lines(id='d1', voltage_level_id='S4VL1', node=1, p0=10, q0=3, r=0, x=5, g=0, b=1e-6)\n",
"network3.create_dangling_lines(id='d2', voltage_level_id='S5VL1', bus_id='S5VL1B1', p0=10, q0=3, r=0, x=5, g=0, b=1e-6)\n",
"network3.create_tie_lines(id='t1', dangling_line1_id='d1', dangling_line2_id='d2')\n",
"coords = pd.DataFrame(\n",
" [\n",
" ['S1', 2.9653506942899255, 46.648820589226624],\n",
" ['S2', 4.4868965299190675, 45.224159481986970],\n",
" ['S3', 2.4022589283484335, 44.090773206380350],\n",
" ['S4', 6.0803264207747825, 44.279779791063575],\n",
" ['S5', 7.4221621183374900, 44.279779791063575]\n",
" ], columns=['id', 'longitude', 'latitude']\n",
" ['S1', 46.648820589226624, 2.9653506942899255],\n",
" ['S2', 45.224159481986970, 4.4868965299190675],\n",
" ['S3', 44.090773206380350, 2.4022589283484335],\n",
" ['S4', 44.279779791063575, 6.0803264207747825],\n",
" ['S5', 44.279779791063575, 7.4221621183374900]\n",
" ], columns=['id', 'latitude', 'longitude']\n",
").set_index('id')\n",
"four_substations_network.create_extensions('substationPosition', coords[['latitude', 'longitude']])\n",
"network3.create_extensions('substationPosition', coords[['latitude', 'longitude']])\n",
"\n",
"network_map3=NetworkMapWidget(four_substations_network)\n",
"network_map3=NetworkMapWidget(network3)\n",
"display(network_map3)"
]
}
Expand Down
4 changes: 2 additions & 2 deletions examples/demo_network_explorer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"metadata": {},
"outputs": [],
"source": [
"#activate the network explorer. Note that, since the network doesn't include geo data, the Metwork map tab is empty.\n",
"#activate the network explorer. Note that, since the network doesn't include geo data, the Network map tab is empty.\n",
"network_explorer(network, depth=4)"
]
},
Expand All @@ -50,7 +50,7 @@
"metadata": {},
"outputs": [],
"source": [
"#load a network containig geo data, imported from a CGMES file containing a GL profile (Graphical Layout)\n",
"#load a network containing geo data, imported from a CGMES file containing a GL profile (Graphical Layout)\n",
"network_microgrid = pn.load('./data/MicroGridTestConfiguration_T4_BE_BB_Complete_v2.zip', {'iidm.import.cgmes.post-processors': 'cgmesGLImport'})"
]
},
Expand Down

0 comments on commit b2cc802

Please sign in to comment.