Skip to main content

build_ptdf_lodf

Function build_ptdf_lodf 

Source
pub fn build_ptdf_lodf(
    case: &IndexedNetwork<'_>,
    conv: DcConvention,
) -> Result<(CsMat<f64>, CsMat<f64>)>
Expand description

Both DC sensitivity matrices (PTDF, LODF) from a single Laplacian factorization. When a caller needs both for the same case (the sensitivities bundle), this factors and inverts the grounded Laplacian once instead of paying the O(n³) twice across separate build_ptdf/build_lodf calls.