fn validate_demand_slices(
svd_commodities: &HashMap<CommodityID, &'_ Commodity>,
region_ids: &IndexSet<RegionID>,
demand_slices: &HashMap<(CommodityID, RegionID, TimeSliceSelection), Dimensionless>,
time_slice_info: &TimeSliceInfo,
) -> Result<()>
Expand description
Check that the DemandSliceMap
is well formed.
Specifically, check:
- It is non-empty
- For every commodity + region pair, there must be entries covering every time slice
- The demand fractions for all entries related to a commodity + region pair sum to one