Skip to main content

apply_bus_load_active_power

Function apply_bus_load_active_power 

Source
pub fn apply_bus_load_active_power<T>(
    module: &mut PioModule<T>,
    bus: BusId,
    total: ActivePower,
    allocation: LoadAllocation,
) -> Result<UpdateReport, Error>
Expand description

Replace the aggregate active demand at one bus using an explicit allocation rule, then apply the resulting load updates atomically to the module.

Only in service loads participate. The returned report names every load whose active demand changed. No load is selected by table position.

ยงErrors

The bus is unknown, the bus has no in service load, a participating load lacks a persistent identity, or the selected allocation rule has no valid basis.