Skip to main content

calc_ptdf_lodf

Function calc_ptdf_lodf 

Source
pub fn calc_ptdf_lodf(
    case: &IndexedNetwork<'_>,
    formula: BranchSusceptanceFormula,
) -> Result<(CsMat<f64>, CsMat<f64>)>
Expand description

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.