Skip to content

Merge links on nodes: create super nodes#1398

Open
mgovers wants to merge 8 commits into
mainfrom
feature/super-nodes
Open

Merge links on nodes: create super nodes#1398
mgovers wants to merge 8 commits into
mainfrom
feature/super-nodes

Conversation

@mgovers
Copy link
Copy Markdown
Member

@mgovers mgovers commented May 13, 2026

Part of #35

This actually creates the topological nodes from the regular nodes

mgovers added 8 commits April 29, 2026 14:23
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
@mgovers mgovers self-assigned this May 13, 2026
@mgovers mgovers added the feature New feature or request label May 13, 2026
Comment on lines +433 to +448
struct ReducedComponentTopology {
Idx n_node{}; // num of topological nodes (with reduced links), plus internal nodes for 3-way branches
std::vector<BranchIdx> branch_node_idx;
std::vector<Branch3Idx> branch3_node_idx;
IdxVector shunt_node_idx;
IdxVector source_node_idx;
IdxVector load_gen_node_idx;
std::span<LoadGenType const> load_gen_type;
IdxVector voltage_sensor_node_idx;
std::span<Idx const> power_sensor_object_idx; // the index is relative to branch, source, shunt or load_gen
std::span<MeasuredTerminalType const> power_sensor_terminal_type;
std::span<Idx const> current_sensor_object_idx; // the index is relative to branch
std::span<MeasuredTerminalType const> current_sensor_terminal_type;
std::span<ComponentType const> regulator_type;
std::span<Idx const> regulated_object_idx; // the index is relative to branch or branch3
std::span<ComponentType const> regulated_object_type;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the span ones essentially do not change when we go from user nodes to topological nodes, so we can do with a pure view. The branch2, branch3 and appliance ones may change so they need a pass-by-copy.

We can also opt for a maybe_owning_view, which can either take by reference, or by value, depending on the situation. I'm investigating that on the side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant