fn calculate_cost_coefficient(
asset: &Asset,
year: u32,
time_slice: &TimeSliceID,
input_prices: Option<&HashMap<(CommodityID, RegionID, TimeSliceID), MoneyPerFlow>>,
) -> MoneyPerActivity
Expand description
Calculate the cost coefficient for a decision variable.
Normally, the cost coefficient is the same as the asset’s operating costs for the given year and
time slice. If input_prices
is provided then those prices are added to the flow costs for the
relevant commodities, if they are input flows for the asset.
§Arguments
asset
- The asset to calculate the coefficient foryear
- The current milestone yeartime_slice
- The time slice to which this coefficient appliesinput_prices
- Optional map of prices to include for input commodities
§Returns
The cost coefficient to be used for the relevant decision variable.