refactor: node breaker updates#553
Open
nicow-elia wants to merge 3 commits into
Open
Conversation
Signed-off-by: Nico Westerbeck <Nico.Westerbeck@50hertz.com>
Signed-off-by: Nico Westerbeck <Nico.Westerbeck@50hertz.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors “switch updates” into a unified low-level node-breaker update model that groups both switch state changes and PST tap setpoint changes, and extends ORAO JSON export to include PST actions.
Changes:
- Introduces
NodeBreakerUpdate(+PSTUpdateSchema) and migratesSwitchUpdateSchemainto the new module. - Updates DC solver export to produce
NodeBreakerUpdateviaget_node_breaker_updates_from_action_set(...)(including PST setpoints). - Updates AC summary export/tests to serialize both switch and PST actions into ORAO JSON.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/topology_optimizer_pkg/tests/ac/test_summary.py | Updates tests to use NodeBreakerUpdate and asserts PST actions are included in ORAO export. |
| packages/topology_optimizer_pkg/src/toop_engine_topology_optimizer/benchmark/benchmark_utils.py | Switches to new DC export API but still needs alignment with renamed ORAO conversion helper. |
| packages/topology_optimizer_pkg/src/toop_engine_topology_optimizer/ac/summary.py | Renames/export path to node-breaker updates and adds PST actions to ORAO JSON. |
| packages/interfaces_pkg/src/toop_engine_interfaces/switch_update_schema.py | Removes old standalone switch-update schema module. |
| packages/interfaces_pkg/src/toop_engine_interfaces/node_breaker_update.py | Adds unified schemas + NodeBreakerUpdate container model. |
| packages/dc_solver_pkg/tests/export/test_station_switch_updates.py | Updates schema import to new module. |
| packages/dc_solver_pkg/tests/export/test_export.py | Adds coverage for PST setpoint export + updates action-set export entrypoint usage. |
| packages/dc_solver_pkg/tests/export/test_disconnection_switch_updates.py | Updates schema import to new module. |
| packages/dc_solver_pkg/tests/export/test_asset_topology_to_dgs.py | Updates schema import to new module. |
| packages/dc_solver_pkg/src/toop_engine_dc_solver/postprocess/apply_asset_topo_powsybl.py | Updates schema import to new module. |
| packages/dc_solver_pkg/src/toop_engine_dc_solver/postprocess/abstract_runner.py | Updates schema import to new module. |
| packages/dc_solver_pkg/src/toop_engine_dc_solver/export/station_switch_updates.py | Updates schema import to new module. |
| packages/dc_solver_pkg/src/toop_engine_dc_solver/export/export.py | Introduces PST setpoint export + unified get_node_breaker_updates_from_action_set. |
| packages/dc_solver_pkg/src/toop_engine_dc_solver/export/disconnection_switch_updates.py | Updates schema import to new module. |
| packages/dc_solver_pkg/src/toop_engine_dc_solver/export/asset_topology_to_dgs.py | Updates schema import to new module. |
Signed-off-by: Nico Westerbeck <Nico.Westerbeck@50hertz.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Moves the SwitchUpdateSchema into a new module NodeBreakerUpdate which unifies pst setpoint changes and switch updates into one dataclass. Also extends the orao json export with the new pst setpoints.
Next up (in a separate PR) I'd include this into the postprocess runners so that we are sure we are validating the same thing.
Checklist
Please check if the PR fulfills these requirements:
Does this PR already have an issue describing the problem?
Fixes #
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change?