Function read_demand_from_iter

Source
fn read_demand_from_iter<I>(
    iter: I,
    svd_commodity_ids: &HashSet<CommodityID>,
    region_ids: &HashSet<RegionID>,
    milestone_years: &[u32],
) -> Result<HashMap<(CommodityID, RegionID, u32), f64>>
where I: Iterator<Item = Demand>,
Expand description

Read the demand data from an iterator.

§Arguments

  • iter - An iterator of Demands
  • commodity_ids - All possible IDs of commodities
  • region_ids - All possible IDs for regions
  • milestone_years - All milestone years

§Returns

The demand for each combination of commodity, region and year along with a HashSet of all commodity + region pairs included in the file.