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
We are trying to run a trace analysis on a large network and update it regularly as new data arrives, using the EPANET toolkit. In order to do that efficiently, we would like store the values at the end of a run, and initialize the initial trace value at each node using the values stored (i.e. hot-start the model).
We were hoping to use EN_INITQUAL, but it seemed do be ignored when doing a trace analysis (and only then, it seems to work fine on water age and chemical analysis). After looking at the code, we saw that indeed setting the initial quality value in that case is explicitely prevented in the source code:
if (qual->Qualflag==TRACE) qual->NodeQual[i] =0.0;
elsequal->NodeQual[i] =net->Node[i].C0;
Do you know why this limitation has been added? Is there another way to achieve the desired result? I don't understand why EPANET would allow setting initial quality value for chemical simulation and not for trace, to me both seem very similar.
The text was updated successfully, but these errors were encountered:
A possible work around is to set up your model to simulate a conservative (non-reactive) chemical whose concentration is a constant value of 100 at the source node. If that node is a Reservoir node then you simply set its initial concentration to 100. If it is a Junction or Tank node then you add a SETPOINT source to it whose baseline value is 100. The simulated concentration results would be interpreted as percent of water from the source node, not as an actual concentration.
Thank you for the fast answer! We were thinking of such a workaround but it is reassuring to hear it from you, we will try that.
I still wonder about the reason for this limitation, we would not want to stumble across an issue that was already dealt with in the past. Is it something that could be removed ideally or is there a good reason for it?
not sure if this is exactly what's being asked, but it is absolutely possible to set network-wide quality conditions on-the-fly using the API.
My use case was making a long-running simulation to be resilient to process lifecycle interruptions (powercycle / container restart etc.). So when the process executes it will check for existing state saved somewhere and load it back into the epanet model. Snippet here:
We are trying to run a trace analysis on a large network and update it regularly as new data arrives, using the EPANET toolkit. In order to do that efficiently, we would like store the values at the end of a run, and initialize the initial trace value at each node using the values stored (i.e. hot-start the model).
We were hoping to use EN_INITQUAL, but it seemed do be ignored when doing a trace analysis (and only then, it seems to work fine on water age and chemical analysis). After looking at the code, we saw that indeed setting the initial quality value in that case is explicitely prevented in the source code:
EPANET/src/quality.c
Lines 137 to 138 in fbd005d
Do you know why this limitation has been added? Is there another way to achieve the desired result? I don't understand why EPANET would allow setting initial quality value for chemical simulation and not for trace, to me both seem very similar.
The text was updated successfully, but these errors were encountered: