fn flatten_preset_demands_for_year(
commodities: &CommodityMap,
time_slice_info: &TimeSliceInfo,
year: u32,
) -> IndexMap<(CommodityID, RegionID, TimeSliceID), Flow>
Expand description
Flatten the preset commodity demands for a given year into a map of commodity, region and time slice to demand.
Since demands for some commodities may be specified at a coarser time slice level, we need to distribute these demands over all time slices. Note: the way that we do this distribution is irrelevant, as demands will only be balanced to the appropriate level, but we still need to do this for the solver to work.
TODO: these assumptions may need to be revisited, e.g. when we come to storage technologies