add_scarcity_adjusted_prices

Function add_scarcity_adjusted_prices 

Source
fn add_scarcity_adjusted_prices<'a, I>(
    activity_duals: I,
    shadow_prices: &CommodityPrices,
    existing_prices: &mut CommodityPrices,
    markets_to_price: &HashSet<(CommodityID, RegionID)>,
)
where I: Iterator<Item = (&'a AssetRef, &'a TimeSliceID, MoneyPerActivity)>,
Expand description

Calculate scarcity-adjusted prices for a set of commodities and add to an existing prices map.

ยงArguments

  • activity_duals - Iterator over activity duals from optimisation solution
  • shadow_prices - Shadow prices for all commodities
  • existing_prices - Existing prices map to extend with scarcity-adjusted prices
  • markets_to_price - Set of markets to calculate scarcity-adjusted prices for