Open degorelick opened 4 years ago
Hi Dave, thanks a lot for submitting the issue. I think that having one vector for each would make the input more organized, don't you think? I believe this would also simplify the code. Would you be able to create a unit test for this and submit a pull request with your bug fix?
In the case where a utility has (a) projects triggered by both ROF and demand and (b) the number of ROF-triggered projects differs than the number of demand-triggered projects, this routine will always throw an error.
Suggested solution: the function argument infra_construction_triggers is passed from the Utility constructor. If ROF project triggers are always placed first in this vector when a utility object is created in the Problem class, followed by demand triggers, the process to build a standard infra_construction_triggers_new within the rearrangeInfraRofVector function can be changed, replacing lines 146-161 of InfrastructureManager.cpp of the master to: