Skip to main content

build_incidence

Function build_incidence 

Source
pub fn build_incidence(
    case: &IndexedNetwork<'_>,
    conv: DcConvention,
    opts: &BuildOptions,
) -> Result<IncidenceParts>
Expand description

Build A, b, the phase shift injection, and the column→branch map.

Self-loops (from == to) are dropped. A branch whose reactance is too small to divide by has no DC susceptance the Laplacian can carry; it is skipped when opts.skip_zero_impedance is true and rejected with powerio::Error::ZeroImpedance when it is false. A tap ratio under the same bound is powerio::Error::DegenerateTap either way, as it is in Y_bus.