Skip to main content

Pywr

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.

Metadata

Release files for pywr 1.32.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pywr 1.32.0
File Size Uploaded Provenance Actions
pywr-1.32.0.tar.gz 3.2 MB Without provenance Details for pywr-1.32.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pywr 1.32.0
File Actions
pywr-1.32.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for pywr-1.32.0-cp314-cp314-win_amd64.whl
pywr-1.32.0-cp314-cp314-manylinux_2_34_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.34+ x86-64 Details for pywr-1.32.0-cp314-cp314-manylinux_2_34_x86_64.whl
pywr-1.32.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for pywr-1.32.0-cp313-cp313-win_amd64.whl
pywr-1.32.0-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details for pywr-1.32.0-cp313-cp313-manylinux_2_34_x86_64.whl
pywr-1.32.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for pywr-1.32.0-cp312-cp312-win_amd64.whl
pywr-1.32.0-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details for pywr-1.32.0-cp312-cp312-manylinux_2_34_x86_64.whl
pywr-1.32.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for pywr-1.32.0-cp311-cp311-win_amd64.whl
pywr-1.32.0-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details for pywr-1.32.0-cp311-cp311-manylinux_2_34_x86_64.whl
pywr-1.32.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for pywr-1.32.0-cp310-cp310-win_amd64.whl
pywr-1.32.0-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details for pywr-1.32.0-cp310-cp310-manylinux_2_34_x86_64.whl

Total release size: 132.5 MB

Release files / pywr-1.32.0.tar.gz

Download URL pywr-1.32.0.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
a534935bf20d48d80282f2e68578616b4320583d5e9c26ad7586389dc2174483
BLAKE2b-256 checksum
How to use checksums
8bbd1b4549d3dcaa93cd4be02631ff0f1495f05f318d534a1938019e75126cac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pywr-1.32.0-cp314-cp314-win_amd64.whl

Download URL pywr-1.32.0-cp314-cp314-win_amd64.whl
Size 3.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
c6f97f38df94662b72c0b0b1112768eae2c4191e03922036a42c43d661609aaa
BLAKE2b-256 checksum
How to use checksums
707c25bc1abb955d434e799f23285406c5abb79a98fa4d8f8e4d75261a4060f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pywr-1.32.0-cp314-cp314-manylinux_2_34_x86_64.whl

Download URL pywr-1.32.0-cp314-cp314-manylinux_2_34_x86_64.whl
Size 21.9 MB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
03368a1463a119970e998fbbee3afd777f9c28b44b432566514eb71b4cd8eb14
BLAKE2b-256 checksum
How to use checksums
0e6645e30a652383587b72b24e4b2c9295f5d9f0ad43d96a348ca1ab93d106fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pywr-1.32.0-cp313-cp313-win_amd64.whl

Download URL pywr-1.32.0-cp313-cp313-win_amd64.whl
Size 3.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
62d5bbefa356410ea1c168ff6542c4ccde92b36436949cadacea2b05ff3eef3c
BLAKE2b-256 checksum
How to use checksums
7689b8488db92d605239ed6e5c0a2a34b038c3225029463ac40a4dc5ae0740c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pywr-1.32.0-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL pywr-1.32.0-cp313-cp313-manylinux_2_34_x86_64.whl
Size 22.1 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
9541cd7b0d66fc0f23bd8526adc2ac33264aba522e488cd06f05afa9638ce2be
BLAKE2b-256 checksum
How to use checksums
f661b0fdba8b4315a668b46f68e0f5164c9e34ea797bbe73fd566ff62f9dfc5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pywr-1.32.0-cp312-cp312-win_amd64.whl

Download URL pywr-1.32.0-cp312-cp312-win_amd64.whl
Size 3.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
8da60e910e17cb3abb708039de3956b125841cbd962db14a2295ff2abf2ad80d
BLAKE2b-256 checksum
How to use checksums
637e4e18c840b07316ddc784f42765202889e8a8ae90dce564c76e4ea048b540
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pywr-1.32.0-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL pywr-1.32.0-cp312-cp312-manylinux_2_34_x86_64.whl
Size 22.3 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
54d94fb0315a263a9815938c1ef1ba090f73c746873e900f5535675573d7cb16
BLAKE2b-256 checksum
How to use checksums
a018f40e0a5af25b8ca41a9ee26e0b1efb575ee0b14d9d8fff0f9e7abc5a1cb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pywr-1.32.0-cp311-cp311-win_amd64.whl

Download URL pywr-1.32.0-cp311-cp311-win_amd64.whl
Size 3.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
d919cc164782749611a6ef5dcc8735195a1f1bc4d333d43140fab732a309c815
BLAKE2b-256 checksum
How to use checksums
0ee1a8aa1fa00233bdcee0aa2bb1c661372065844d6fea3eae388a5af1335981
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pywr-1.32.0-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL pywr-1.32.0-cp311-cp311-manylinux_2_34_x86_64.whl
Size 22.8 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
137fd8089b56577b8bdce0e2076381e28a8e21822c27102e155c72002af473ad
BLAKE2b-256 checksum
How to use checksums
1c700b0baf40d57b73420c2d972cb561275eddb98d041685d44c74fe389bf0c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pywr-1.32.0-cp310-cp310-win_amd64.whl

Download URL pywr-1.32.0-cp310-cp310-win_amd64.whl
Size 3.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
877d45fc20c6ae9deeee1c270f6a68dce4ab7475d8248b45a121406d785c9ad1
BLAKE2b-256 checksum
How to use checksums
8e4d5470f03bb8c3df8b1374ea2b84bdcf3fa50371dae3da8c4b71043c94641f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pywr-1.32.0-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL pywr-1.32.0-cp310-cp310-manylinux_2_34_x86_64.whl
Size 21.5 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
ca87d960df2003cae8f1a912553ab48497c90d8076aafcfa258532dba146a5ed
BLAKE2b-256 checksum
How to use checksums
4b77f8d1d77066b6dc05c22e64d07456c873abe5e812ca97fd5055b509544d96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pywr 1.32.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.32.0 This release

11 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page