-
Notifications
You must be signed in to change notification settings - Fork 183
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 add PRV valve by interating the link #279
Comments
For 1, it looks like you're missing a comma between "initial_setting = initial_setting" and "initial_status = initial_status" For 2, WNTR graphics currently don't include different icons for different types of links (valves, pumps, pipes) and nodes (reservoirs, tanks, junctions). This would be a great feature to add to the WNTR graphics. We can look into that. You could use the |
I really appreciate for your answer, |
That is correct, the "valve layer" will only be helpful for graphics in this case. To add valves at different locations in the network, you will need to add and remove valves. However, you could keep the pipe and close it when a valve is added. That way when you want to remove the valve and use the pipe again, you just need to open it (instead of recreating it with the correct properties from scratch). |
Thank you so much. It really helpful :) |
Hi,
My question is
I follow this coding however I face the problem when it said
class valve_controller(): def __init__(self, wn): self.wn = wn def remove(self, pipe_name): self.wn.remove_link(pipe_name) def add_valve(self, name, start_node_name, end_node_name, diameter, valve_type, minor_loss, initial_setting, initial_status): self.wn.add_valve( name=name, start_node_name = start_node_name, end_node_name = end_node_name, diameter = diameter, valve_type = valve_type, minor_loss = minor_loss, initial_setting = initial_setting initial_status= initial_status ) def get_wn(self): return self.wn def get_name(self): return self.wn.name
As you can see i will get the error from this
Thank you for your supporting it mean a lot to me.
The text was updated successfully, but these errors were encountered: