Giter VIP home page Giter VIP logo

epynet's People

Contributors

abelheinsbroek avatar lmangani avatar michaeltan91 avatar vdwees avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epynet's Issues

Doesn't allow to change Node (reservoir) head.

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

error on patterns

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

Is it possible to change the total head at a reservoir instead of its elevation?

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.

epynet assumes IDs to be encoded using UTF-8

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.

Documentation

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

Issue while opening INPs

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.

Issue - traceback

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.