-
Notifications
You must be signed in to change notification settings - Fork 45
Observability: enable error for meshed observability check #1174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Observability: enable error for meshed observability check #1174
Conversation
Signed-off-by: Jerry Guo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables the NotObservableError exception to be thrown from the meshed network observability check, aligning its error handling behavior with the radial observability check.
Key changes:
- Modified
sufficient_condition_meshed_without_voltage_phasorto throwNotObservableErrorinstead of returning false when no spanning tree can be constructed - Updated test expectations to verify the exception is thrown rather than checking for a false return value
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| power_grid_model_c/power_grid_model/include/power_grid_model/math_solver/observability.hpp | Changed function to throw NotObservableError when spanning tree construction fails instead of returning false |
| tests/cpp_unit_tests/test_observability.cpp | Updated test to expect NotObservableError exception instead of checking boolean return value |
| tests/data/state_estimation/meshed-network-observability/02-unobservable-with-branch-measurement/params.json | Changed expected exception type from SparseMatrixError to NotObservableError |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
power_grid_model_c/power_grid_model/include/power_grid_model/math_solver/observability.hpp
Outdated
Show resolved
Hide resolved
power_grid_model_c/power_grid_model/include/power_grid_model/math_solver/observability.hpp
Outdated
Show resolved
Hide resolved
…ath_solver/observability.hpp Signed-off-by: Jerry Guo <[email protected]>
|



Enable exception
NotObservableErrorfrom meshed observability check.