add_model_constraints

Function add_model_constraints 

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

Add constraints for the dispatch model.

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
  • markets_to_balance - The subset of markets to apply balance constraints to
  • year - Current milestone year

§Returns

Keys for the different constraints.