Function add_activity_constraints

Source
pub fn add_activity_constraints(
    problem: &mut RowProblem,
    asset: &AssetRef,
    capacity_var: Col,
    activity_vars: &IndexMap<TimeSliceID, Col>,
)
Expand description

Adds activity constraints to the problem.

Constrains the activity variables to be within the asset’s activity limits.

The behaviour depends on whether the asset is commissioned or a candidate:

  • For an commissioned asset, the activity limits have fixed bounds based on the asset’s (fixed) capacity.
  • For a candidate asset, the activity limits depend on the capacity of the asset, which is itself variable. The constraints are therefore applied to both the capacity and activity variables. We need separate constraints for the upper and lower bounds.