Skip to main content

apply_dispatch_mw

Function apply_dispatch_mw 

Source
pub fn apply_dispatch_mw(
    network: &mut Network,
    gen_p_mw: &[f64],
) -> Result<(), ApplySolutionError>
Expand description

Apply a generator dispatch vector (MW, one per in-service generator) to the network.

Use this with SCED/SCUC period results:

apply_dispatch_mw(network, &period.gen_p_mw)?;

Only in-service generators are updated. Out-of-service generators are skipped and do not consume an index from gen_p_mw.