Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0c3625c
feat: setup first introduction pgmds workshop
jaapschoutenalliander Apr 16, 2025
495ebf4
feat: setup first introduction pgmds workshop
jaapschoutenalliander Apr 16, 2025
1f0494f
chore: setup solution files
jaapschoutenalliander Apr 30, 2025
a7c69f1
feat: draft advanced workshop
jaapschoutenalliander May 1, 2025
d14bfdc
chore: create backstory
jaapschoutenalliander May 6, 2025
ecbf83c
feat: cleaner functions
jaapschoutenalliander May 8, 2025
ec9378e
feat: cleaner distance function
jaapschoutenalliander May 8, 2025
f3f6496
fix: loadflow
jaapschoutenalliander May 8, 2025
2104c13
chore: cleanup
jaapschoutenalliander May 8, 2025
6e98648
PGM-DS: Add data example Grid
svenvdvoort May 9, 2025
794e9e8
chore: match new input to solutions
jaapschoutenalliander May 9, 2025
8e8e880
feat: create solutions
jaapschoutenalliander May 15, 2025
337dae5
feat: add visualize
jaapschoutenalliander May 15, 2025
569905b
feat: update visuals
jaapschoutenalliander May 15, 2025
6676c89
feat: add hints to introduction
jaapschoutenalliander May 19, 2025
b34b1d3
feat: prepare advanced excercises
jaapschoutenalliander May 19, 2025
4f21787
feat: text
jaapschoutenalliander May 19, 2025
8beaafa
PGM-DS workshop: Improve descriptions in advanced notebook
svenvdvoort May 19, 2025
11b5cda
Merge branch 'feature/power-grid-model-ds-workshop' of https://github…
jaapschoutenalliander May 20, 2025
e2ea1b7
feat: small changes
jaapschoutenalliander May 20, 2025
76babd9
Split solution cells
Thijss May 20, 2025
bb3c6ed
Apply changes from feedback
Thijss May 20, 2025
8d2e98a
Add license files
Thijss May 21, 2025
afe3fa6
Add more license files
Thijss May 21, 2025
1a8eab8
Add license files for data
Thijss May 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
524 changes: 524 additions & 0 deletions power-grid-model-ds/advanced.ipynb

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions power-grid-model-ds/advanced.ipynb.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>

SPDX-License-Identifier: MPL-2.0
25 changes: 25 additions & 0 deletions power-grid-model-ds/data/lines.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
id,from_node,to_node,from_status,to_status,i_from,r1,x1,c1,tan1,i_n
301,101,1,1,1,0,0.04172331553871052,0.052980486528544264,0.0,0.0,210.28427536474146
302,1,2,1,1,0,0.15725110380730004,0.022290287012795527,0.0,0.0,105.94268839245518
303,2,3,1,1,0,0.15725110380730004,0.022290287012795527,0.0,0.0,105.94268839245518
304,3,4,1,1,0,0.025752163570459393,0.017975680453095257,0.0,0.0,252.81330598432984
305,4,5,1,1,0,0.184580749945473,0.05679935115815177,0.0,0.0,308.29168286950096
306,5,6,1,1,0,0.09247280056072502,0.04061706379498719,0.0,0.0,146.12039826984656
307,6,7,1,1,0,0.09247280056072502,0.04061706379498719,0.0,0.0,146.12039826984656
308,7,101,1,0,0,0.13774802878276293,0.023316760013206598,0.0,0.0,435.44293210319637
309,101,8,1,1,0,0.13774802878276293,0.023316760013206598,0.0,0.0,435.44293210319637
310,8,9,1,1,0,0.03155099592582141,0.1684585911623038,0.0,0.0,386.9416504130695
311,9,10,1,1,0,0.38045029098187605,0.0063983451879243095,0.0,0.0,595.6252329736612
312,10,11,1,1,0,0.38045029098187605,0.0063983451879243095,0.0,0.0,595.6252329736612
313,11,12,1,0,0,0.2711350129219581,0.0239320695659479,0.0,0.0,109.56302502830336
314,12,13,1,1,0,0.7512185900820556,0.016025736292976843,0.0,0.0,320.73771673448846
315,13,14,1,1,0,0.2332922408038184,0.010579215551474988,0.0,0.0,221.24699130886745
316,14,15,1,1,0,0.2884431875887676,0.016206534923606564,0.0,0.0,305.34636498186455
317,15,16,1,1,0,0.06893013265387658,0.002501770712404082,0.0,0.0,129.78347503297758
318,16,101,1,1,0,0.17466926178911735,0.04197366431254047,0.0,0.0,223.462291908927
319,101,17,1,1,0,0.0014230825354318865,0.005366123634368465,0.0,0.0,143.19692487769424
320,17,18,1,1,0,0.05535894789343593,0.015888270665417342,0.0,0.0,348.82546139151896
321,18,19,1,1,0,1.1336902294005273,0.0034372075909574274,0.0,0.0,109.4472896415015
322,19,20,1,1,0,0.02756399437186089,0.001442850824658642,0.0,0.0,315.15332070790726
323,20,21,1,1,0,0.15000233423633422,0.012783549273682825,0.0,0.0,505.6064937043503
324,21,101,1,0,0,0.4527663172740473,0.010942584326900677,0.0,0.0,235.29434874845845
3 changes: 3 additions & 0 deletions power-grid-model-ds/data/lines.csv.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>

