Skip to main content

price_cycle

Function price_cycle 

Source
fn price_cycle(
    model: &Model,
    solution: &Solution<'_>,
    year: u32,
    markets: &[(CommodityID, RegionID)],
    shadow_prices: &CommodityPrices,
    annual_activities: &mut Option<HashMap<AssetRef, Activity>>,
    result: &mut CommodityPrices,
)
Expand description

Calculate prices for a set of cyclically-dependent markets, updating result.

Markets should be ordered in the input slice according to the direction of dependencies (downstream markets first) as solved by order_sccs. Prices are calculated in the reverse of this order (i.e. upstream markets first), with an iterative loop to allow for feedback between markets.