muse2::input::commodity::demand

Function compute_demand_maps

Source
fn compute_demand_maps(
    demand: &AnnualDemandMap,
    slices: &DemandSliceMap,
    time_slice_info: &TimeSliceInfo,
) -> HashMap<Rc<str>, DemandMap>
Expand description

Calculate the demand for each combination of commodity, region, year and time slice.

§Arguments

  • demand - Total annual demand for combinations of commodity, region and year
  • slices - How annual demand is shared between time slices
  • time_slice_info - Information about time slices

§Returns

DemandMaps for combinations of region, year and time slice, grouped by the commodity to which the demand applies.