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. The default public builders keep the dense Cholesky path, with dense Gaussian elimination as the nonsingular indefinite fallback. Option based builders can choose an iterative path that solves one grounded right hand side at a time and writes directly into sparse output. 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§

build_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.
build_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.
build_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 and inverts the grounded DC bus susceptance matrix once instead of paying the O(n³) twice across separate build_ptdf/build_lodf calls.
build_ptdf_lodf_with_options
PTDF and LODF with solver selection, drop tolerance, and output metadata.