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
Does AC OPF need the energized-branch angle gate that #63 added to DC? #73
Follow-up question raised while reviewing #71 (which closes #63). Filing to decide whether AC needs the same treatment — not asserting a bug.
Background
#63 found that DC gated phase angle difference limits by sw alone while the energized-island partition used b[e] * sw[e] != 0. A zero-susceptance branch could therefore split the topology while still coupling its endpoint angles, leaving the solved model inconsistent with its KKT and sensitivity systems. #71 fixes this by introducing an effective gate sw_eff[e] = sw[e] when b[e] * sw[e] != 0 and zero otherwise, and threading it through the model build, KKT residuals, the analytical Jacobian, the switching and susceptance parameter Jacobians, and the LMP congestion decomposition.
The AC side
AC still gates its angle difference limits by sw alone, in both backends:
ExaModels: src/types/ac_opf_problem.jl:704-709, same b.sw scaling on both sides.
The question
Is there an AC analogue of the DC failure mode? The DC case hinges on a branch that is topologically present (sw != 0) but carries no power (b == 0), so it must not couple angles. AC branch admittance comes from r/x rather than a single b vector, so the equivalent condition is less direct — it would need a branch whose series admittance is zero (or whose g_br/b_br both vanish) while sw != 0.
Concretely, worth checking:
Can the parsers produce an AC branch with zero series admittance that survives validation? If not, this may be unreachable in practice and the answer is "document it, change nothing".
Does AC have an energized-island / reference-bus partition that could disagree with the sw-only angle gate the way DC's did? DC's _is_energized (src/types/dc_network.jl:662) is the predicate that drove the inconsistency; AC's reference handling uses ref_bus_keys fixed at construction.
If a gate is warranted, the DC-side derivative convention in Gate DC angle limits by energized branches #71 (_angle_difference_gate_dsw) and its documented behavior at the nonsmooth boundary would be the model to follow, and the same consistency sweep would apply to the AC KKT residual, analytical Jacobian, and :sw parameter Jacobian — including the matrix-free _acopf_vjp/_acopf_jvp paths.
No AC code was changed in #71 or its follow-up; this is purely a scoping question.
Activity