The graph validation code in (src/graph.rs) takes the ProcessMap as an input and iterates over it, looking at the years and regions in which that process can be commissioned. Processes may be operating in years when they cannot be commissioned, however. For example, imagine a process that can only be commissioned in the first few milestone years. It may be selected by an agent, commissioned, but will then continue to operate until it is decommissioned (either by agent choice or because its lifetime has elapsed). This process would not contribute to the commodity graphs for the later years of the simulation as the code stands, which could lead to a correct model failing validation or possibly other ill effects.
If we do #927 and #929, this problem will be much easier to solve, as the set of input and output flows will be the same regardless of the year in which the process was commissioned. The alternative will be pretty painful, I think.
There is a separate problem where assets commissioned in non-milestone years (e.g. before the simulation) escape various validation checks, including those in graph.rs. We should remember when fixing this issue that it is possible for the simulation to start with some assets already commissioned though, so these may contribute to the commodity graph for e.g. the first milestone year, even if their processes don't because they can't be commissioned in this year.
The graph validation code in (
src/graph.rs) takes theProcessMapas an input and iterates over it, looking at the years and regions in which that process can be commissioned. Processes may be operating in years when they cannot be commissioned, however. For example, imagine a process that can only be commissioned in the first few milestone years. It may be selected by an agent, commissioned, but will then continue to operate until it is decommissioned (either by agent choice or because its lifetime has elapsed). This process would not contribute to the commodity graphs for the later years of the simulation as the code stands, which could lead to a correct model failing validation or possibly other ill effects.If we do #927 and #929, this problem will be much easier to solve, as the set of input and output flows will be the same regardless of the year in which the process was commissioned. The alternative will be pretty painful, I think.
There is a separate problem where assets commissioned in non-milestone years (e.g. before the simulation) escape various validation checks, including those in
graph.rs. We should remember when fixing this issue that it is possible for the simulation to start with some assets already commissioned though, so these may contribute to the commodity graph for e.g. the first milestone year, even if their processes don't because they can't be commissioned in this year.