Python Water Resource model
Project description
Pywr is a generalised network resource allocation model written in Python. It aims to be fast, free, and extendable.
Overview
Pywr is a tool for solving network resource allocation problems at discrete timesteps using a linear programming approach. It’s principal application is in resource allocation in water supply networks, although other uses are conceivable. A network is represented as a directional graph using NetworkX. Nodes in the network can be given constraints (e.g. minimum/maximum flows) and costs, and can be connected as required. Parameters in the model can vary time according to boundary conditions (e.g. an inflow timeseries) or based on states in the model (e.g. the current volume of a reservoir).
Models can be developed using the Python API, either in a script or interactively using IPython/Jupyter. Alternatively, models can be defined in a rich JSON-based document format.
New users are encouraged to read the Pywr Tutorial.
Design goals
Pywr is a tool for solving network resource allocation problems. It has many similarities with other software packages such as WEAP, Wathnet, Aquator and MISER, but also has some significant differences. Pywr’s principle design goals are that it is:
Fast enough to handle large stochastic datasets and large numbers of scenarios and function evaluations required by advanced decision making methodologies;
Free to use without restriction – licensed under the GNU General Public Licence;
Extendable – uses the Python programming language to define complex operational rules and control model runs.
Installation
Pywr should work on Python 3.7 (or later) on Windows, Linux or OS X.
See the documentation for detailed installation instructions.
For a quick start use pip:
pip install pywr
For most users it will be easier to install the binary packages made available from PyPi or the Anaconda Python distribution. Note that these packages may lag behind the development version.
Citation
Please consider citing the following paper when using Pywr:
Tomlinson, J.E., Arnott, J.H. and Harou, J.J., 2020. A water resource simulator in Python. Environmental Modelling & Software. https://doi.org/10.1016/j.envsoft.2020.104635
License
Copyright (C) 2014-20 Joshua Arnott, James E. Tomlinson, Atkins, University of Manchester
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
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 Distributions
File details
Details for the file pywr-1.27.1.tar.gz
.
File metadata
- Download URL: pywr-1.27.1.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01f1226b2020c10c79fdf72649a3a31a091c7d1d970ee433089a911dc72645cc |
|
MD5 | d991031cfd330ce12088b8ce79f9b91b |
|
BLAKE2b-256 | aafb46eddaad1f5fafc3010493b7e08a85f3cbbd6c42f9d9d3e12eb6e019dab7 |
File details
Details for the file pywr-1.27.1-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: pywr-1.27.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9baee69172739a37a75b27335b4059585b9c65290f64d4c760dd016119233f3 |
|
MD5 | 27330203d83f3a5f0e541ef03cee18cd |
|
BLAKE2b-256 | 0f93cc7c7204c78c336f8a64ba9e5eb119a7f78656a4f48fde271ae7770232d0 |
File details
Details for the file pywr-1.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pywr-1.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 20.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | efdb06fbc16d58b189ccb3a1794142ffe0ea795ee9831ae2c63caa9ecf81d629 |
|
MD5 | efc9c5af4fe5122dc87cfa6785cce832 |
|
BLAKE2b-256 | 5784343bdf5c4881424b052c57947c12bf93525b3c24a68e961018b99fada423 |
File details
Details for the file pywr-1.27.1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pywr-1.27.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31aa7587af25162b66b7c4dd1c38d3e105faaead59a28555d6a54d86e75b71b5 |
|
MD5 | 9f6f0a86a67c8c0332919fd4fa3a261c |
|
BLAKE2b-256 | 45b5aaac4828adb9b9cfa33f79e958e86750bd65a5501aecf563823eafe3b190 |
File details
Details for the file pywr-1.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pywr-1.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 20.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a32ab652ea9d22c2684e94cc463749e6b001793b386855689eee172bb6c8c31 |
|
MD5 | 0819002023663b73fcb6169dcb32aee2 |
|
BLAKE2b-256 | 9ae883cdf9f5f71252987fe95b2f69b9637408df5916259e06b4cb86c4c4cadf |
File details
Details for the file pywr-1.27.1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pywr-1.27.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b021c86969901e96bafa3164f9ebdc425d2ca48ee9be619713b3bfef88ff8be9 |
|
MD5 | 278fde5f36e325f21952218f17d8394b |
|
BLAKE2b-256 | ce97a8362f453ff106e1ef263ff2ab19a76833d91f8e5c2f73415407f1c4060c |
File details
Details for the file pywr-1.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pywr-1.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 19.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8db67e0a0d8cd33123270e9bbe873839a77874ab6521c0d317d0edef8465f08 |
|
MD5 | 8d35647db5b1d5f718b20f19266221c2 |
|
BLAKE2b-256 | eff952d6cf7419e7f1054c25d39da3dde56daf295ed4c11afa343c7c5233a26d |