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.27.4.tar.gz (3.2 MB view details)

Uploaded Source

Built Distributions

pywr-1.27.4-cp313-cp313-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.13Windows x86-64

pywr-1.27.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

pywr-1.27.4-cp312-cp312-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.12Windows x86-64

pywr-1.27.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pywr-1.27.4-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

pywr-1.27.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pywr-1.27.4-cp310-cp310-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.10Windows x86-64

pywr-1.27.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pywr-1.27.4.tar.gz
Algorithm Hash digest
SHA256 246900d08b7125524eef2ccd9409a5059255a0f89531c3a1198ebd121788a520
MD5 b3d337a4212324094e2460b86408ca8b
BLAKE2b-256 b0b1c661a6ef2c87dd748a79905fbf846f4de44551965b0eded53f375ebf025b

See more details on using hashes here.

File details

Details for the file pywr-1.27.4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pywr-1.27.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pywr-1.27.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c3e8eec0a1e198c6b659ddd1fdabd07ed4cd61354460e5d7ce840bf0809b011c
MD5 cbe2465c67039b94d0bcd1e5d544ff8d
BLAKE2b-256 c6b0c7f3385bee711ad7cce45719adb1691db7ed97760c8bb8acb4594bee3685

See more details on using hashes here.

File details

Details for the file pywr-1.27.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.27.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7631178426e2c8a6f21518ee0e080bd7a636ae63a400904014c99934418b9cd7
MD5 ea068c772d6a80a12d7af7739324f043
BLAKE2b-256 68ae5183355d51c4385f52d3c3558c31cf82fc3d2d52caadc4913da8e68d0f09

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.27.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pywr-1.27.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 daf941e16278a6da60948df9815521e0bfdb62b5a097f279a4442b5d26b83b3b
MD5 9c1838425e0134119f8b918933572d37
BLAKE2b-256 715fc5ccf3e93958149c72e9bab05583eab85e71329deca9438df99fea61152c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.27.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5b5125b0ffb49d8136839e8732f8688019ba1eacfe39f5542932f9956c5aa772
MD5 6d22a53f9addf616f7df40b1fe985c2f
BLAKE2b-256 0f55fc33317b59a0c8911eb066d0c194c727ab57cbaa5bf74c17473722859131

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.27.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pywr-1.27.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 512d178171f0fa079a459d56a9ab115e4b294ab7466f79543cd97191ab820215
MD5 4ddf8d4a35c12ffcf4b3975c401a7014
BLAKE2b-256 411ddd419d51783805bd7b2d9826f288098c35cb7ade0810432fdd8a8bd4cae9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.27.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 03c01442d6b1d7ce2d3170c3fe6741d7605f883972112a19f5fe4c20c49f3bcd
MD5 7e73daeab9c5fab80660c3625eb485e8
BLAKE2b-256 bb522c55e6506393c1dc7fe8c62968e6122666201fb4e4a4a9fb0d3ba7a314c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.27.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pywr-1.27.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 aecae00666760e92be033eae1bbf91b1347541a74b7b013fcf582c177572815e
MD5 83efa18a67562d4d3693ed09fff42e30
BLAKE2b-256 9818ea628f084bc044e1695dd0a3290a4dfb87188db5b3007e190bed7337925e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.27.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 155bffb75515dc0cbc60040d307160f600f67776b6d528fcc9d9e49e7827672c
MD5 19e801fbddf6867af15953f77d822c95
BLAKE2b-256 89beac7afac1637d4257e735d48a8fc427870a7a214d08c90dc36d8522e2da13

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page