I am creating a code that optimally places PRVs within a network. The code however is trying to replace a link next to an existing PRV, which gives the error: ’ Error 220: function call contains illegal valve connection to another valve’.
I am using a for loop to test each pipe individually and, from the results, use the PRV with the highest pressure reduction to be permanently placed in the network. I would like to ‘skip’ certain linkID’s that are connected to existing valves to bypass this error.
How would I do this?