Skip to content

Commit afe3fa6

Browse files
committed
Add more license files
Signed-off-by: Thijs Baaijen <[email protected]>
1 parent 8d2e98a commit afe3fa6

16 files changed

+64
-0
lines changed

power-grid-model-ds/solutions/advanced_3_check_for_capacity_issues.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MPL-2.0
4+
15
from power_grid_model_ds import PowerGridModelInterface
26

37
def check_for_capacity_issues(grid: Grid) -> LineArray:

power-grid-model-ds/solutions/advanced_4_build_new_substation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MPL-2.0
4+
15
from power_grid_model_ds import PowerGridModelInterface
26

37
def check_for_capacity_issues(grid: Grid) -> LineArray:

power-grid-model-ds/solutions/advanced_5_1_get_all_congested_routes.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MPL-2.0
4+
15
def get_all_congested_routes(grid: Grid) -> list[NodeArray]:
26
"""Get all nodes on routes that contain an overloaded line."""
37
grid.set_feeder_ids()

power-grid-model-ds/solutions/advanced_5_2_find_connection_point.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MPL-2.0
4+
15
def find_connection_point(route: NodeArray, new_substation: NodeArray) -> NodeArray:
26
"""Calculate the connection point for the new route.
37
This should be the geographically closest node to the new substation.

power-grid-model-ds/solutions/advanced_5_3_connect_to_route.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MPL-2.0
4+
15
def connect_to_route(grid: Grid, connection_point: NodeArray, new_substation: NodeArray) -> None:
26
"""Connect the new substation node to the connection point.
37
"""

power-grid-model-ds/solutions/advanced_6_optimize_route_transfer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MPL-2.0
4+
15
def optimize_route_transfer(grid: Grid, connection_point: NodeArray, new_substation: NodeArray) -> None:
26
"""Attempt to optimize the route transfer moving the naturally open point (NOP) upstream towards the old substation.
37
This way, the new substation will take over more nodes of the original route.

power-grid-model-ds/solutions/introduction_1_1_define_array_extensions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MPL-2.0
4+
15
class MyNodeArray(NodeArray):
26
_defaults = {"x": 0.0, "y": 0.0, "u": 0.0}
37
x: NDArray[np.float64]

power-grid-model-ds/solutions/introduction_1_2_define_my_grid.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MPL-2.0
4+
15
@dataclass
26
class ExtendedGrid(Grid):
37
node: MyNodeArray
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
# SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MPL-2.0
4+
15
grid = ExtendedGrid.empty()
26
grid
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2025 Contributors to the Power Grid Model project <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MPL-2.0
4+
15
print("Node 'u' field exists?", hasattr(grid.node, "u"))
26
print("Line 'i_from' field exists?", hasattr(grid.line, "i_from"))
37
print("Node array:", grid.node)

0 commit comments

Comments
 (0)