APSLF Bridge Reference

Public API

Sparlectra.ApslfSolverType
ApslfSolver <: AbstractExternalSolver

Adapter that runs a PFModel through AnalyticLoadFlow.jl's solve_pf_apslf.

Fields:

  • order::Int = 40: highest power-series coefficient to compute.
  • use_pade::Bool = true: evaluate the voltage series via Padé [L/M] approximants instead of direct Taylor summation.
  • nr_polish::Bool = true: run a Newton-Raphson polishing step on the series result.
  • mode::Symbol = :direct: :direct (native PV handling) or :outer (PQ-only series plus an outer secant loop for PV enforcement); forwarded to solve_pf_apslf.

apslf_solver is the keyword constructor for it.

source
Sparlectra.solvePfMethod
solvePf(solver::ApslfSolver, model::PFModel; kwargs...) -> PFSolution

Solve model with AnalyticLoadFlow.jl's analytic power-series solver.

Maps the canonical PFModel fields onto the AnalyticLoadFlow spec via _apslf_spec_from_model. The returned voltage vector is in the same PF ordering as model.busIdx_net.

model.V0 is not used: AnalyticLoadFlow always starts from the canonical analytic germ V(s=0) = 1∠0 and does not accept an external start voltage.

meta carries solver-specific diagnostics: the series/Padé order, an APSLF stability indicator (dmin/pole/bus/level, derived from the distance of Padé poles to the physical evaluation point s = 1), and NR-polish bookkeeping (enabled/success/improved/rejected/reject_reason).

Extra kwargs (e.g. tol forwarded by runpf_external!) are accepted and ignored; convergence/polish behavior is controlled entirely via the ApslfSolver fields.

source

Internals

Sparlectra._apslf_spec_from_modelMethod
_apslf_spec_from_model(model::PFModel) -> NamedTuple

Pure mapping from the canonical PFModel fields onto the AnalyticLoadFlow spec expected by solve_pf_apslf: Ybus → Y, busType → bustype, real/imag(Sspec) → Pspec/Qspec, Vset → Vm, qmin_pu/qmax_pu → Qmin/Qmax (defaulting to -Inf/Inf when model carries no Q-limits), slack_idx → slack. Split out from solvePf so the mapping itself is independently testable.

source