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://travis-ci.org/pywr/pywr.svg?branch=master https://ci.appveyor.com/api/projects/status/ik9u75bxfvracimh?svg=true https://img.shields.io/badge/chat-on%20gitter-blue.svg https://codecov.io/gh/pywr/pywr/branch/master/graph/badge.svg

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.

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.

License

Copyright (C) 2014-19 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.5.0.tar.gz (3.1 MB view details)

Uploaded Source

Built Distributions

pywr-1.5.0-cp38-cp38-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

pywr-1.5.0-cp38-cp38-manylinux2010_x86_64.whl (16.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pywr-1.5.0-cp37-cp37m-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

pywr-1.5.0-cp37-cp37m-manylinux2010_x86_64.whl (13.4 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

pywr-1.5.0-cp36-cp36m-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.6m Windows x86-64

pywr-1.5.0-cp36-cp36m-manylinux2010_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

File details

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

File metadata

  • Download URL: pywr-1.5.0.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.10

File hashes

Hashes for pywr-1.5.0.tar.gz
Algorithm Hash digest
SHA256 90e14e85f8255f710cfad0ec188c264fe55a066b9cf7f1e47d993db9d8e75155
MD5 b091169ac59e90d518209e1a1c29b7ee
BLAKE2b-256 e3b2b2c39bc41c9c3770c20239dc59dc17f647311ff54e141cbb99145577ad5e

See more details on using hashes here.

File details

Details for the file pywr-1.5.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pywr-1.5.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.10

File hashes

Hashes for pywr-1.5.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3f329b3ad59ecf36cf96ee32157ce809919616f688b33381e33cd647cfcc4a49
MD5 1657902660388c1c49e6e936348cbf48
BLAKE2b-256 eee81f5b554e812e917f9799dc06f92eb91a52b0a598cf013a29d0972f1959fd

See more details on using hashes here.

File details

Details for the file pywr-1.5.0-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pywr-1.5.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 16.0 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for pywr-1.5.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 70f42bf3c3efddce5867f34a19045c93efbeef6f0cf6b8a3c6db3267e807825a
MD5 b27e0cf3e9e2e1942c79716272cdff34
BLAKE2b-256 c905bc8e3fb5a2ac99bf12b2f39f492d5f822d77786d28b117c7c1f03669d5e7

See more details on using hashes here.

File details

Details for the file pywr-1.5.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pywr-1.5.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.10

File hashes

Hashes for pywr-1.5.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 7e59eec78ff84faa4ce9f1127cb7888c93bba80de255638a44e1ef23e4acfb66
MD5 6d8b9a7fd3ad7485abd39771394e54f4
BLAKE2b-256 496118e4ab90316e860a1ea1ac1550af543a4925b8229d30faabcaf7f1cefed0

See more details on using hashes here.

File details

Details for the file pywr-1.5.0-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pywr-1.5.0-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 13.4 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for pywr-1.5.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 12710c138ac45a760c8669d783d8ac337d776939e274c77be207f89a7b72f003
MD5 5dd7af61af82a31f0c06f77dd9078722
BLAKE2b-256 9cc56e7a218b8fa13e0480ba41e535171a7e90dbbee47a0ff3de4b7be115603c

See more details on using hashes here.

File details

Details for the file pywr-1.5.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pywr-1.5.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.10

File hashes

Hashes for pywr-1.5.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 20c76db28470d5dd69d27343be2556b5a79b5998f2558ed2023590075dadb00f
MD5 74f0fa150715cfc0be7d4142b166cc26
BLAKE2b-256 0c7109f7119424dc3a9da98114bd856c16f40247e292a568b18a92e66747506a

See more details on using hashes here.

File details

Details for the file pywr-1.5.0-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pywr-1.5.0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 13.5 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

File hashes

Hashes for pywr-1.5.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ce54019bdb01902217ed3616d41a8885317c9b2c06d4bad059ac3ed1e987aedf
MD5 e0b8ea8d0fc1d752db5af1c377ef7c0a
BLAKE2b-256 9ebe4627d5794a0be5969a7152bedaa4c90b03e030edaaa540fe674cfb7b099f

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