Skip to main content

run_dispatch_for_year

Function run_dispatch_for_year 

Source
fn run_dispatch_for_year(
    model: &Model,
    assets: &[AssetRef],
    candidates: &[AssetRef],
    year: u32,
    writer: &mut DataWriter,
) -> Result<(Prices, FlowMap)>
Expand description

Run dispatch to get flows and prices for a milestone year.

Tries to get commodity flows from a dispatch run which just includes existing assets and prices from a run with both existing and candidate assets. If either flows or prices cannot be calculated, empty maps are returned.

Fully mothballed assets or mothballed units thereof are excluded.