Skip to content
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

Valve Layer #176

Open
dly9000 opened this issue Nov 10, 2020 · 1 comment
Open

Valve Layer #176

dly9000 opened this issue Nov 10, 2020 · 1 comment

Comments

@dly9000
Copy link

dly9000 commented Nov 10, 2020

This is more a question than an issue, but can the valve layer be populated by the valves within an imported .inp file?

@kaklise
Copy link
Collaborator

kaklise commented Nov 10, 2020

WNTR doesn't have a function to create a valve layer from the water network model, that's a good suggestion. If you know which node the valve protects (start or end node), you could use something like this.

valve_layer = []
for name, valve in wn.valves():
    valve_layer.append({'link': name, 'node': valve.end_node_name})
valve_layer = pd.DataFrame(valve_layer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants