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.31.1.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.31.1-cp314-cp314-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.14Windows x86-64

pywr-1.31.1-cp314-cp314-manylinux_2_34_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

pywr-1.31.1-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

pywr-1.31.1-cp313-cp313-manylinux_2_34_x86_64.whl (20.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

pywr-1.31.1-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

pywr-1.31.1-cp312-cp312-manylinux_2_34_x86_64.whl (20.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

pywr-1.31.1-cp311-cp311-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.11Windows x86-64

pywr-1.31.1-cp311-cp311-manylinux_2_34_x86_64.whl (21.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

pywr-1.31.1-cp310-cp310-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.10Windows x86-64

pywr-1.31.1-cp310-cp310-manylinux_2_34_x86_64.whl (19.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pywr-1.31.1.tar.gz
Algorithm Hash digest
SHA256 b23f6c611a47dce0c4a8c9b932e419d82cbb3c0cb022273613c552f7e74f3816
MD5 0d11134950d1f2c587888eebe8d930da
BLAKE2b-256 41a3fc92e1838db0c969b52e110a302f0389546b7fe1275b74cc36fa20d88aee

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pywr-1.31.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 c54a49e7713d47b676e1a82bcaee5969f6d24ee28589937faddf38c797c855d8
MD5 57c8a5f2f01d371ee1493319c5deeac5
BLAKE2b-256 1a140ee167a87f26c20792e7bb54fb09bc6563efb9fec3c00d1ccb9cf010aba2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.31.1-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 000815a395aba660b9a505636c4d1e305f1ea51c7e58dba4a12846334ba2c41f
MD5 ac01e21b319277d4b964ddecec0c2a51
BLAKE2b-256 f20d8e13438407bc6c6b33bd9b2122b796836520b230526815a601b520a1d6f0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pywr-1.31.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 414fbc69bd64260bb266398e8316dda86454c3066bba9123b71fcfc7b9ebc723
MD5 849cb09b2387944d5ddc5356159f5652
BLAKE2b-256 60e8e215b2c6cde57a974bf6cd45cd05176232edc35ebc5296b201f1cc24e89f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.31.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1f7e9f8b342d67495b3e7b2b14245469e9dd4cce4cf18ef163b4c8d9a6a27a19
MD5 625623c85266cf923e95fabe7e45e603
BLAKE2b-256 80b1a1e8003418eea393e5d36ea2667141e8127978ee1b5538b8dab3ca7e8346

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pywr-1.31.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ffd81d422ea896d8331cb6570d663827178cdb191dbeed4c9513db40b467da0b
MD5 9034ee0cb227c6929cd53e9e99b3e15d
BLAKE2b-256 cd5365c00c05b6265730a83a1b8d21843d72ebc8e8c319e0ce20c041da29233e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.31.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 88873a2b8aadc4b81b4fa31b683fc36af350bfa41a6e03672e42821b892be33f
MD5 26bc9feb6a11c0d20ec8eba10ec47000
BLAKE2b-256 94d0f63e69755ec2b80bd1c36c2b5afeda1cdb1627e609028a0ec3141f3e664a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pywr-1.31.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e2a39f38baf30ebdfa9cbdfd40f83caa24723fa4ce0978da001a16501b27d751
MD5 59e10a87d637a44c3d7130a55a642230
BLAKE2b-256 a1a3dff0e2c0938b57a4a7bccf242b9ade74008a93ee50f53ab137537b0a6738

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.31.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ea483abd8ce304f977208168200438410a7caad9e13a865d39249b8788a2f55e
MD5 adcbeb0eb1aa4810c1fb7c4eac3f11ea
BLAKE2b-256 e2551f45b629c0e8c249a9a75c5018f90f497b3c182a76ccbde537396dc1dbf3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pywr-1.31.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9c89cefe9ff7ba7a35114f5b844c37e4f17406b414a361637141d66a21d18530
MD5 f7d0475aa156b5e0a81b54017d4b7f54
BLAKE2b-256 f05643a2bc0486d8838b15c209b1b14464ae2b059e3c184c651e7e6c04414545

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.31.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e0c64bbd7e8388191ce40fafc4a7169811db43dafd510e1364c0a062069986ee
MD5 5a44a6d914ad9e5813c3599d8480d764
BLAKE2b-256 46efd0f0508b86b26b231249bb73395a8dd11d5318fb4c1a451042fd3a62913e

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