OpenWaterAnalytics / EPANET

The Water Distribution System Hydraulic and Water Quality Analysis Toolkit
MIT License
273 stars 203 forks source link

Bugs in project.c's setcontrol function #731

Closed LRossman closed 1 year ago

LRossman commented 1 year ago

The setcontrolfunction in project.c, called by the EN_addcontrol and EN_setcontrol API functions, fails to assign the units-adjusted control setting value and the head-adjusted tank setting value to the simple control whose parameters it assigns to a Scontrolstruct. More specifically, in line 1222 setting should be replaced with s and in line 1224 level should be replaced with lvl.

LRossman commented 1 year ago

My bad -- the devbranch has no setcontrolfunction in project.c. I added the function to a local branch I am working on to address issue #730 and got confused when I found some bugs in it. I'm therefore closing this bug issue since it doesn't apply to any code currently residing in the project's repository.