fn prepare_commodities_graph_for_validation(
base_graph: &Graph<GraphNode, GraphEdge, Directed>,
processes: &ProcessMap,
commodities: &CommodityMap,
time_slice_info: &TimeSliceInfo,
region_id: &RegionID,
year: u32,
time_slice_selection: &TimeSliceSelection,
) -> Graph<GraphNode, GraphEdge, Directed>
Expand description
Prepares a graph for validation with validate_commodities_graph
.
It takes a base graph produced by create_commodities_graph_for_region_year
, and modifies it to
account for process availabilities and commodity demands within the given time slice selection,
returning a new graph.
Commodity demands are represented by the Demand
node. We only add edges to the Demand
node
for commodities with the same time_slice_level as the selection. Other demands can be ignored
since this graph will only be validated for commodities with the same time_slice_level as the
selection.