Skip to main content

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.

https://github.com/pywr/pywr/workflows/Build/badge.svg?branch=master Static Badge https://codecov.io/gh/pywr/pywr/branch/master/graph/badge.svg

Overview

Documentation

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.

https://raw.githubusercontent.com/pywr/pywr/master/docs/source/_static/pywr_d3.png

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


Download files

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

Source Distribution

pywr-1.22.0.tar.gz (3.2 MB view details)

Uploaded Source

Built Distributions

pywr-1.22.0-cp312-cp312-win_amd64.whl (5.1 MB view details)

Uploaded CPython 3.12 Windows x86-64

pywr-1.22.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.1 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pywr-1.22.0-cp311-cp311-win_amd64.whl (5.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

pywr-1.22.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.8 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pywr-1.22.0-cp310-cp310-win_amd64.whl (5.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

pywr-1.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pywr-1.22.0-cp39-cp39-win_amd64.whl (5.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

pywr-1.22.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

File details

Details for the file pywr-1.22.0.tar.gz.

File metadata

  • Download URL: pywr-1.22.0.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pywr-1.22.0.tar.gz
Algorithm Hash digest
SHA256 609e91a273cc8842a678bf1a29b821e3aa0e0412239cba7be22639a2c8bb1bf6
MD5 bd44f3785d1bfd383f053b46e404c8b4
BLAKE2b-256 94b5cd38a6dc44fb69ed180768f64bac2fe4f7f45d871ddd49ffa2f4c78c5e8b

See more details on using hashes here.

File details

Details for the file pywr-1.22.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pywr-1.22.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pywr-1.22.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 42140565f5ea1fe6740031817a22d6c5c3131dce81029f3a0bc95e3a7e1d07f4
MD5 39869b58a751e881ecb99bf801291fcb
BLAKE2b-256 888d6a0a09ab8bfc8b2970ff2338fdb6abc0ae37a129effbe256673ee618d665

See more details on using hashes here.

File details

Details for the file pywr-1.22.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.22.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f5b451e8d9daba9d309e54bb9dad71b6e6439c593c790b1eb49b18abe8a14194
MD5 b28db498a15c43f0e5550229e4b989d8
BLAKE2b-256 2f25567bc250acfd08d4b63dfe150f76f1ef6374ef1bcb25be65078b62d8823c

See more details on using hashes here.

File details

Details for the file pywr-1.22.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pywr-1.22.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pywr-1.22.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e3c97a541a9f61d0c6b7f05ba0c9da7bc5e4c9a330b01b5e745face0610b3a33
MD5 4e29930bdc5bc26191973545fcdc4400
BLAKE2b-256 02ae66c84653032bb48596c8f956e934c1d75a6a88b59246f60627d36a86f83a

See more details on using hashes here.

File details

Details for the file pywr-1.22.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.22.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 56b95822b40641661d9aed5fc53fb7d894dc6c74de6923186a8594737be238f0
MD5 f7711830f5c9853e0d064225dd16f90e
BLAKE2b-256 d5b9cb9ee267e46b8320b6b3c58862755f2635ea82137905779cddfa1b85f588

See more details on using hashes here.

File details

Details for the file pywr-1.22.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pywr-1.22.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pywr-1.22.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 329741f84e62b4762da4f4351c2f09ecf1cd89bcfecbf5791f772375a7f43b73
MD5 82a2f51e17ddbba7ffc4664146ec24ae
BLAKE2b-256 4abfd87f0f58e13dc96144e1ede79f58cf04be6fbec96e3accf247b5472daa88

See more details on using hashes here.

File details

Details for the file pywr-1.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3a361037547be71a6ed60743a46f95475d625a728563d5e7a777f72a1c300eb
MD5 cbc08a1b2a0f53bddaecda83aeb7f95c
BLAKE2b-256 b94114a3a7f8fecf9f5b7d336e461e7135aa483e1e99ccd4524d48cd75f5d051

See more details on using hashes here.

File details

Details for the file pywr-1.22.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pywr-1.22.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pywr-1.22.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a08166b3c8f80722b5c8827330e58cbb92f436362442587722b9f2b697aa761c
MD5 0f5404d37e4ae9e3c4e543b39f5420aa
BLAKE2b-256 ac075031fc0d6f2eba5b53fa2dd7d9c7caf6022888a5f3767d70c44cae428f88

See more details on using hashes here.

File details

Details for the file pywr-1.22.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.22.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 13e177a586f80544a04aa37448e18d3de16ea6e68577d60e2ad1d7e9b522b012
MD5 7a167fc219e9d326a1fc7cc9cf01aba1
BLAKE2b-256 f44249d65e5d3b6c12a2abf4982b3e344384b86be1175a52b5181e069dddf974

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