pub fn apply_opf_dispatch(
network: &mut Network,
sol: &OpfSolution,
) -> Result<(), ApplySolutionError>Expand description
Apply an OPF solution’s generator dispatch and (optionally) bus voltages
back into a Network.
Only in-service generators are updated. When generator identity metadata is
present in the solution, dispatch is matched by (bus, machine_id) rather
than by the current generator array order. Bus voltages are stamped by
external bus number when either voltage vector is populated.