Bugfix: matroid intersection approach to fix the order dependency of current greedy travesal approach#1450
Conversation
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
…endence of the existing meshed check (graph walk) Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
|
Added |
There was a problem hiding this comment.
Pull request overview
This PR addresses order-dependence in the meshed-network observability sufficient-condition check by introducing an order-independent approach based on contracting branch-measured edges (union-find) and applying a matroid-intersection style selection for assignable spanning edges. It adds targeted unit tests and introduces a new meshed-network observability test dataset.
Changes:
- Add an order-independent meshed observability check (
meshed_observable_matroid_intersection) and wire it intoobservability_check()for meshed networks. - Update starting-node candidate selection logic used by the legacy greedy traversal.
- Add C++ unit tests for contraction, contracted-network construction, and matroid-intersection observability, plus new JSON test vectors (+ SPDX license sidecars).
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
power_grid_model_c/power_grid_model/include/power_grid_model/math_solver/observability.hpp |
Implements union-find contraction + matroid-intersection-based meshed observability; updates meshed path in observability_check; tweaks starting-node selection. |
tests/cpp_unit_tests/math_solver/test_observability.cpp |
Adds unit tests covering the new contraction/contracted-network logic and order-independence scenarios. |
tests/data/state_estimation/meshed-network-observability/08-starting-candidate-dominance/input.json |
Adds a meshed-network input dataset intended to reproduce order-sensitivity scenarios. |
tests/data/state_estimation/meshed-network-observability/08-starting-candidate-dominance/input.json.license |
Adds SPDX license sidecar for the new input dataset. |
tests/data/state_estimation/meshed-network-observability/08-starting-candidate-dominance/params.json |
Adds parameters for the new dataset. |
tests/data/state_estimation/meshed-network-observability/08-starting-candidate-dominance/params.json.license |
Adds SPDX license sidecar for the new params dataset. |
tests/data/state_estimation/meshed-network-observability/08-starting-candidate-dominance/sym_output.json |
Adds an (empty) expected output placeholder for the dataset. |
tests/data/state_estimation/meshed-network-observability/08-starting-candidate-dominance/sym_output.json.license |
Adds SPDX license sidecar for the new output file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
|




The order of the neighbourhood information has decisive impact on the execution of the greedy graph traversal approach that is behind the current meshed observability check. This can be a source of error and yield false negatives when node degree is high and the order of the neighbourhood information has a impact on the tree constructed. This PR fixes that.
This is an experiment.