Skip to content

feat: draft injection outage#56

Open
BenjPetr wants to merge 7 commits into
mainfrom
feat/injection_outage
Open

feat: draft injection outage#56
BenjPetr wants to merge 7 commits into
mainfrom
feat/injection_outage

Conversation

@BenjPetr

Copy link
Copy Markdown
Collaborator

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

@BenjPetr BenjPetr marked this pull request as ready for review April 18, 2026 02:58
Copilot AI review requested due to automatic review settings April 18, 2026 02:58

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

Adds one-step “injection outage” (N‑k) linearized state update utilities and associated tests/docs, while extending network data to track the angle-reference bus separately from voltage-control bus type.

Changes:

  • Introduce NumPy + JAX implementations for batched injection-outage ∆x computation (plus monitored-bus/branch outputs in JAX).
  • Extend bus data model/import schemas to include is_angle_reference / bus_is_angle_reference and update related masks/indices.
  • Add regression tests (NumPy vs powsybl one-step, JAX vs NumPy) and documentation for the new API.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/numpy/test_injection_outage.py New NumPy vs powsybl one-step injection-outage test.
tests/jax/test_injection_outage_jax.py New JAX injection-outage tests (JAX vs NumPy + monitored outputs).
tests/importing/test_powsybl_vs_pandapower_dynamic.py Propagate bus_is_angle_reference through dynamic network preparation.
tests/importing/test_import_helpers.py Update helper tests to include is_angle_reference in bus frames.
tests/importing/powsybl/test_powsybl_import.py Assert is_angle_reference presence/uniqueness and use BusType enum.
src/dc_plus/preprocess/preprocess_jacobian_bsdf.py Ensure bus-splitting padding also pads bus_is_angle_reference.
src/dc_plus/preprocess/create_network_data.py Populate bus_is_angle_reference in DynamicNetworkInformation.
src/dc_plus/numpy/injection_outage.py Add NumPy outage mismatch assembly + batched ∆x computation.
src/dc_plus/numpy/init.py Export non_voltage_regulating_injection_outage_dx.
src/dc_plus/jax/injection_outage.py Add JAX batched outage ∆x + monitored-bus/branch results.
src/dc_plus/interfaces/network_information.py Add bus_is_angle_reference and update slack/PV/PVPQ helpers accordingly.
src/dc_plus/importing/powsybl/powsybl_import.py Add is_angle_reference to bus schema and adjust bus typing logic.
src/dc_plus/importing/pandapower/pandapower_import.py Add is_angle_reference and refine bus-type selection.
src/dc_plus/importing/import_schema.py Extend BusParamSchema with is_angle_reference.
docs/dc_plus/injection_outage.md New documentation page for injection-outage API and assumptions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/dc_plus/injection_outage.md Outdated
Comment thread src/dc_plus/importing/powsybl/powsybl_import.py
Comment thread src/dc_plus/importing/pandapower/pandapower_import.py
Comment thread src/dc_plus/preprocess/create_network_data.py
Comment thread tests/numpy/test_injection_outage.py Outdated
@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