Merge links into nodes: Create link output from link solver algorithm - #1545
Merge links into nodes: Create link output from link solver algorithm#1545figueroa1395 wants to merge 32 commits into
Conversation
Signed-off-by: Santiago Figueroa Manrique <santiago.figueroa.manrique@alliander.com>
…k-supernode-output-enabled
…k-supernode-output-enabled
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
…k-supernode-output-enabled
…k-supernode-output-enabled
…k-supernode-output-enabled
…k-supernode-output-enabled
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
…k-supernode-output-enabled Signed-off-by: Martijn Govers <martijn.govers@alliander.com>
…k-supernode-output-enabled 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>
There was a problem hiding this comment.
Pull request overview
Adds link outputs for merged-node topology while retaining legacy output behavior.
Changes:
- Generates steady-state and short-circuit link outputs.
- Includes shunts and three-winding transformers in link-flow balancing.
- Adds component traits and expanded unit tests.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
topological_node_output.hpp |
Accumulates grid flows and generates link outputs. |
output.hpp |
Routes legacy and merged-topology link outputs. |
container.hpp |
Exposes stored component types. |
test_topological_node_output.cpp |
Tests flow accumulation and link solving. |
test_main_core_output.cpp |
Tests link output conversion. |
Suppressed comments (2)
power_grid_model_c/power_grid_model/include/power_grid_model/main_core/output.hpp:147
- The short-circuit path repeats the incorrect energized test: it marks a supplied one-sided link off and a closed link in an unsupplied island on. Guard a disconnected
topo_id, then usestate.topo_comp_coup->node[topo_id.group]to determine source connectivity, matching the legacy branch path andEdge::energizedsemantics.
if (!link.edge_status() || topo_id.group == disconnected) {
tests/cpp_unit_tests/main_core/test_main_core_output.cpp:285
- As in the steady-state case, a link with one active terminal connected to a source should remain energized; only its flow is zero. This
status_offexpectation conflicts withEdge::energizedand with the old output path. Add supplied node-to-math coupling to the fixture and expectIntS{1}.
CHECK(output[1].id == 1);
CHECK(output[1].energized == status_off);
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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>
There was a problem hiding this comment.
i realized that there's no test case checking link energized. as a result, we almost introduced a bug in this PR in which a link connected only on one side to source would be marked "energized": 0. That is of course incorrect. Its p_(from|to) and q_(from|to) should be 0 but not the energized. Hence I added this validation case
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>
|
|
do-not-merge added since its friday. Rest looks good |



Part of #35
Follow up of #1536
This PR should activate the Link output with two paths (old and new) + add the steady state output for
i