-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use appropriate demand values for single-time water model #95
Comments
BTW, reservoir head can also be assigned a pattern (although it is less used than for junction demand). So it it should have the same fix. |
If I follow the issue, I don't think we need a new field called |
There are a couple ways to store the information, and I am not sure what is the most logical. EPANET inp files provide base demand and pattern. Right now, these are stored as fields for each junction, and the time series is stored separately. When instantiating the model, I suggest using the time series value(s). If this is done, then I agree that base demand and patterns can be discarded. However, there may be some value in keeping them around? It is important to note that base demand is not some nominal or "average" demand. It can be an order of magnitude different because the pattern multipliers can be very large or very small. So using base demand as "demand" in a model is not very useful. |
As I understand it there is a one-to-one relationship between WaterModels and EPANET. As I understand it |
@tasseff what are your thoughts? |
Not quite. The
You are partially right: if a pattern does not exist (or is not assigned) for a junction, then |
I think in general, if a |
Expecting the user to provide a single-time inp file seems a bit much. You don't have to transform all "fields that carry |
I think we may be having some confusion so I recomend we discuss this on the next team meeting, so we can discuss in detail and come to a consensus. |
Looking at the I/O methods, I think the solution is easier than I thought. I will commit a fix shortly. |
See changes to I personally don't feel storing |
I propose the following semantics,
A user who would like to analyze the single time point problem that is specified by EPANET's "base_demand" runs on the loaded data, as is. A user who would like to analyze the single time point problem that is specified by the pattern curves first should load a timepoint from the time series block, then run the analysis. A user who would like to analyze the multi-time point problem should turn the time series into a multi-network (as I recall some helper functions already exist for this case), then run the analysis. These conventions are consistent with how this works in other infrastructure systems. I am not seeing a reason to deviate from these conventions at this point, but we can discuss further at the next meeting if needed. |
The base_demand (when there is a pattern) is not intended to be a realistic value for demand at a junction, so I think this use case should be avoided or at least warned against. This is also why I suggest that base demand should be labelled
@tasseff, Does user-friendly functionality exist to do this?
This part is fine and already implemented (as far as I understand). |
@jjstickel, something like what Carleton is suggesting could be done via data["junction"]["2"]["demand"] = data["time_series"]["junction"]["2"]["demand"][3] which would replace the To your original point that Finally, differentiating between |
I found at least one example where this is not the case, Net3.inp. This network is used in some specific examples in the repo that you provide a link to, It seems that you want to put the onus on the user to check for the reasonableness of the network definition. I can come to terms with that, but I feel like it would be fairly simple to make some minor modifications to help users catch these problems and/or fix it for them. |
The function,
You may be right here. Generally I would strive for intuitive interfaces with very simple software semantics. If we cannot have both at the same time, I would usually err on the side of simple software semantics and expect higher levels of comprehension from the users. From my view, the bigger challenge we are trying to resolve here is how to best have consistent conventions across Power, Water and Natural Gas infrastructures. These other two infrastructures follow the conventions I have outlined and users seem to be content with these semantics, so I think it can work here as well. |
OK. I will defer to your motivation for consistency. In that case, the changes in a4ccf3e to set the demand to the first time-series value should be undone. |
I also agree that running |
It sounds like we have come to a consensus that the previous conventions will stand. I will document use of |
When instantiating a single-time water model, the demands for junctions are currently set to the EPANET "base demand" values. However, the actual demand should come from multiplying base demand by the pattern. Since this is already computed as a time-series, the time-zero value can be used for demand.
I propose to change the existing
demand
filed be relabeled asbase_demand
. Then a newdemand
field can be created that uses the time-series value.The text was updated successfully, but these errors were encountered: