Closed allenmlowe closed 6 months ago
Thanks @allenmlowe . There was a bug in the newly added validation check on tank min/max levels being within the limits of the tank's volume curve. A fix has just been added to the dev
branch.
Thank you @LRossman for the prompt response.
The bug fix for this issue, checking that a tank's min/max levels are within its volume curve, was producing a false negative when a level limit was exactly equal to a curve's min or max level. As best as I can tell this was due to numerical round off in the test expression:
if ((tank->Hmin - elev) * pr->Ucf[ELEV] < curve->X[0] ||
(tank->Hmax - elev) * pr->Ucf[ELEV]> curve->X[n])
{
levelerr = 1;
}
Subtracting a small amount (TINY
= 1.e-6) from the RHS of the Hmin
test and adding that amount to the RHS of the Hmax
test resolved the issue. This update has been issued as PR #777.
Error 225: invalid lower/upper levels for tank node 2
Net1-VolumeCurve.inp.txt