Skip to main content

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.

Installation

EPyT-Flow supports Python 3.9 - 3.12

Note that EPANET and EPANET-MSX sources are compiled and overrite the binaries shipped by EPyT IF EPyT-Flow is installed on a Linux system. By this we not only aim to achieve a better performance of the simulations but also avoid any compatibility problems of pre-compiled binaries.

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

Open In Colab
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()

        # Show sensor readings over the entire simulation
        print(f"Pressure readings: {scada_data.get_data_pressures()}")
        print(f"Flow readings: {scada_data.get_data_flows()}")

Documentation

Documentation is available on readthedocs: https://epytflow.readthedocs.io/en/latest/

License

MIT license -- see LICENSE

How to Cite?

If you use this software, please cite it as follows:

@misc{github:epytflow,
        author = {André Artelt, Marios S. Kyriakou, Stelios G. Vrachimis, Demetrios G. Eliades, Barbara Hammer, Marios M. Polycarpou},
        title = {EPyT-Flow -- EPANET Python Toolkit - Flow},
        year = {2024},
        publisher = {GitHub},
        journal = {GitHub repository},
        howpublished = {\url{https://github.com/WaterFutures/EPyT-Flow}}
    }

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.

Download files

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

Source Distribution

epyt_flow-0.1.0.tar.gz (406.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

epyt_flow-0.1.0-py3-none-any.whl (464.9 kB view details)

Uploaded Python 3

File details

Details for the file epyt_flow-0.1.0.tar.gz.

File metadata

  • Download URL: epyt_flow-0.1.0.tar.gz
  • Upload date:
  • Size: 406.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for epyt_flow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b0b03f8fd77c88c7658e4c955a57d5f43ecfe575548e2b9a6b0d0d3837935bcf
MD5 f1977f56e77ce7d512fed2199ef285d7
BLAKE2b-256 764287d57053be3f955ac2fc4edf9ee4da0bb49c15bd4cd3fae448191918e78e

See more details on using hashes here.

File details

Details for the file epyt_flow-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: epyt_flow-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 464.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for epyt_flow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22f3383ff20bd702241217a8f8f5d06248df01608bac32e452822a1fe99a7fb8
MD5 418e7c5f625ac1f0812da04d68b9e67d
BLAKE2b-256 6b85b0adf3a33424e31fa50a805927bfaef4819007bcd7c2fdd9df5ba504e604

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page