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.29.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.29.0-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

pywr-1.29.0-cp313-cp313-manylinux_2_34_x86_64.whl (19.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.12Windows x86-64

pywr-1.29.0-cp312-cp312-manylinux_2_34_x86_64.whl (19.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.11Windows x86-64

pywr-1.29.0-cp311-cp311-manylinux_2_34_x86_64.whl (20.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.10Windows x86-64

pywr-1.29.0-cp310-cp310-manylinux_2_34_x86_64.whl (19.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

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

File metadata

  • Download URL: pywr-1.29.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.29.0.tar.gz
Algorithm Hash digest
SHA256 a00bd7efca319bbb715121c2b110446af34802ae4ac9707701ff4f35248e9bb7
MD5 69e2d74d07c1c2921926e60984ceb2eb
BLAKE2b-256 e88e48b478ce295067d076987c44574e946a4664a67b315e7f5e9432f2709c2b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.29.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.29.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2d60d79da49e02c3f737a1cfe302f616591d5179ad3ad14c5b39bfb75637947a
MD5 179f66ee1332269a68924ca723c0e6d5
BLAKE2b-256 23ecab981872c424ba92be9ed0d3d5ae9666a3b3aa82cc6a7f909997d53bbc79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.29.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 152ea6c62730a65a5a64348d5d0cfdaa9429d1b53919d5881387b21c4f6da7ec
MD5 1eb343ceb630b08a3d9d8900aeeff265
BLAKE2b-256 4fc592738fc52374c46a5c66ab54d47222a5f077e6cf43d232dbee2436724050

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.29.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.29.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 25f47aaa658555e1ab898375cb6b5f8c04813f7bcbfd332e5d15cb664a1efa43
MD5 e7c09757654e689dc8df711dda82c4fb
BLAKE2b-256 605fcf9b909f73b7a61f859b71d98975169afad820c0c1b7e4da917d51236a5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.29.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f0c5ba6e59399902fa6ac45e3a78656738562f41fe14c5bcb05ac1ec537c7a05
MD5 035f108fece681a391c50e8f606e3cbc
BLAKE2b-256 a024adddb214b862631911a02ce9f6bdb3dfabdb5320e5f2c7ef43a399814a44

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.29.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.29.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 63ae24ed592731ad14c07e842d0a3d9232c66a8da6216deeb6b9fde38771fc21
MD5 33d508c7435188309efc1f10b3e4063d
BLAKE2b-256 141f1fa7cee8c753717a56d7aef337475be2cf6efd79fa34719a0e022dd322d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.29.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4ba4df475cafcd08b2c52df9ccf1609336f0ba9ecf55b3a7efc1e763e61f4e1c
MD5 18fa8f37f4997e37e4cc8146f5456ffa
BLAKE2b-256 f73c7a7e31abf3463714fb8558a338e7fd6ba9088cc03132faed224f9a58c4ef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.29.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.29.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6ed845bbefc4ecf2b4821a7b729910c09ebf25ae492cb74413823620bd12dd4f
MD5 2a8e70506153513fea0e65c4c10a3d7e
BLAKE2b-256 cd3358b82ae00ce85146930dac3a941cb70cd7fc79a5aab91f609e47597c032e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.29.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 da7630afa27b05ce2486541a241b23f70699b56ed1ae36c3dc23953000265057
MD5 ed551efdf33d92fde33990729353d3c4
BLAKE2b-256 ab48d3edd1768a3e7dcd4374bb0d648bef8543338166dcbefb47cb8d64d912bb

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