Skip to content

Commit b1c092b

Browse files
committed
another file
Signed-off-by: Thijs Baaijen <[email protected]>
1 parent 26e28fc commit b1c092b

File tree

1 file changed

+6
-6
lines changed
  • src/power_grid_model_ds/_core/model/grids

1 file changed

+6
-6
lines changed

src/power_grid_model_ds/_core/model/grids/helpers.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,27 @@ def set_feeder_ids(grid: "Grid"):
6060

6161
for array in grid.branch_arrays:
6262
array.update_by_id(
63-
component_branches.id,
64-
feeder_branch_id=feeder_branch.id.item(),
63+
component_branches["id"],
64+
feeder_branch_id=feeder_branch["id"].item(),
6565
feeder_node_id=feeder_node_id,
6666
allow_missing=True,
6767
)
6868

6969
grid.node.update_by_id(
7070
component_node_ids,
71-
feeder_branch_id=feeder_branch.id.item(),
71+
feeder_branch_id=feeder_branch["id"].item(),
7272
feeder_node_id=feeder_node_id,
7373
allow_missing=True,
7474
)
7575

7676

7777
def set_is_feeder(grid: "Grid") -> None:
7878
"Set the is_feeder property for all branches in the network."
79-
feeder_node_ids = grid.node.filter(node_type=NodeType.SUBSTATION_NODE).id
79+
feeder_node_ids = grid.node.filter(node_type=NodeType.SUBSTATION_NODE)["id"]
8080
array: BranchArray
8181
for array in [grid.link, grid.line, grid.transformer]:
82-
array.is_feeder = np.logical_xor(
83-
np.isin(array.from_node, feeder_node_ids), np.isin(array.to_node, feeder_node_ids)
82+
array["is_feeder"] = np.logical_xor(
83+
np.isin(array["from_node"], feeder_node_ids), np.isin(array["to_node"], feeder_node_ids)
8484
)
8585

8686

0 commit comments

Comments
 (0)