EPyT-Flow
Provides easy access to water distribution network simulations with a high level interface for generation of hydraulic and water quality scenario data.
https://github.com/waterfutures/epyt-flow
Category: Natural Resources
Sub Category: Water Supply and Quality
Keywords
epanet epanet-python-toolkit hydraulics python simulation water water-distribution-networks
Keywords from Contributors
water
Last synced: about 15 hours ago
JSON representation
Repository metadata
A Python package designed for the easy generation of hydraulic and water quality scenario data of water distribution networks.
- Host: GitHub
- URL: https://github.com/waterfutures/epyt-flow
- Owner: WaterFutures
- License: mit
- Created: 2024-01-04T14:07:18.000Z (over 1 year ago)
- Default Branch: dev
- Last Pushed: 2025-04-21T16:09:51.000Z (6 days ago)
- Last Synced: 2025-04-21T21:37:57.901Z (6 days ago)
- Topics: epanet, epanet-python-toolkit, hydraulics, python, simulation, water, water-distribution-networks
- Language: Python
- Homepage: https://epyt-flow.readthedocs.io/en/stable
- Size: 3.61 MB
- Stars: 29
- Watchers: 7
- Forks: 5
- Open Issues: 0
- Releases: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
README.md
EPyT-Flow -- EPANET Python Toolkit - Flow
EPyT-Flow is a Python package building on top of EPyT
for providing easy access to water distribution network simulations.
It aims to provide a high-level interface for the easy generation of hydraulic and water quality scenario data.
However, it also provides access to low-level functions by EPANET
and EPANET-MSX.
EPyT-Flow provides easy access to popular benchmark data sets for event detection and localization.
Furthermore, it also provides an environment for developing and testing control algorithms.
Unique Features
Unique features of EPyT-Flow that make it superior to other (Python) toolboxes are the following:
- High-performance hydraulic and (advanced) water quality simulation
- High- and low-level interface
- Object-orientated design that is easy to extend and customize
- Sensor configurations
- Wide variety of pre-defined events (e.g. leakages, sensor faults, actuator events, contamination, cyber-attacks, etc.)
- Wide variety of pre-defined types of global & local uncertainties (e.g. model uncertainties)
- Step-wise simulation and environment for training and evaluating control strategies
- Serialization module for easy exchange of data and (scenario) configurations
- REST API to make EPyT-Flow accessible in other applications
- Access to many WDNs and popular benchmarks (incl. their evaluation)
Installation
EPyT-Flow supports Python 3.9 - 3.13
Note that EPANET and EPANET-MSX sources are compiled and overwrite the binaries
shipped by EPyT IF EPyT-Flow is installed on a Unix system and the gcc compiler is available.
By this, we not only aim to achieve a better performance of the simulations but also avoid any
compatibility issues of pre-compiled binaries.
Prerequisites for macOS users
The "true" gcc compiler (version 12) is needed which is not the
clang compiler that is shipped with Xcode and is linked to gcc!
The correct version of the "true" gcc can be installed via brew:
brew install gcc@12
PyPI
pip install epyt-flow
Git
Download or clone the repository:
git clone https://github.com/WaterFutures/EPyT-Flow.git
cd EPyT-Flow
Install all requirements as listed in REQUIREMENTS.txt:
pip install -r REQUIREMENTS.txt
Install the toolbox:
pip install .
Quick Example
from epyt_flow.data.benchmarks import load_leakdb_scenarios
from epyt_flow.simulation import ScenarioSimulator
from epyt_flow.utils import to_seconds
if __name__ == "__main__":
# Load first Hanoi scenario from LeakDB
network_config, = load_leakdb_scenarios(scenarios_id=["1"], use_net1=False)
# Create scenario
with ScenarioSimulator(scenario_config=network_config) as sim:
# Set simulation duration to two days
sim.set_general_parameters(simulation_duration=to_seconds(days=2))
# Place pressure sensors at nodes "13", "16", "22", and "30"
sim.set_pressure_sensors(sensor_locations=["13", "16", "22", "30"])
# Place a flow sensor at link/pipe "1"
sim.set_flow_sensors(sensor_locations=["1"])
# Run entire simulation
scada_data = sim.run_simulation()
# Print & plot sensor readings over the entire simulation
print(f"Pressure readings: {scada_data.get_data_pressures()}")
scada_data.plot_pressures()
print(f"Flow readings: {scada_data.get_data_flows()}")
scada_data.plot_flows()
Generated plots
Documentation
Documentation is available on readthedocs: https://epyt-flow.readthedocs.io/en/latest/
How to Get Started?
EPyT-Flow is accompanied by an extensive documentation
https://epyt-flow.readthedocs.io/en/latest/
(including many examples).
If you are new to water distribution networks, we recommend first to read the chapter on
Modeling of Water Distribution Networks.
You might also want to check out some lecture notes on
Smart Water Systems.
If you are already familiar with WDNs (and software such as EPANET), we recommend checking out
our WDSA CCWI 2024 tutorial which
not only teaches you how to use EPyT and EPyT-Flow but also contains some examples of applying
Machine Learning in WDNs.
Besides that, you can read in-depth about the different functionalities of EPyT-Flow in the
In-depth Tutorial of the documentation --
we recommend reading the chapters in the order in which they are presented;
you might decide to skip some of the last chapters if their content is not relevant to you.
More Networks and Benchmarks
More Water Distribution Networks (WDNs) and benchmarks are available on the
WaterBenchmarkHub platform.
More on Control
We recommend checking out EPyT-Control
if you are intersted in (data-driven) control and relates tasks such as state estimation
and event diagnosis in Water Distribution Networks.
License
MIT license -- see LICENSE
How to Cite?
If you use this software, please cite it as follows:
@article{Artelt2024,
doi = {10.21105/joss.07104},
url = {https://doi.org/10.21105/joss.07104},
year = {2024},
publisher = {The Open Journal},
volume = {9},
number = {103},
pages = {7104},
author = {André Artelt and Marios S. Kyriakou and Stelios G. Vrachimis and Demetrios G. Eliades and Barbara Hammer and Marios M. Polycarpou},
title = {EPyT-Flow: A Toolkit for Generating Water Distribution Network Data},
journal = {Journal of Open Source Software}
}
How to get Support?
If you come across any bug or need assistance please feel free to open a new
issue
if non of the existing issues answers your questions.
How to Contribute?
Contributions (e.g. creating issues, pull-requests, etc.) are welcome --
please make sure to read the code of conduct and
follow the developers' guidelines.
Citation (CITATION.cff)
cff-version: "1.2.0" authors: - family-names: Artelt given-names: André orcid: "https://orcid.org/0000-0002-2426-3126" - family-names: Kyriakou given-names: Marios S. orcid: "https://orcid.org/0000-0002-2324-8661" - family-names: Vrachimis given-names: Stelios G. orcid: "https://orcid.org/0000-0001-8862-5205" - family-names: Eliades given-names: Demetrios G. orcid: "https://orcid.org/0000-0001-6184-6366" - family-names: Hammer given-names: Barbara orcid: "https://orcid.org/0000-0002-0935-5591" - family-names: Polycarpou given-names: Marios M. orcid: "https://orcid.org/0000-0001-6495-9171" contact: - family-names: Artelt given-names: André orcid: "https://orcid.org/0000-0002-2426-3126" message: If you use this software, please cite our article in the Journal of Open Source Software. preferred-citation: authors: - family-names: Artelt given-names: André orcid: "https://orcid.org/0000-0002-2426-3126" - family-names: Kyriakou given-names: Marios S. orcid: "https://orcid.org/0000-0002-2324-8661" - family-names: Vrachimis given-names: Stelios G. orcid: "https://orcid.org/0000-0001-8862-5205" - family-names: Eliades given-names: Demetrios G. orcid: "https://orcid.org/0000-0001-6184-6366" - family-names: Hammer given-names: Barbara orcid: "https://orcid.org/0000-0002-0935-5591" - family-names: Polycarpou given-names: Marios M. orcid: "https://orcid.org/0000-0001-6495-9171" date-published: 2024-11-12 doi: 10.21105/joss.07104 issn: 2475-9066 issue: 103 journal: Journal of Open Source Software publisher: name: Open Journals start: 7104 title: "EPyT-Flow: A Toolkit for Generating Water Distribution Network Data" type: article url: "https://joss.theoj.org/papers/10.21105/joss.07104" volume: 9 title: "EPyT-Flow: A Toolkit for Generating Water Distribution Network Data"
Owner metadata
- Name: ERC Synergy Grant Water Futures
- Login: WaterFutures
- Email:
- Kind: organization
- Description: Repository for the ERC SyG Water Futures Team
- Website: www.waterfutures.eu
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/149570313?v=4
- Repositories: 1
- Last ynced at: 2024-01-31T13:34:11.822Z
- Profile URL: https://github.com/WaterFutures
GitHub Events
Total
- Create event: 11
- Release event: 10
- Issues event: 8
- Watch event: 12
- Delete event: 1
- Issue comment event: 23
- Push event: 155
- Pull request event: 5
- Fork event: 2
Last Year
- Create event: 11
- Release event: 10
- Issues event: 8
- Watch event: 12
- Delete event: 1
- Issue comment event: 23
- Push event: 155
- Pull request event: 5
- Fork event: 2
Committers metadata
Last synced: 6 days ago
Total Commits: 698
Total Committers: 4
Avg Commits per committer: 174.5
Development Distribution Score (DDS): 0.129
Commits in past year: 419
Committers in past year: 4
Avg Commits per committer in past year: 104.75
Development Distribution Score (DDS) in past year: 0.158
Name | Commits | |
---|---|---|
André Artelt | a****t@t****e | 608 |
kurceliana | k****a@g****m | 55 |
Marios S. Kyriakou | m****k@g****m | 33 |
Stelios G. Vrachimis | v****s@u****y | 2 |
Committer domains:
- ucy.ac.cy: 1
- techfak.de: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 26
Total pull requests: 3
Average time to close issues: 14 days
Average time to close pull requests: 14 days
Total issue authors: 5
Total pull request authors: 2
Average comments per issue: 3.19
Average comments per pull request: 3.33
Merged pull request: 2
Bot issues: 0
Bot pull requests: 0
Past year issues: 18
Past year pull requests: 3
Past year average time to close issues: 14 days
Past year average time to close pull requests: 14 days
Past year issue authors: 4
Past year pull request authors: 2
Past year average comments per issue: 3.72
Past year average comments per pull request: 3.33
Past year merged pull request: 2
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- andreArtelt (14)
- Mariosmsk (8)
- meghnathomas (2)
- kbonney (1)
- jorgelcq (1)
Top Pull Request Authors
- gieseka (2)
- kurceliana (1)
Top Issue Labels
- enhancement (7)
- bug (1)
Top Pull Request Labels
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 540 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 17
- Total maintainers: 2
pypi.org: epyt-flow
EPyT-Flow -- EPANET Python Toolkit - Flow
- Homepage: https://github.com/WaterFutures/EPyT-Flow
- Documentation: https://epyt-flow.readthedocs.io/en/stable/
- Licenses: mit
- Latest release: 0.12.0 (published 2 days ago)
- Last Synced: 2025-04-25T07:32:07.437Z (2 days ago)
- Versions: 17
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 540 Last month
-
Rankings:
- Dependent packages count: 9.415%
- Average: 35.762%
- Dependent repos count: 62.109%
- Maintainers (2)
Dependencies
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/checkout v4 composite
- actions/upload-artifact v4 composite
- openjournals/openjournals-draft-action master composite
- epyt-flow *
- ipykernel >=6.29.3
- nbsphinx >=0.9.3
- sphinx >=7.2.6
- sphinx-rtd-theme >=2.0.0
Score: 11.048856192546012