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 https://img.shields.io/badge/chat-on%20gitter-blue.svg 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.6 (or later) on Windows, Linux or OS X.

See the documentation for detailed installation instructions.

Provided that you have the required dependencies already installed, it’s as simple as:

python setup.py install --with-glpk --with-lpsolve

For most users it will be easier to install the binary packages made available for the Anaconda Python distribution. See install docs for more information. 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.11.0b0.tar.gz (3.1 MB view details)

Uploaded Source

Built Distributions

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

pywr-1.11.0b0-cp38-cp38-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.8Windows x86-64

pywr-1.11.0b0-cp38-cp38-manylinux2014_x86_64.whl (17.2 MB view details)

Uploaded CPython 3.8

pywr-1.11.0b0-cp37-cp37m-win_amd64.whl (4.6 MB view details)

Uploaded CPython 3.7mWindows x86-64

pywr-1.11.0b0-cp37-cp37m-manylinux2014_x86_64.whl (14.4 MB view details)

Uploaded CPython 3.7m

pywr-1.11.0b0-cp36-cp36m-win_amd64.whl (4.6 MB view details)

Uploaded CPython 3.6mWindows x86-64

pywr-1.11.0b0-cp36-cp36m-manylinux2014_x86_64.whl (14.5 MB view details)

Uploaded CPython 3.6m

File details

Details for the file pywr-1.11.0b0.tar.gz.

File metadata

  • Download URL: pywr-1.11.0b0.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6

File hashes

Hashes for pywr-1.11.0b0.tar.gz
Algorithm Hash digest
SHA256 7e2f2ee259819ac2961b145f442218d3d1696772ae65894ee1623aee2778a3ed
MD5 ab8affd0f78b219e3d8f40dc84851b16
BLAKE2b-256 4a4b8380c54acd31f5d46ad17c44332f04dfe79e3a5b93e4ec38c400e3105ba2

See more details on using hashes here.

File details

Details for the file pywr-1.11.0b0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pywr-1.11.0b0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6

File hashes

Hashes for pywr-1.11.0b0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 02c949f2216296e8b39a295b48b61fa3fd3a048162006eece9b1c36d8ade58e8
MD5 06923e93fdc6bc92cdc8647a6d1487c1
BLAKE2b-256 7ad45b5287cc6873a5e5071f900432c5166a1e5cf41026518c92cba692824c03

See more details on using hashes here.

File details

Details for the file pywr-1.11.0b0-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pywr-1.11.0b0-cp38-cp38-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 17.2 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6

File hashes

Hashes for pywr-1.11.0b0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b12c8e63e2e6543c4be2eae65dec94a873855aaa0a4ea4c6bbc5c65dfd6ff7fe
MD5 19072ec85bda5d8253e8163f4ea01842
BLAKE2b-256 8c9b626bdd7a56c14f3296add0bff833b68653020c08127657afc695f90f89c0

See more details on using hashes here.

File details

Details for the file pywr-1.11.0b0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pywr-1.11.0b0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6

File hashes

Hashes for pywr-1.11.0b0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 4e7d2970e5afa9fe70225820af6de90dea71d8fad53a590b32d1d1cc7ed21236
MD5 6a0327e153aecc34bf24a1662cb2bcdc
BLAKE2b-256 6cb3ed5acc30dd9d699d69c50fdcc918b39ee6a63e178c840deeccfc4ce4867e

See more details on using hashes here.

File details

Details for the file pywr-1.11.0b0-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pywr-1.11.0b0-cp37-cp37m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 14.4 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6

File hashes

Hashes for pywr-1.11.0b0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c11d9f79166e876041f17e6cf559b361a7458149e25fb0e5eafaca43ee0631cf
MD5 5a13ae7c614a9794f4ec16f1fd926730
BLAKE2b-256 f3aeeaf9b42575859a6ff094de0f1a336ba202b1a9de0c89bfb093436af08c8e

See more details on using hashes here.

File details

Details for the file pywr-1.11.0b0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pywr-1.11.0b0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6

File hashes

Hashes for pywr-1.11.0b0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 2a78fb130dd52489ecca78d39ff22fa5d22e3c1564fef57a71f766e3edd13593
MD5 d3473b7810a49d19a8ea03644091c957
BLAKE2b-256 ff3074fd033891e2e5a032338c16eb6654fd4fdcb681b6eb29a8f439d5d5164f

See more details on using hashes here.

File details

Details for the file pywr-1.11.0b0-cp36-cp36m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pywr-1.11.0b0-cp36-cp36m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 14.5 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6

File hashes

Hashes for pywr-1.11.0b0-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 83a15ae85e5bdb7180cfdf63c6164469bd0c4f08159f0ff5bb15297ba86b7272
MD5 4b771fdc082cfe8fab4709591aeb3796
BLAKE2b-256 49c4b2c796aafacbcf581c6459eaf6a73fdcf298e6528acb29c021ab4c0c604d

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 Pingdom Monitoring Sentry Error logging StatusPage Status page