Rectangular Power Flow Reference
Sparlectra.runpf_rectangular! — Function
runpf!(net, maxIte, tolerance=1e-6, verbose=0; method=:rectangular)Unified AC power flow interface.
Arguments:
net::Net: networkmaxIte::Int: maximum iterationstolerance::Float64: mismatch toleranceverbose::Int: verbosity levelmethod::Symbol: must be:rectangularautodamp::Bool: enable residual-based backtracking for rectangular Newton stepsautodamp_min::Float64: minimum automatic damping factor whenautodamp = trueqlimit_start_iter::Int: first Newton iteration where PV→PQ Q-limit switching may run in:iterationmodeqlimit_start_mode::Symbol::iteration,:auto, or:iteration_or_autostart criterion for PV→PQ switchingqlimit_auto_q_delta_pu::Float64: PV reactive-power request change threshold for automatic switching start
Notes:
- Link-flow recovery (
calcLinkFlowsKCL!) is method-agnostic and uses solved PF results. - If active-link merges create internal isolated buses, the rectangular sparse solver remains the only supported PF path; there is no polar fallback.
Returns: (iterations::Int, status::Int) where status == 0 indicates convergence.