Function add_asset_constraints

Source
pub fn add_asset_constraints<'a, I>(
    problem: &mut RowProblem,
    variables: &VariableMap,
    model: &'a Model,
    assets: I,
    year: u32,
) -> ConstraintKeys
where I: Iterator<Item = &'a AssetRef> + Clone + 'a,
Expand description

Add asset-level constraints

Note: the ordering of constraints is important, as the dual values of the constraints must later be retrieved to calculate commodity prices.

§Arguments

  • problem - The optimisation problem
  • variables - The variables in the problem
  • model - The model
  • assets - The asset pool
  • year - Current milestone year

§Returns

Keys for the different constraints.