Skip to main content

allocate

Function allocate 

Source
pub fn allocate(
    machines: &[RegulatingMachine],
    nonregulating_q: &[f64],
    buses: &[Bus],
    ybus: &YBusSparse,
) -> Vec<BusDispatch>
Expand description

Attributes each bus’s solved reactive injection to the machines holding it.

buses must be a converged solution and ybus the network it came from; this reads whatever state it is handed and cannot tell a solved network from an unsolved one, so the split of a non-converged state is meaningless rather than wrong-looking. Same contract as AcSensitivity::new.

nonregulating_q is the per-bus reactive injection that is not a regulating machine’s — cgmes::VoltageControlReport::nonregulating_q, named rather than linked because that module is behind the cgmes feature and this one is not. The machines are responsible for the solved injection minus that.