fn iter_existing_asset_max_prices<'a, I>(
activity_for_existing: I,
markets_to_price: &HashSet<(CommodityID, RegionID)>,
existing_prices: &CommodityPrices,
year: u32,
commodities: &CommodityMap,
pricing_strategy: &PricingStrategy,
annual_activities: Option<&HashMap<AssetRef, Activity>>,
) -> impl Iterator<Item = ((CommodityID, RegionID, TimeSliceSelection), MoneyPerFlow)> + 'aExpand description
Calculate prices as the maximum cost across existing 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 activity
(with a backup weight based on potential activity if there is zero activity across the
selection, and omitting prices in the extreme case of zero potential activity).
§Arguments
activity_for_existing- Iterator over (asset, time slice, activity) tuples for existing assetsmarkets_to_price- Set of (commodity, region) pairs to attempt to priceexisting_prices- Current commodity prices (used to calculate marginal costs)year- Year for which prices are being calculatedcommodities- Commodity mappricing_strategy- Pricing strategy, eitherMarginalCostorFullCostannual_activities- Optional annual activities (required for full cost pricing)
§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 where a price could be determined.