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

How can I query node base demand from EPANET to python? #47

Open
faiijew opened this issue Jan 28, 2021 · 0 comments
Open

How can I query node base demand from EPANET to python? #47

faiijew opened this issue Jan 28, 2021 · 0 comments

Comments

@faiijew
Copy link

faiijew commented Jan 28, 2021

Hello

I want to know how can I query node base demand from EPANET to python?
I have read 'Some advanced result queries' in https://pypi.org/project/EPANETTOOLS/ . It only shows a max flow node id which above 4500 unit flow. But I want list of nodes which base demand above 0 and other results like table in EPANET.

for example
image

my codes
`#%%1
n=es.network.nodes
num=0
for i in n:
if Node.value_type['EN_BASEDEMAND']<10:
num=num+1
print(num)
#No error but it counts all of my nodes and I don't know why..

#%%2
NodeID=[n[x].id for x in list(n)]
sorted([y.NodeID for x,y in range(0,len(n)) if ((y.results[d])>0 and y.node_type==j)])
#TypeError: cannot unpack non-iterable int object`

PLEASE HELP ME ..

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

No branches or pull requests

1 participant