feat: draft injection outage#56
Open
BenjPetr wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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_referenceand 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.
|
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.




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?