OpenWaterAnalytics / EPANET

The Water Distribution System Hydraulic and Water Quality Analysis Toolkit
MIT License
279 stars 204 forks source link

request additional api functions for enabling/disabling rules and controls nondestructively #682

Closed samhatchett closed 11 months ago

samhatchett commented 2 years ago

The new rules/controls API functions are great - however in my application I have a need to be able to selectively enable and disable these rules/controls individually after load-time without removing them entirely.

I have example code that could enter into a PR.

eladsal commented 2 years ago

So you will add a new property for a rule\control, like active?

samhatchett commented 2 years ago

that's right - it would be a new property on those structures to signify whether it is enabled. The enabled/disabled state would not be saved in any way into an INP file however - I suppose the default of "enabled" would ensure backwards compat.