Skip to content

Topology aware security assessment - #155

Closed
BurhanAbdullah wants to merge 8 commits into
Power-Agent:mainfrom
BurhanAbdullah:feat/topology-aware-security-assessment
Closed

BurhanAbdullah wants to merge 8 commits into
Power-Agent:mainfrom
BurhanAbdullah:feat/topology-aware-security-assessment

Conversation

@BurhanAbdullah

Copy link
Copy Markdown
Contributor

Summary

Introduces a topology-aware N-1 security assessment for the pandapower MCP server, replacing the previous basic contingency loop with a structured assessment of post-contingency network security.

The implementation identifies switch-aware network islands before attempting power flow, quantifies unsupplied load, and evaluates operational limit violations for bus voltages, lines, and transformers.

What changed

  • Topology-aware island detection: Uses pandapower's switch-aware network graph to identify disconnected components following an outage.
  • Unsupplied load assessment: Identifies load-bearing islands without an active external grid or slack generator and reports the associated unsupplied demand.
  • Post-contingency limit checks: Evaluates bus voltage limits, line loading, and two- and three-winding transformer loading.
  • Element-specific limits: Respects configured bus voltage and equipment loading limits, with configurable fallback thresholds.
  • Deterministic assessment: Produces consistently ordered results with separate severity indicators for unsupplied load, voltage violations, and thermal overloads.
  • Network-state isolation: Runs each contingency on a deep copy so the original network is not modified.
  • Explicit N-1 scope: Rejects N-2 requests rather than silently treating them as independent N-1 outages.
  • MCP integration: Exposes the assessment through run_contingency_analysis, retaining the existing tool entry point while adding configurable assessment limits.

Testing

Adds focused tests covering:

  • Deterministic results and preservation of the original network state.
  • Islanding detection and unsupplied-load reporting.
  • Exclusion of static generation from unserved demand.
  • Element-specific line-loading limits.
  • Rejection of invalid voltage limits.

Scope and limitations

This implementation evaluates single-element outages (N-1). It does not implement simultaneous N-2 contingencies or automatic corrective switching, redispatch, or remedial action schemes. Results are based on the supplied pandapower network model and its configured operating point.

@BurhanAbdullah BurhanAbdullah changed the title Feat/topology aware security assessment Topology aware security assessment Nov 14, 2026
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.

1 participant