Closed LRossman closed 1 year ago
Can this not already be done with EN_getdemandmodel() and EN_setdemandmodel()?
I remember using them as part of a test when adding support for changing pressure units. Admittedly, it has to be done in bulk, and maybe you would want to set them individually
Thank you @lbutler . Perhaps this is a sign that there are too many API functions and it's hard to remember them all or that my brain is turning to mush (more likely the latter).
The minimum and required pressure limits and the pressure exponent for Pressure Driven Analysis can be specified in an EPANET input file but there is currently no way to get/set their values using the API. This can be fixed by adding
EN_MIN_PRESS,
EN_REQ_PRESS
, andEN_PRESS_EXPON
to theEN_OPTION
enumeration in _epanet2enums.h and using the existing functionsEN_getoption
andEN_setoption
to get/set their values.