Skip to main content

Module sensitivity

Module sensitivity 

Source
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§

SensitivityMatrices
PTDF/LODF matrices plus metadata for serialized outputs.
SensitivityMatrixMetadata
Shape and pruning metadata for one sensitivity matrix.
SensitivityMetadata
Metadata describing a sensitivity build.
SensitivityOptions
Options for PTDF/LODF builders that expose solver choice and output pruning.

Enums§

SensitivitySolver
Solver selection for option based DC sensitivity builds.
SensitivitySolverPath
Solver path actually used for a sensitivity build.

Functions§

calc_lodf
LODF (m × m): pre-outage flow on branch k redistributes onto branch l with factor LODF[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 (the sensitivities bundle), this factors the grounded DC bus susceptance matrix once instead of paying the factorization twice across separate calc_ptdf/calc_lodf calls.
calc_ptdf_lodf_with_options
PTDF and LODF with solver selection, drop tolerance, and output metadata.