Skip to main content

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.31.1

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.31.1
File Size Uploaded
pywr-1.31.1.tar.gz 3.2 MB Details

Built distributions (wheels)

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

Total release size: 124.0 MB

Release files / pywr-1.31.1.tar.gz

Download URL pywr-1.31.1.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
b23f6c611a47dce0c4a8c9b932e419d82cbb3c0cb022273613c552f7e74f3816
BLAKE2b-256 checksum
How to use checksums
41a3fc92e1838db0c969b52e110a302f0389546b7fe1275b74cc36fa20d88aee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

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

Download URL pywr-1.31.1-cp314-cp314-win_amd64.whl
Size 3.7 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
c54a49e7713d47b676e1a82bcaee5969f6d24ee28589937faddf38c797c855d8
BLAKE2b-256 checksum
How to use checksums
1a140ee167a87f26c20792e7bb54fb09bc6563efb9fec3c00d1ccb9cf010aba2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

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

Download URL pywr-1.31.1-cp314-cp314-manylinux_2_34_x86_64.whl
Size 20.3 MB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
000815a395aba660b9a505636c4d1e305f1ea51c7e58dba4a12846334ba2c41f
BLAKE2b-256 checksum
How to use checksums
f20d8e13438407bc6c6b33bd9b2122b796836520b230526815a601b520a1d6f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

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

Download URL pywr-1.31.1-cp313-cp313-win_amd64.whl
Size 3.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
414fbc69bd64260bb266398e8316dda86454c3066bba9123b71fcfc7b9ebc723
BLAKE2b-256 checksum
How to use checksums
60e8e215b2c6cde57a974bf6cd45cd05176232edc35ebc5296b201f1cc24e89f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

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

Download URL pywr-1.31.1-cp313-cp313-manylinux_2_34_x86_64.whl
Size 20.4 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
1f7e9f8b342d67495b3e7b2b14245469e9dd4cce4cf18ef163b4c8d9a6a27a19
BLAKE2b-256 checksum
How to use checksums
80b1a1e8003418eea393e5d36ea2667141e8127978ee1b5538b8dab3ca7e8346
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

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

Download URL pywr-1.31.1-cp312-cp312-win_amd64.whl
Size 3.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
ffd81d422ea896d8331cb6570d663827178cdb191dbeed4c9513db40b467da0b
BLAKE2b-256 checksum
How to use checksums
cd5365c00c05b6265730a83a1b8d21843d72ebc8e8c319e0ce20c041da29233e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

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

Download URL pywr-1.31.1-cp312-cp312-manylinux_2_34_x86_64.whl
Size 20.6 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
88873a2b8aadc4b81b4fa31b683fc36af350bfa41a6e03672e42821b892be33f
BLAKE2b-256 checksum
How to use checksums
94d0f63e69755ec2b80bd1c36c2b5afeda1cdb1627e609028a0ec3141f3e664a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

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

Download URL pywr-1.31.1-cp311-cp311-win_amd64.whl
Size 3.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
e2a39f38baf30ebdfa9cbdfd40f83caa24723fa4ce0978da001a16501b27d751
BLAKE2b-256 checksum
How to use checksums
a1a3dff0e2c0938b57a4a7bccf242b9ade74008a93ee50f53ab137537b0a6738
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

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

Download URL pywr-1.31.1-cp311-cp311-manylinux_2_34_x86_64.whl
Size 21.3 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
ea483abd8ce304f977208168200438410a7caad9e13a865d39249b8788a2f55e
BLAKE2b-256 checksum
How to use checksums
e2551f45b629c0e8c249a9a75c5018f90f497b3c182a76ccbde537396dc1dbf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

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

Download URL pywr-1.31.1-cp310-cp310-win_amd64.whl
Size 3.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
9c89cefe9ff7ba7a35114f5b844c37e4f17406b414a361637141d66a21d18530
BLAKE2b-256 checksum
How to use checksums
f05643a2bc0486d8838b15c209b1b14464ae2b059e3c184c651e7e6c04414545
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

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

Download URL pywr-1.31.1-cp310-cp310-manylinux_2_34_x86_64.whl
Size 19.9 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
e0c64bbd7e8388191ce40fafc4a7169811db43dafd510e1364c0a062069986ee
BLAKE2b-256 checksum
How to use checksums
46efd0f0508b86b26b231249bb73395a8dd11d5318fb4c1a451042fd3a62913e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

1.31.1 This release

11 release files

1.29.0

9 release files

1.28.0

9 release files

1.27.4

9 release files

1.27.2

7 release files

1.27.1

7 release files

1.26.0

9 release files

1.25.0

9 release files

1.24.0

9 release files

1.23.0

9 release files

1.22.1

9 release files

1.19.0

9 release files

1.17.2

9 release files

1.17.0

6 release files

1.15.1

6 release files

1.15.0

6 release files

1.14.0

6 release files

1.13.1

6 release files

1.13.0

6 release files

1.12.0

5 release files

1.9.0

7 release files

1.8.0

7 release files

1.7.2

7 release files

1.7.1

4 release files

1.7.0

7 release files

1.6.0

7 release files

1.5.0

7 release files

1.4.0

5 release files

1.3.0

5 release files

1.2.0

5 release files

1.1.0

2 release files

1.0.0

3 release files

0.5.1

5 release files

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