SPDX-License-Identifier: MPL-2.0
22 changes: 22 additions & 0 deletions power-grid-model-ds/data/loads.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
id,node,p_specified,q_specified
201,1,75559.96424922015,2119.7561886191743
202,2,3897910.78949213034,-8632.07774532976
203,3,95478.41471359684,18229.00620748075
204,4,-63249.17346947564,-712.0333973476627
205,5,-64900.69141993268,14743.624463381835
206,6,348049.77201387816,36026.00482909736
207,7,21984.741221515593,24426.02990667891
208,8,-67789.02445002584,32094.560258638798
209,9,194810.9302324328,4783.500971894942
210,10,-65128.11331122106,-4447.890651114186
211,11,143731.66910079535,5949.794993746957
212,12,224756.36715177132,39976.29538075794
213,13,80358.3966250818,22745.972387370846
214,14,313227.5266984018,23551.04963072692
215,15,234550.7662600798,19216.914424467115
216,16,293012.8372641854,-9912.346527315487
217,17,386582.49982988625,-2654.9452654344077
218,18,-68922.11726350724,13959.630269749312
219,19,329471.2892289656,-5256.568898739658
220,20,3828501.06297316383,27023.499817300326
221,21,55155.355929427635,37523.58862659218
3 changes: 3 additions & 0 deletions power-grid-model-ds/data/loads.csv.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>

SPDX-License-Identifier: MPL-2.0
23 changes: 23 additions & 0 deletions power-grid-model-ds/data/nodes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
id,u_rated,node_type,x,y
1,10500.0,0,0,200
2,10500.0,0,0,400
3,10500.0,0,0,600
4,10500.0,0,0,800
5,10500.0,0,-200,800
6,10500.0,0,-400,600
7,10500.0,0,-400,400
8,10500.0,0,-200,0
9,10500.0,0,-400,0
10,10500.0,0,-600,0
11,10500.0,0,-600,-200
12,10500.0,0,-600,-400
13,10500.0,0,-400,-400
14,10500.0,0,-200,-400
15,10500.0,0,0,-400
16,10500.0,0,0,-200
17,10500.0,0,200,0
18,10500.0,0,400,0
19,10500.0,0,600,200
20,10500.0,0,400,200
21,10500.0,0,200,200
101,10500.0,1,0,0
3 changes: 3 additions & 0 deletions power-grid-model-ds/data/nodes.csv.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>

SPDX-License-Identifier: MPL-2.0
57 changes: 57 additions & 0 deletions power-grid-model-ds/helper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>
#
# SPDX-License-Identifier: MPL-2.0

import pandas as pd
from power_grid_model_ds.arrays import SymLoadArray, SourceArray

def load_dummy_grid(grid_class):
nodes_csv = pd.read_csv("data/nodes.csv")
loads_csv = pd.read_csv("data/loads.csv")
lines_csv = pd.read_csv("data/lines.csv")

grid = grid_class.empty()

nodes = grid.node.__class__(
id=nodes_csv.id.tolist(),
u_rated=nodes_csv.u_rated.tolist(),
node_type=nodes_csv.node_type.tolist(),
x=nodes_csv.x.tolist(),
y=nodes_csv.y.tolist(),
u=[-1.0] * len(nodes_csv),
)
loads = SymLoadArray(
id=loads_csv.id.tolist(),
node=loads_csv.node.tolist(),
status=[1] * len(loads_csv),
type=[0] * len(loads_csv),
p_specified=loads_csv.p_specified.tolist(),
q_specified=loads_csv.q_specified.tolist(),
)
lines = grid.line.__class__(
id=lines_csv.id.tolist(),
from_node=lines_csv.from_node.tolist(),
to_node=lines_csv.to_node.tolist(),
from_status=lines_csv.from_status.tolist(), # 1 means active connection from-side,
to_status=lines_csv.to_status.tolist(), # 1 means active connection to-side
i_n=lines_csv.i_n.tolist(), # line max current capacity (e.g., 200 A)
r1=lines_csv.r1.tolist(), # line resistance
x1=lines_csv.x1.tolist(), # line reactance
c1=lines_csv.c1.tolist(), # line capacitance
tan1=lines_csv.tan1.tolist() # line loss tangent
)
sources = SourceArray(
id=[401],
node=[101],
status=[1],
u_ref=[1.0],
)

grid.append(nodes, check_max_id=False)
grid.append(loads, check_max_id=False)
grid.append(lines, check_max_id=False)
grid.append(sources, check_max_id=False)

grid.set_feeder_ids()

return grid
Binary file added power-grid-model-ds/input_network.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions power-grid-model-ds/input_network.png.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>

SPDX-License-Identifier: MPL-2.0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions power-grid-model-ds/input_network_with_overload.png.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>

SPDX-License-Identifier: MPL-2.0
Loading