Skip to main content

merge_zero_impedance_buses

Function merge_zero_impedance_buses 

Source
pub fn merge_zero_impedance_buses(
    network: &BalancedNetwork,
) -> Result<(BalancedNetwork, ZeroImpedanceMerge, Vec<Diagnostic>), Error>
Expand description

Merge every group of buses joined by in service branches with zero series impedance (r == 0 and x == 0, self loops and off-nominal transformers excluded) into that group’s smallest bus id, rewriting every element reference and dropping the merged buses and the zero impedance branches.

The survivor takes the strongest bus kind of its group (reference, then PV, then PQ). A branch whose two buses the merge joined through other branches is removed as well, and a removed branch’s line charging becomes a fixed shunt at the survivor.

The flow through a removed branch is no longer a variable of any derived calculation, and merged buses may have stated different attributes; both are reported as diagnostics, one per removed branch and one per group whose base voltages differ. The input network is never mutated. [BalancedNetwork::merge_buses] is the general form, which also merges closed switches, applies a stated threshold, and recovers removed flows.

§Errors

A zero impedance branch naming a bus the network does not declare.