-
Notifications
You must be signed in to change notification settings - Fork 188
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
How to access Description of Pattern in .inp, and how to replace multipliers of Pattern? #338
Comments
@mark-chung You can view patterns using 'get_pattern'. To just see the array of pattern multipliers you can use the following. If you don't put the .multipliers you can see other information stored with the pattern. |
Thanks for your reply @ucchejbb ! I have tried, but the description 'Reservoir_1' was not shown in the output. Can anyone please advice? |
@mark-chung you can run "wn.pattern_name_list" to see a list of all available pattern names. My example only pulls out the specific "RS_1". But you just need to insert the appropriate name into wn.get_pattern('pattern_name') to access its information. |
@ucchejbb Thanks for comment! I have no issue listing the available pattern names. Just wondering, why in EPANET I could see 'Description' of pattern (please see image in first comment). In the example, within EPANET, the pattern 'RS_1' has a description 'Reservoir_1'. When I use WNTR wn.get_pattern('RS_1'), I only could see pattern name and multiplierarray, but couldn't see the description 'Reservoir_1'. Could this be a limitation of WNTR, that some information in .inp file that could be seen in EPANET, but couldn't be retrieved from WNTR model? |
@mark-chung Sorry for my confusion. I thought you were just trying to access the pattern. @kaklise @dbhart Any thoughts on this? I don't recall how to access this information (or if you can). |
The name of the pattern goes in the comments above the pattern definition. EPANET GUI keeps this information - the toolkit doesn't. So, we have not pulled in that data to store it on the patterns in wntr. This is true of most of the comments that are allowed in EPANET - WNTR does not store them and you can't access through the EPANET toolkit. |
Summary
I have an .inp file. From EPANET I could see pattern names and respective descriptions as shown below.
Example
The text was updated successfully, but these errors were encountered: