Function add_asset_constraints

Source
pub fn add_asset_constraints(
    problem: &mut RowProblem,
    variables: &VariableMap,
    model: &Model,
    assets: &AssetPool,
    year: u32,
) -> (Vec<(CommodityID, RegionID, TimeSliceSelection)>, Vec<(AssetID, TimeSliceID)>)
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:

  • A vector of keys for commodity balance constraints
  • A vector of keys for capacity constraints