-
Notifications
You must be signed in to change notification settings - Fork 180
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
Pipe status problem #407
Comments
Hi @DanielaBS1, |
Thanks @kbonney I have split some pipes that had CV status : Then, I want some of the split pipes that have CV, not to have it. So as you suggested I did: for name in wn.pipe_name_list: And them I save an INP file so I can see it all on EPANET software: When I open the INP file created, the split pipes are shown correct, but the status of those pipes (named NP) I wish not to have a CV isn't. If you could advise me, I will be very thankful. PS. When splitting the pipes I have selected not to return a copy ( return_copy=False) as I am not sure how WNTR deals with this copy. If I select it to return a copy ( return_copy=True) then I ca not see the split pipes on the INP file created. If you could advise on that too it will be much appreciated. |
I identified two issues in your comment:
To 1., I was not able to replicate this on a basic network. I am able to successfully split pipes and change check valve status, and these changes show up in the INP file I write afterwards. If you want to provide your model and script that this issue is occuring on, or replicate the issue using a WNTR example model, I can try to take a look. To 2., many WNTR functions have the option |
Hi @kbonney I have deleted my last message to you as I have just found out what I was doing wrong! Many thnaks! |
I have imported an .inp file to WNTR where some pipes are meant to have a check valve (CV). On WNTR, when I query node attribute (wn.query_link_attribute('initial_status')) all pipes show initial status as 1 (open). I did expect the pipes with “CV” to have initial status as 3. When I open the same inp file on Epanet software the CVs are there!
I need to change the initial status of quite a few pipes from CV (3) to open (1). I have done:
for name in wn.pipe_name_list:
if "NP" in name:
pipe= wn.get_link(name)
pipe.initial_status="Open"
status=wn.query_link_attribute('initial_status')
Here, if I change the status to open, closed or CV it does show on the list ‘status’ correctly (0,1, 3). However, when I open the inp file on the software the pipes that had CV initially still have it !
So, I have two questions:
Could you please advise ?
I am using spyder 5.4.3
Thanks
The text was updated successfully, but these errors were encountered: