pub fn envelope_now(
instruction: &Instruction,
quantity: CommodityQuantity,
) -> Result<(Power, Power), InstructError>Expand description
The nearest-term ceiling a PEBC instruction imposes, for the given commodity.
S2 sends a whole envelope over time; the arbiter runs now, so the element in force now is the one that matters. The rest belongs to the optimiser, which takes it as a forecast rather than a command.
§Errors
InstructError::NoMatchingEnvelope or InstructError::EmptyEnvelope.