A water resource simulator in Python

https://doi.org/10.1016/j.envsoft.2020.104635Get rights and content
Under a Creative Commons license
open access

Highlights

  • We present an open source water resources simulation library written in Python.

  • Includes multi-scenario simulation for the application of robust decision making.

  • Enables the use of multi-objective optimisation.

  • Uses an extensible component based input–output system.

Abstract

A new generalised water resource network modelling Python library, Pywr, is presented. Given hydrological inflows, Pywr simulates customisable water allocation and operation rules throughout complex multi-purpose managed water systems at each user-defined time-step. The model uses a low-level interface to existing linear programming solvers for fast priority-based optimisation-driven simulation. The library uses an object based system for users to provide input data and record simulation outputs. A novel multi-scenario simulation method provides an almost 4-fold improvement in model run-times and supports calculating robustness metrics across scenarios. A flexible interface to specify multi-objective optimisation formulations as part of a model’s input file is included. These features enable analysts to apply advanced water planning approaches, such as robust decision making and robust optimisation, to real systems. The library is available under the GPLv3 open source licence, includes several examples and a regression test suite.

Keywords

Water resource simulation
Network optimisation
Open source
Python
Multi-reservoir operations
Decision making under deep uncertainty

Software availability

Name of software: Pywr

Description: Pywr is a generalised network resource allocation model written in Python. It aims to be fast, free, and extendable. It provides a multi-scenario simulation platform for undertaking advanced decision making under deep uncertainty studies.

Developers: J. H. Arnott, J. E. Tomlinson

Language: Python 3.6+

Supported systems: Microsoft Windows, GNU/Linux, macOS

Licence: GNU General Public Licence v3

Source code: https://github.com/pywr/pywr

Distribution (PyPi): https://pypi.org/project/pywr/

Distribution (conda-forge): https://anaconda.org/conda-forge/pywr

Cited by (0)