NLP
Solver: Ipopt
The Current-Voltage Rectangular (IVR) formulation introduces branch currents as explicit decision variables alongside rectangular voltages. Where AC and ACR express power injections as functions of voltage alone — yielding quartic polynomials in voltage components when branch flows are squared — IVR keeps currents Iij as first-class variables, reducing the algebraic degree of every nonlinearity in the problem.
Use IVR when current-based constraints dominate the problem: HVDC links with explicit current limits, cable-rated equipment in distribution networks, fault-current studies, or any system where thermal limits are naturally expressed in amperes rather than apparent power. The cost of carrying extra variables is offset by better-conditioned Jacobians on current-limited equipment, where the alternative (squared apparent-power limits in AC/ACR) introduces numerical stiffness.
Each branch (i,j) carries a complex current Iij with rectangular components (iijr, iiji). Bus current injections aggregate from incident branches plus shunts, and Kirchhoff’s current law I = YV holds component-wise:
Voltages remain in rectangular coordinates as in ACR. The Y-bus structure is unchanged, but now currents are tracked alongside voltages rather than substituted out.
With both V and I explicit, the complex-power equation Si = Vi · Ii* splits into real and imaginary parts as bilinear products of voltage and current components — degree 2 in mixed variables, not degree 4 in voltage alone:
Branch power flows follow the same pattern: Sij = Vi · Iij*, yielding bilinear expressions in (vi, Iij) rather than quartic functions of voltage. Thermal limits |Sij|² ≤ S̅² become degree-4 in Iij and vi jointly — still nonlinear, but with a structure many NLP solvers handle more robustly than the equivalent AC/ACR constraint.
The complete formulation reads:
The variable count grows: 4 components per branch (2 voltage + 2 current) plus generator dispatches. Thermal limits expressed directly on |Iij|² are convex quadratic, replacing the quartic |Sij|² constraints of AC/ACR — a key reason solvers often converge faster on IVR for current-constrained problems.
IVR’s main computational advantage is the lower polynomial degree of its nonlinearities: degree 2 for power balance, degree 2 for current-magnitude limits. Compared to ACR’s degree-4 thermal constraints and the trigonometric coupling of polar AC, IVR’s Hessian sparsity and conditioning often yield faster Ipopt convergence on networks where current limits are binding.
The tradeoff is variable count and constraint count — both roughly double those of polar AC. For lightly-constrained transmission problems where thermal limits rarely bind, this overhead provides no benefit and AC remains preferable. For distribution networks with explicit cable ratings, HVDC links, or fault studies, IVR is the natural choice and is often the only formulation that converges reliably without scaling tricks.
Solving IVR OPF on a MATPOWER case file requires a single call to solve:
using Lirion
# Solve IVR — explicit currents on a current-limited network
out = solve("case118.m"; model = ivr(), algorithm = centralized())
# Voltages and currents
vr = out.solution["bus"]["vr"]
vi = out.solution["bus"]["vi"]
ir = out.solution["branch"]["cr_fr"] # current real, from-bus
ii = out.solution["branch"]["ci_fr"] # current imag, from-bus
# Current magnitudes for cable ratings
I_mag = sqrt.(ir.^2 .+ ii.^2)
println("Objective: \$", round(out.objective, digits=2))
println("Max current: ", round(maximum(I_mag), digits=4), " p.u.") The out object follows the PowerModels.jl result schema. Branch flows are available under out.solution["branch"]["pf"].