Skip to content

Support N-1 for outage on PST with PTDF networks - #312

Merged
jd-lara merged 3 commits into
mainfrom
mb/n-1-pst
Sep 21, 2026
Merged

jd-lara merged 3 commits into
mainfrom
mb/n-1-pst

Conversation

@m-bossart

Copy link
Copy Markdown
Contributor

Will require Sienna-Platform/PowerNetworkMatrices.jl#370 for tests to pass

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.

🟡 Changes recommended

Critical issues remain in the parallel-branch correction logic and a test expression.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds PTDF N-1 support for phase-shifting transformer outages, with validation updates and regression tests.

Changes:

  • Adjusts PTDF post-contingency flows for removed phase-shift injections.
  • Updates DCP/DCPLL validation behavior.
  • Adds static, controlled, parallel, and monitored-outage tests.
  • Relocates a runtime helper without behavioral changes.
File summaries
File Summary
test/test_phase_control.jl Adds phase-shifter outage regression coverage.
src/operation/template_validation.jl Updates DCP/DCPLL validation behavior.
src/event_models/event_runtime.jl Relocates a helper without behavioral change.
src/ac_transmission_models/security_constrained_branch.jl Implements PTDF outage shift adjustments.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +569 to +574
# A monitored arc that loses a shifted member also loses that member's share of
# its own `-b·α` flow offset.
own = adj.arc == rep.arc ? -1.0 : 0.0
for t in time_steps
JuMP.add_to_expression!(expressions[t], sensitivity + own, adj.delta[t])
end

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case (controlled transformer in parallel with another branch) is disallowed.

Comment thread test/test_phase_control.jl Outdated
@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown

Performance Results

Version Precompile Time
Main 4.152702897
This Branch 4.146480039
Version Build Time
Main-Build Time Precompile 66.633839475
Main-Build Time Postcompile 0.873307843
This Branch-Build Time Precompile 68.259715467
This Branch-Build Time Postcompile 0.873078866
Version Solve Time
Main-Solve Time Precompile 112.193212321
Main-Solve Time Postcompile 87.209233775
This Branch-Solve Time Precompile 111.324730194
This Branch-Solve Time Postcompile 75.893109181

@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.77778% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...transmission_models/security_constrained_branch.jl 97.72% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@jd-lara
jd-lara merged commit 1621d73 into main Sep 21, 2026
8 checks passed
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.

3 participants