vitens / epynet Goto Github PK
View Code? Open in Web Editor NEWObject-oriented wrapper for EPANET 2.1
License: Apache License 2.0
Object-oriented wrapper for EPANET 2.1
License: Apache License 2.0
trying to access the indices of the patters (the *.inp file has already a pattern)
running the code below will result an error,
network.patterns.index
AttributeError: 'bytes' object has no attribute 'encode'
when i try to print the patterns, this is the result
network.patterns
{b'demand': <epynet.pattern.Pattern at 0x22917498c88>,
b'head': <epynet.pattern.Pattern at 0x22917498be0>}
need help on accessing existing patterns in the *.inp file, thank you
Good morning,
I am working at VORtech on a project in a collaboration with Deltares and Vitens.
I am trying to simulate the flow of water using a model (for the gemeente Culemborg) at different times of the day.
I would like to change the total head at the reservoir. I saw that this can (effectively) be done by changing the elevation (static) property of the reservoir node, like this:
nw.reservoirs[reservoir_name].set_static_property(EN_ELEVATION, value)
but if my interpretation of the code is correct, I would ideally rather have:
nw.reservoirs[reservoir_name].set_property(EN_HEAD, value)
I also tried:
nw.reservoirs[reservoir_name].properties['head'] = value
but this has no effect on the simulations (I guess because the self.set_object_value(code, value)) is not called.
Hello,
I got problem with opening some of input files. While opening some of inp's i got following traceback:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\DEV\Python\lib\tkinter\__init__.py", line 1699, in __call__
return self.func(*args)
File "D:/DEV/Work Directory/APP.py", line 655, in load_network
self.network = Network(self.network_filepath)
File "C:\DEV\Python\lib\site-packages\epynet-0.1-py3.6.egg\epynet\network.py", line 20, in __init__
self.ep.ENopen(self.inputfile, self.rptfile, self.binfile)
File "C:\DEV\Python\lib\site-packages\epynet-0.1-py3.6.egg\epynet\epanet2.py", line 76, in ENopen
raise ENtoolkitError(self, ierr)
epynet.epanet2.ENtoolkitError: File Error 302: cannot open input file.
Process finished with exit code 0
I know its related with the Programmers Toolkit, could you please give me some hints how to solve this as a novice to programming? Thank you very much in advance :)
EDIT: For all you guys, who might deal with that kind of error, the reason may be related to the name of the file or .inp file, for instance when name contains some diacritics like ę, ś, ą etc. But some .inps do not work anyway for no reason.
Hello, I'm trying to run epynet (I'm kinda new to python). I got following issue after trying to solve network (PyCharm). Would you please be so kind and help me to make it work? Thank you in advance.
Traceback (most recent call last):
File "C:/DEV/1_EDU/epynet/try_epynet.py", line 3, in
dupa = Network('network.inp')
File "C:\DEV\Python\lib\site-packages\epynet-0.1-py3.6.egg\epynet\network.py", line 14, in init
self.ep = epanet2.EPANET2()
File "C:\DEV\Python\lib\site-packages\epynet-0.1-py3.6.egg\epynet\epanet2.py", line 26, in init
self.lib = ctypes.CDLL(dll_path)
File "C:\DEV\Python\lib\ctypes_init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 system app
Hi,
I am wondering why the function ENsetnodevalue (epynet/epynet/epanet2.py) doesn't allow to change the head of the node?
I have a reservoir in my network and I want to change its total head value from epynet.
Thanks
epanet2.py
makes extensive use of str.decode()/encode()
to convert between string representations. Since no character set argument is provided, decode()
will try to parse the provided bytes as UTF-8 and vice versa.
I am finding that the use of UTF-8 in EPANET files is certainly not universal. It would therefore be good if the character set would be configurable.
Hi Everybody,
I love the pythonic interface for dealing with epanet simulations, but will there be a documentation available soon?
I think a simple list of what properties can be retrieved from the result and which properties of the network can be manipulated (with their units) would already do the trick.
regards from germany
Chris
epynet (probably the epanet library) crashes when creating and running two different networks after each other within the same process.
Steps to reproduce:
We were wondering, we found this piece of code and it seems that this specific line is unreachable as both EN_PIPE
and EN_RESERVOIR
are 1
, hence if link_type
equals 1, it will fall through to the first if statement. Also, the reservoir is a node_type, instead of a link type, right?
This is the line (and the next one):
https://github.com/Vitens/epynet/blob/master/epynet/network.py#L152
Best,
Frank
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.