Sienna-Platform / Sienna-Platform/PowerOperationsModels.jl

Confirm post-contingency flows are correct when the outaged branch is itself a phase shifter

Open
#231 0 comments 0 reactions 2 assignees View on GitHub

@acostarelli is already working on this.

Since Aug 10, 2026.

Testing
Dominant language
Julia
Stars
2
Forks
1
Avg merge
1d 16h
Merged PRs (30d)
26

Description

#225 added DC phase-shift equivalent injections (+b·φ at from, −b·φ at
to) to the nodal balance, with a matching −b·φ offset on each
monitored branch's own flow at
src/ac_transmission_models/security_constrained_branch.jl:580. Two
cases were never verified:

  1. Outaged phase shifter. The injection vector handed to the MODF
    builder still carries the ±b·φ pair of every shifted arc, including
    the outaged one. If a contingency removes a phase shifter, its
    injections arguably should come out of the post-contingency vector. If
    they don't, post-contingency flows on all monitored branches are
    wrong — silently, with plausible-looking numbers.
  2. DCP networks. add_post_contingency_flow_expressions! for
    DCPNetworkModel builds the vector via _dcp_nodal_injection_expressions
    (:705, defined :771) rather than using the ActivePowerBalance
    expression directly, so it may not contain the shift injections at all
    — while :580 still subtracts the offset.

May well be correct; it has simply never been tested. Note this is a
net improvement regardless — before #225, phase shifts were ignored
entirely in PTDF/MODF flows.

Acceptance: a test registering a contingency on a phase-shifting
transformer, comparing the monitored post-contingency flow against an
independent computation, under both PTDFNetworkModel and
DCPNetworkModel.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.