Object-oriented EPANET in Python
Project description
OOPNET
OOPNET (object-oriented EPANET) is a Python package for modelling and simulating hydraulic water distribution system models based on the modelling software EPANET.
Main functionalities:
- Reading EPANET input files (.inp)
- Modifying model components, settings, controls and rules
- Simulating models using EPANET with results as pandas data objects
- Plotting models using matplotlib
A detailed documentation is available under https://oopnet.readthedocs.io.
Warning!
Be warned, that OOPNET is still changing a lot. Until it's marked as 1.0.0, you should assume that it is unstable and act accordingly. We are trying to avoid breaking changes but they can and will occur!
Installation
OOPNET uses features only available in the newer Python version, which is why Python >= 3.9 is needed along with several Python package dependencies.
OOPNET is available on PyPI and can be easily installed together with its dependencies using pip
:
pip install oopnet
Alternatively, you can install OOPNET from its repository:
pip install git+https://github.com/oopnet/oopnet.git
Dependencies
OOPNET requires the following Python packages:
- networkx
- numpy
- pandas
- xarray
- matplotlib
- bokeh
On Linux and macOS, EPANET has to be installed as well and has to be added to the path
environment variable. Windows users don't have to have EPANET installed.
Basic Usage
To use OOPNET, you first have to import it in your script:
import oopnet as on
In OOPNET, everything is about the Network
. If you want to start with a new, empty Network, type the following:
network = on.Network()
If you want to read an existing EPANET model, you can read
it as an input-file:
filename = "network.inp"
network = on.Network.read(filename)
To simulate the model, you can use the Network`s run
method:
report = network.run()
If you want to create a basic Network plot, you can use its plot
method:
network.plot()
License
OOPNET is available under a MIT License.
Contributing
If you want to contribute, please check out our Code of Conduct and our Contribution Guide. Looking forward to your pull request or issue!
Citing
If you publish work based on OOPNET, we appreciate a citation of the following reference:
- Steffelbauer, D., Fuchs-Hanusch, D., 2015. OOPNET: an object-oriented EPANET in Python. Procedia Eng. 119, 710e718. https://doi.org/10.1016/j.proeng.2015.08.924.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file oopnet-0.5.1.tar.gz
.
File metadata
- Download URL: oopnet-0.5.1.tar.gz
- Upload date:
- Size: 218.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.3 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90d36f56a2729add94b94a571c6ff9c9130e362484e1daea96f76cd62b9976ab |
|
MD5 | 1a08ca04b089ea9c4a86e7c0ca288fe1 |
|
BLAKE2b-256 | 4eba15863c34bd1590089971e6b6b9ecd7100c9cfe58ab9e473194269bd4a8bd |
File details
Details for the file oopnet-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: oopnet-0.5.1-py3-none-any.whl
- Upload date:
- Size: 236.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.1 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.3 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 343ecd73e941212cbbad269d2e8f05e06f059dd1ae07712aa24574fe772f40ba |
|
MD5 | 6ec2fe91c8a1088d59b2acfc2438100b |
|
BLAKE2b-256 | 3007ac40c1d22d9514779f65afbde486dc586eba50779929908bfd6438b57a12 |