USEPA / EPANET2.2

Perform extended-period simulation of the hydraulic and water quality behavior within drinking water distribution systems
142 stars 52 forks source link

Unexpected simulation error for Tank with volume curve and CanOverflow #64

Open pajarrige opened 5 months ago

pajarrige commented 5 months ago

When a model contains one or more tank with a volume curve AND CanOverflow attribute, it cannot be simulated from GUI:

lbutler commented 2 months ago

This bug is caused by Line 402 the following section of code: https://github.com/USEPA/EPANET2.2/blob/0086aec2d53afda601a446b8b581721d69260de2/Delphi_GUI/epanet2w/Uexport.pas#L398-L407

The Format function is missing the % character and the line should be rewritten like so:

else s := s + Format('%-16s'#9, [Data[TANK_VCURVE_INDEX]]);

I tested this over at the OWA EPANET GUI and was able to fix the bug.