-
Notifications
You must be signed in to change notification settings - Fork 184
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
Issue deleting a node #352
Comments
I was able to address the above issue by getting a list for the leaknode and checking if it already exists. However, I am having error. I do not know the cause of this and what I can do to address it. ndexError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\wntr\sim\core.py in run_sim(self, solver, backup_solver, solver_options, backup_solver_options, convergence_error, HW_approx, diagnostics) ~\Anaconda3\lib\site-packages\wntr\sim\core.py in _initialize_internal_graph(self) IndexError: index 255 is out of bounds for axis 0 with size 255 |
I'm happy to hear that you were able to get a list of leak nodes. "RuntimeError: Cannot remove node..." indicates that the leak node is associated with a control and cannot be removed until the control is removed. This error is thrown anytime you try to remove an element with a control. I'm not able to follow the third issue regarding index 255. Please post a complete example with a network from the examples folder. |
Hi Katherine,
Thank you. I was able to fix the third issue. However, how do I remove
control? Do you have a link to how I can do that?
Best regards,
Uthman Kareem
…On Mon, Jun 5, 2023 at 10:13 AM Katherine Klise ***@***.***> wrote:
I'm happy to hear that you were able to get a list of leak nodes.
"RuntimeError: Cannot remove node..." indicates that the leak node is
associated with a control and cannot be removed until the control is
removed. This error is thrown anytime you try to remove an element with a
control.
I'm not able to follow the third issue regarding index 255. Please post a
complete example with a network from the examples folder.
—
Reply to this email directly, view it on GitHub
<#352 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL6ZC4NBSAEFVXB3UEKTOCTXJXZRRANCNFSM6AAAAAAYXZNVVE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
If you get the control name using You can also remove the leak from the junction object using |
Hello,
Thank you. I will try this if I need to.
Best regards,
Uthman Kareem
…On Tue, Jun 6, 2023 at 2:10 PM Katherine Klise ***@***.***> wrote:
If you get the control name using wn.control_name_list, you can remove
the control using wn.remove_control("control name").
You can also remove the leak from the junction object using
junction.remove_leak(). The junction object stores the control name and
calls remove_control.
—
Reply to this email directly, view it on GitHub
<#352 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL6ZC4LT3IUNW42FCENUUVLXJ56C3ANCNFSM6AAAAAAYXZNVVE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi,
I saw a github issue on running wntr on google colab. I did try the
solution given regarding upgrading numpy. I did that but I still could not
import wntr on google colab. I will be glad to know if you have a solution
to this or know anyone who has run wntr on google colab recently.
Thank you.
Best regards,
Uthman Kareem
…On Tue, Jun 6, 2023 at 2:10 PM Katherine Klise ***@***.***> wrote:
If you get the control name using wn.control_name_list, you can remove
the control using wn.remove_control("control name").
You can also remove the leak from the junction object using
junction.remove_leak(). The junction object stores the control name and
calls remove_control.
—
Reply to this email directly, view it on GitHub
<#352 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL6ZC4LT3IUNW42FCENUUVLXJ56C3ANCNFSM6AAAAAAYXZNVVE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Thanks @uthmankareem, Feel free update #342 with updates on using WNTR in Google Collab. |
Summary
Describe your question.
Example
[Optional] Include an example. The example can use INP files from the examples folder.
I was trying to remove negative nodes and pipes associated with them. This is being done in a control loop because I am running 1000 of it. I did the first simulation by removing some selected pipes and adding leaks to some. Then I found nodes with negative pressure so I can delete them including the pipes connected to them but I got "RuntimeError: Cannot remove node 187leak_node without first removing control/rule junction187leak_nodestart_leak_control". Firstly, there was no node 187 in the original network file so I assume this node name was automatically assigned when I added the leak. Apart from the error, I want to believe leak node will always have negative pressure. if this is true, I do not need to delete leak node then but how do I capture that the negative pressure node selected is a leaknode given that the simulation is run within a loop? How do I address the error as well?
Thank you.
Environment
[Optional] Provide information on your computing environment.
The text was updated successfully, but these errors were encountered: