Skip to main content

calc_reference_constrained_system

Function calc_reference_constrained_system 

Source
pub fn calc_reference_constrained_system(
    laplacian: &SparseMatrix,
    reference_rows: &[usize],
    reference_va: &[f64],
    injection: &[f64],
) -> ReferenceConstrainedSystem
Expand description

The reference constrained linear system of a DC power flow over a bus Laplacian L with positive branch weights: L with the reference rows and columns removed, and at each retained row the right hand side injection - (L va_ref), where va_ref holds each reference row’s angle, radians, and zero elsewhere. injection is the full length nodal power the angles must carry (net injection less every fixed withdrawal), per unit; reference_va is aligned with reference_rows. Solving matrix · va = rhs gives the retained angles with each reference fixed at its stated angle. DcOperators::calc_reference_constrained_system is this over the instance’s operators.

§Panics

injection shorter than the Laplacian’s row count, or a reference row outside it.