Expand description
Weighted bus Laplacians L = A diag(w) Aᵀ, reference grounding, and the
index bookkeeping for mapping a grounded solve back to full size. For DC
power flow, w is the branch susceptance vector b, and L is the DC bus
susceptance matrix.
Built from the same A, w factors the incidence module produces, so
L and its reference-grounded form share an exact factorization.
Structs§
- Grounded
Index Map - Maps indices between the full
[0, n)space and the grounded[0, n−1)space (row/columnrremoved). Problem specific solvers use it to place a grounded solve back into full bus order.
Functions§
- build_
weighted_ laplacian L = A diag(w) Aᵀ(n×n). Withw = bthis is the DC bus susceptance matrix; withw = b²·θ_f⁻¹it is the reweighted bus LaplacianL₁from the KKT system.- ground_
at - Delete row
rand columnrfrom a square matrix, returning the(n−1)×(n−1)grounded matrix. Used to remove the slack bus so a singular Laplacian becomes SPD. The single-reference case ofground_at_each. - ground_
at_ each - Delete every row and column in
refsfrom a square matrix, returning the grounded matrix of siden − k, wherekis the count of distinct in-range references. Grounding one bus per connected component turns a singular Laplacian SPD. Grounding several buses within one component fixes several angles to zero; this is not a participation factor based slack model. - reference_
indicator - The reference indicator, length
n:1at every grounded (slack) bus,0elsewhere. The multi-reference form ofunit_vector; a downstream solver reads it to recover which buses were grounded. - unit_
vector - The unit vector
e_r, lengthn.