-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
featureNew feature or requestNew feature or request
Description
Describe the feature request
Currently the set_feeder_ids only takes branches into account. This could be extended to also look at three winding transformators (branch3).
Example
In the example below it would be nice if the feeder_branch_id is set to 5 (the three winding transformator)
from power_grid_model_ds import Grid
from power_grid_model_ds.arrays import LinkArray, NodeArray, ThreeWindingTransformerArray
## The grid
# (1)
# |
# |--- (2)
# |
# (3)
# |
# (4)
grid = Grid.empty()
nodes = NodeArray.empty(4)
nodes.id = [1, 2, 3, 4]
nodes.node_type = [1, 0, 0, 0] # 1 = Substation, 0 = Regular Node
grid.append(nodes)
three_winding_transformers = ThreeWindingTransformerArray.empty(1)
three_winding_transformers.id = [5]
three_winding_transformers.node_1 = [1]
three_winding_transformers.node_2 = [2]
three_winding_transformers.node_3 = [3]
three_winding_transformers.status_1 = [1]
three_winding_transformers.status_2 = [1]
three_winding_transformers.status_3 = [1]
grid.append(three_winding_transformers)
links = LinkArray.empty(1)
links.id = [6]
links.from_node = [3]
links.to_node = [4]
links.from_status = [1]
links.to_status = [1]
grid.append(links)
grid.set_feeder_ids()
print(grid.node)
id | u_rated | node_type | feeder_branch_id | feeder_node_id
1 | nan | 1 | -2147483648 | -2147483648
2 | nan | 0 | -2147483648 | -2147483648
3 | nan | 0 | -2147483648 | -2147483648
4 | nan | 0 | -2147483648 | -2147483648
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or request
Type
Projects
Status
No status