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.30.0.tar.gz (3.2 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.30.0-cp314-cp314-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.14Windows x86-64

pywr-1.30.0-cp314-cp314-manylinux_2_34_x86_64.whl (19.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

pywr-1.30.0-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

pywr-1.30.0-cp313-cp313-manylinux_2_34_x86_64.whl (19.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

pywr-1.30.0-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

pywr-1.30.0-cp312-cp312-manylinux_2_34_x86_64.whl (19.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

pywr-1.30.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

pywr-1.30.0-cp311-cp311-manylinux_2_34_x86_64.whl (20.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

pywr-1.30.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

pywr-1.30.0-cp310-cp310-manylinux_2_34_x86_64.whl (18.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pywr-1.30.0.tar.gz
Algorithm Hash digest
SHA256 f7cca3851132980415cdf441a204846e6b67527f73761fa06102cad67c5e8205
MD5 bac9e3e6f36619a7e69359eb7ba5a731
BLAKE2b-256 165bc810e390a8f33ec949ab050bad2bd86588f4874126132e5bdc98efa97fbd

See more details on using hashes here.

File details

Details for the file pywr-1.30.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: pywr-1.30.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pywr-1.30.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 56ddc6eae4d96dc6844f74ce5c74637e136a390c03d1a764286f2dde921d879c
MD5 08118624b878258d4009b7c2d42d995a
BLAKE2b-256 571a30a97f94a36467507ca1a1d555368ffc7255978a06574c4bf7b0bb5e8963

See more details on using hashes here.

File details

Details for the file pywr-1.30.0-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.30.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c57295c92939460a5830679dca01b13c2c02c4b0ec7593a6f4ea6aef10c0be77
MD5 f2a8bc41deb3d7c846a4682170b0d7e7
BLAKE2b-256 232731133f08f40d8c54b288d2639c83e43e285fd11400a63106410b8db9d2b5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pywr-1.30.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9bbaf076a9756abc149096505f5b3eeabbf4b4522ac0b7fae6f5f2d99ce543f1
MD5 07e2d7928ac4445e3dd7f46524f73b8e
BLAKE2b-256 93179ef91249c26b1e16092a1629810e2f85f00d44ebabf793340b86efa3a552

See more details on using hashes here.

File details

Details for the file pywr-1.30.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.30.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a3c3afc12c6b4c13c7ed2b155d7e8b21ba255e83ca0546b64b1517ae40611370
MD5 9108d55f47f217d089d7672a78c876fa
BLAKE2b-256 97bd3339e206d655705674e2d11ddd22a66bdd059ef096bd67f83b111125ea8c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pywr-1.30.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3f96902e7f122b08103820bbb08adf68f73c6940a5857fd6ddc7aa858315d477
MD5 7e824af03f932accbf59ff6f71c63bac
BLAKE2b-256 924813d8858b05fb4e7e947aa677d1fade2718941f78e4483d8817f8560ff70e

See more details on using hashes here.

File details

Details for the file pywr-1.30.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.30.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 19cba6f93b50d3c3efcb20af059d7c356713b06ef51b34f7f1b59e6d580b7cb8
MD5 6eb3c64f61afb23285fc93a20d5786da
BLAKE2b-256 3138791bc1e8d2419776190f868ab37538caca5018610306f6e477dcadf3bf9c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pywr-1.30.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 af138849db61759e3d2d9abec624c6ca845368248eb330bd8d81e2150b8de739
MD5 dca9a8f5994dcadc2b5650baaa042365
BLAKE2b-256 68a3ce086336b5186a764d5c230232ebb9c162c61aa1ee8600f9dc29f8acaa4d

See more details on using hashes here.

File details

Details for the file pywr-1.30.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.30.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ae163ab5914edfea09916ada4e1c1166bb6cbbcfc4357898f6cf8a13624749d8
MD5 06e860000f5c35b03c57878c90322159
BLAKE2b-256 1eea005f967b8668fffd8b7a0f6cf52e235f703e15e1de42f96c2690906dac62

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.30.0-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/6.1.0 CPython/3.13.7

File hashes

Hashes for pywr-1.30.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cb8e50b256726335e6fc758423936f542cfb9b01f038261b9c078a82b8cabe5d
MD5 15941eeae863935a169c840edeb6bd2d
BLAKE2b-256 2eecb02e77485880f223efbeb264fb2d4c2aff6d3761ff2953cc6ae2f88a3a08

See more details on using hashes here.

File details

Details for the file pywr-1.30.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.30.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 86ade53eb31b7d10d86007ac72c68a7fb3927b005af44a4d33a713563cbb4730
MD5 3bdae0d0b835f165342ff9c8e54926d0
BLAKE2b-256 98ef9fe16a370e682beea88a75716db5efa89b7a61054519f7ea6ecc4282e204

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