Skip to main content

Object-oriented EPANET in Python

Project description

OOPNET

PyPI OOPNET build License: MIT Documentation Status

OOPNET (Object-Oriented Pipe Network Analyzer) 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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oopnet-0.6.5.tar.gz (218.3 kB view details)

Uploaded Source

Built Distribution

oopnet-0.6.5-py3-none-any.whl (236.8 kB view details)

Uploaded Python 3

File details

Details for the file oopnet-0.6.5.tar.gz.

File metadata

  • Download URL: oopnet-0.6.5.tar.gz
  • Upload date:
  • Size: 218.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.6 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.13

File hashes

Hashes for oopnet-0.6.5.tar.gz
Algorithm Hash digest
SHA256 c613ba8bef24303f991b665f0d6a93d7626c44fd024a48f5a24c200e903051d9
MD5 db0a042e7889204c83f4cddeb3017e9e
BLAKE2b-256 23b0c28f6abcffaa2aa9b626fa4b6a5665c1d625cda839bfae4caef7e6a987e6

See more details on using hashes here.

File details

Details for the file oopnet-0.6.5-py3-none-any.whl.

File metadata

  • Download URL: oopnet-0.6.5-py3-none-any.whl
  • Upload date:
  • Size: 236.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.6 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.13

File hashes

Hashes for oopnet-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 338c6cf5a6110e32bbfe7228031e32fe53dd19f674a9fd668b7b45eb32a35ef5
MD5 ed614c0e5203dece3ed686c3ffc549ce
BLAKE2b-256 42190b51e16c979cfb51c3dcf9b6a513d27c9912724521030c314adf6f6be48b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page