validate_commodity_levy_map

Function validate_commodity_levy_map 

Source
fn validate_commodity_levy_map(
    map: &CommodityLevyMap,
    regions: &IndexSet<RegionID>,
    milestone_years: &[u32],
    time_slice_info: &TimeSliceInfo,
) -> Result<()>
Expand description

Validate that the commodity levy map contains entries for all regions, years and time slices.

§Arguments

  • map - The commodity levy map to validate
  • regions - The set of regions that should be covered
  • milestone_years - Milestone years used by the model
  • time_slice_info - Time slice configuration

§Returns

Ok(()) if the map is valid; an error if any entries are missing.