Skip to content

refactor: node breaker updates#553

Open
nicow-elia wants to merge 3 commits into
mainfrom
refactor/node-breaker-updates
Open

refactor: node breaker updates#553
nicow-elia wants to merge 3 commits into
mainfrom
refactor/node-breaker-updates

Conversation

@nicow-elia

Copy link
Copy Markdown
Collaborator

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:

  • PR Title follows conventional commit messages
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • All commits in this PR are DCO signed-off (see CONTRIBUTING.md)

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?

  • Yes
  • No

Signed-off-by: Nico Westerbeck <Nico.Westerbeck@50hertz.com>
Signed-off-by: Nico Westerbeck <Nico.Westerbeck@50hertz.com>
@nicow-elia nicow-elia marked this pull request as ready for review June 15, 2026 10:42
Copilot AI review requested due to automatic review settings June 15, 2026 10:42
@nicow-elia nicow-elia changed the title Refactor/node breaker updates refactor: node breaker updates Jun 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 migrates SwitchUpdateSchema into the new module.
  • Updates DC solver export to produce NodeBreakerUpdate via get_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.

Comment thread packages/topology_optimizer_pkg/src/toop_engine_topology_optimizer/ac/summary.py Outdated
Signed-off-by: Nico Westerbeck <Nico.Westerbeck@50hertz.com>
@sonarqube-mccs

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants