If you have a model which uses open/close controls on a GPV valve, using en_saveinpfile will create controls that references the index of the head loss curve instead of the status.
Original Controls
[CONTROLS]
LINK THE_VALVE Open If Node VALVE_DOWN Below 0
LINK THE_VALVE Closed If Node VALVE_DOWN Above 10
EN_saveinpfile Controls
[CONTROLS]
LINK THE_VALVE 2.0000 IF NODE VALVE_DOWN BELOW 0.0000
LINK THE_VALVE 2.0000 IF NODE VALVE_DOWN ABOVE 10.0000
The replit below runs a working network with a controlled GPV, saves it as a new INP and attempt to open it, which fails. You can see the original INP network.inp and the generated one network-by-toolkit.inp on the side panel
If you have a model which uses open/close controls on a GPV valve, using
en_saveinpfile
will create controls that references the index of the head loss curve instead of the status.Original Controls
EN_saveinpfile Controls
The replit below runs a working network with a controlled GPV, saves it as a new INP and attempt to open it, which fails. You can see the original INP
network.inp
and the generated onenetwork-by-toolkit.inp
on the side panelhttps://replit.com/@lbutler1/epanet-devGPV-save-inp#main.c