Sienna-Platform / Sienna-Platform/PowerOperationsModels.jl
Confirm post-contingency flows are correct when the outaged branch is itself a phase shifter
@acostarelli is already working on this.
Since Aug 10, 2026.
- 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:
- 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. - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.