You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to add and remove an outage on a pump and I noticed that while I can add an outage with the add_outage function, I cannot remove it with the remove_outage function.
I would expect results_2 to have a pump without outage but this is not the case.
I found a workaround with setting the pump._user_status to LinkStatus.Open after I call pump.remove_outage(wn) but this is surely not the intended usage of the function. Is this a bug or am I using the remove_outage function incorrectly?
The text was updated successfully, but these errors were encountered:
This shows that the pump is operating when the simulation restarts. It sounds like this is not the behavior you're seeing. What version of WNTR are you using?
We're working on updates that improve handling of initial conditions for step wise simulation using the EpanetSimulator and WNTRSimulator. This will make it more clear when initial conditions are reset and when they retain values from the end of a simulation. That should remove the need to use the pump._user_status.
It's also important to keep in mind that outages defined by add_outage do not turn a pump back on unless you set the input argument add_after_outage_rule to True. This adds an additional control that reopens the pump when the outage is over. If the additional control is not added, the pump can turn back on based on other existing controls (like a control associated with a tank level).
I need to add and remove an outage on a pump and I noticed that while I can add an outage with the
add_outage
function, I cannot remove it with theremove_outage
function.My minimal example looks like this:
I would expect results_2 to have a pump without outage but this is not the case.
I found a workaround with setting the
pump._user_status
toLinkStatus.Open
after I callpump.remove_outage(wn)
but this is surely not the intended usage of the function. Is this a bug or am I using theremove_outage
function incorrectly?The text was updated successfully, but these errors were encountered: