Expand description
DC sensitivity matrices.
PTDF maps nodal injections to branch flows (f = PTDF · p); LODF maps a
branch outage to the flow it redistributes onto the others. Both come from
the reference grounded DC bus susceptance matrix
ABA = ground_with(L, refs): one row/column removed per reference bus.
Every builder routes through the same solver selection: a dense Cholesky
(with dense Gaussian elimination as the nonsingular indefinite fallback)
below the Auto ceilings, and a sparse Cholesky factored once and reused
across every right hand side above them. Disconnected networks with one
reference per island are supported.
Several references in one island are fixed angle buses; this is not a
participation factor based distributed slack model.
Structs§
- Sensitivity
Matrices - PTDF/LODF matrices plus metadata for serialized outputs.
- Sensitivity
Matrix Metadata - Shape and pruning metadata for one sensitivity matrix.
- Sensitivity
Metadata - Metadata describing a sensitivity build.
- Sensitivity
Options - Options for PTDF/LODF builders that expose solver choice and output pruning.
Enums§
- Sensitivity
Solver - Solver selection for option based DC sensitivity builds.
- Sensitivity
Solver Path - Solver path actually used for a sensitivity build.
Functions§
- calc_
lodf - LODF (
m × m): pre-outage flow on branchkredistributes onto branchlwith factorLODF[l, k]. Diagonal is−1. A branch whose outage islands the network (denominator≈ 0) gets a zero column. - calc_
ptdf - PTDF (
m × n): branch flows from nodal injections,f = PTDF · p. Every reference bus column is zero. The DC bus susceptance matrix is grounded at the whole reference set (reference_bus_indices), one row/column per slack. One reference per island handles disconnected networks; several references within one island fixes all of those bus angles to zero. - calc_
ptdf_ lodf - Both DC sensitivity matrices
(PTDF, LODF)from one DC bus susceptance matrix factorization. When a caller needs both for the same case (thesensitivitiesbundle), this factors the grounded DC bus susceptance matrix once instead of paying the factorization twice across separatecalc_ptdf/calc_lodfcalls. - calc_
ptdf_ lodf_ with_ options - PTDF and LODF with solver selection, drop tolerance, and output metadata.