You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(pandapower): make N-1 outcome reporting explicit - #9
Improve the pandapower N-1 contingency workflow so failed and diverged contingency runs are reported explicitly instead of being treated as secure or silently omitted.
Changes
Explicitly distinguish converged, failed, and diverged contingency runs.
Require accounting for every requested outage before declaring the N-1 study complete.
Report voltage violations, line overloads, and transformer overloads separately.
Add aggregate counts for total, converged, failed, diverged, and critical contingencies.
Update the worked N-1 example to reflect the improved reporting workflow.
Distinguish contingency convergence failures from normal electrical violations in the escalation guidance.
Why
A contingency study should not be considered complete merely because some outage simulations returned results. A failed or diverged contingency is itself an important study outcome and must remain visible to the user.
This change makes the pandapower skill more reliable for agent-driven power-system studies and prevents partial N-1 results from being interpreted as an all-clear.
Scope
This PR only updates the existing pandapower skill documentation and worked example. It does not change the underlying pandapower analysis implementation or add dependencies.
Validation
Branch is up to date with Power-Agent/PowerSkills:main.
Only the pandapower skill and its worked examples are modified.
The example uses standard pandapower APIs and preserves the existing case14 workflow.
Review of ed6709a: please preserve the base-case convergence-failure escalation before merging.
In powerskills-tool/skills/pandapower/SKILL.md:40, the new contingency-only trigger replaces the existing run_power_flow failure trigger. This removes the explicit route to convergence-failure-mitigation when the base-case solve fails, even though a credible base case is required before running contingencies. Please keep both triggers, either in separate rows or with wording such as “The base-case or a contingency power flow fails or diverges.”
Validation: the documented case14 example ran with pandapower 3.5.6: 15 attempted, 15 converged, 0 failed, 0 diverged, and 15 critical. The changes also merge cleanly with main’s recent copy.deepcopy repair.
Nonblocking test improvement: tests/test_n1_example.py:19–24 checks accounting and result shape but still passes if every contingency solve raises after the base solve succeeds. Please consider adding a known successful outage and deliberate failure/divergence cases so the test catches that regression.
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
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.
Summary
Improve the pandapower N-1 contingency workflow so failed and diverged contingency runs are reported explicitly instead of being treated as secure or silently omitted.
Changes
Why
A contingency study should not be considered complete merely because some outage simulations returned results. A failed or diverged contingency is itself an important study outcome and must remain visible to the user.
This change makes the pandapower skill more reliable for agent-driven power-system studies and prevents partial N-1 results from being interpreted as an all-clear.
Scope
This PR only updates the existing pandapower skill documentation and worked example. It does not change the underlying pandapower analysis implementation or add dependencies.
Validation
Power-Agent/PowerSkills:main.