fn iter_candidate_asset_min_prices<'a, I>(
activity_keys_for_candidates: I,
markets_to_price: &HashSet<(CommodityID, RegionID)>,
existing_prices: &CommodityPrices,
priced_groups: &HashSet<(CommodityID, RegionID, TimeSliceSelection)>,
year: u32,
commodities: &CommodityMap,
pricing_strategy: &PricingStrategy,
) -> impl Iterator<Item = ((CommodityID, RegionID, TimeSliceSelection), MoneyPerFlow)>Expand description
Calculate prices as the minimum cost across candidate assets, using either a marginal cost or
full cost strategy (depending on pricing_strategy). Prices are given for each commodity in
the granularity of the commodity’s time slice level. For seasonal/annual commodities, this
involves taking a weighted average across time slices for each asset according to potential
activity (i.e. the upper activity limit), omitting prices in the extreme case of zero potential
activity (Note: this should NOT happen as validation should ensure there is at least one
candidate that can provide a price in each time slice for which a price could be required).
Costs for candidates are calculated assuming full utilisation.
§Arguments
activity_keys_for_candidates- Iterator over (asset, time slice) tuples for candidate assetsmarkets_to_price- Set of (commodity, region) pairs to attempt to priceexisting_prices- Current commodity prices (used to calculate marginal costs)priced_groups- Set of (commodity, region, time slice selection) groups that have already been priced using existing assets, so should be skipped when looking at candidatesyear- Year for which prices are being calculatedcommodities- Commodity mappricing_strategy- Pricing strategy, eitherMarginalCostorFullCost
§Returns
An iterator of ((commodity, region, time slice selection), price) tuples for the calculated
prices. This will include all (commodity, region) combinations in markets_to_price for
time slice selections not covered by priced_groups, and for which a price could be determined