fn validate_commodities_graph(
graph: &Graph<GraphNode, GraphEdge, Directed>,
commodities: &CommodityMap,
time_slice_level: TimeSliceLevel,
) -> Result<()>
Expand description
Validates that the commodity graph follows the rules for different commodity types.
It takes as input a graph created by create_commodities_graph_for_validation
, which is built
for a specific time slice selection (must match the time_slice_level
passed to this function).
The validation is only performed for commodities with the specified time slice level. For full
validation of all commodities in the model, we therefore need to run this function for all time
slice selections at all time slice levels. This is handled by
build_and_validate_commodity_graphs_for_model
.