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

Uploaded CPython 3.14Windows x86-64

pywr-1.31.0-cp314-cp314-manylinux_2_34_x86_64.whl (20.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.13Windows x86-64

pywr-1.31.0-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.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

pywr-1.31.0-cp312-cp312-manylinux_2_34_x86_64.whl (20.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.11Windows x86-64

pywr-1.31.0-cp311-cp311-manylinux_2_34_x86_64.whl (21.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.10Windows x86-64

pywr-1.31.0-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.0.tar.gz.

File metadata

  • Download URL: pywr-1.31.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.12

File hashes

Hashes for pywr-1.31.0.tar.gz
Algorithm Hash digest
SHA256 94c9588dbf9f6029b921cd0092c4f5bd42afbd5fcaf9e1356f8e34fc45353e16
MD5 f8e99937b447263bb16d15b01786968a
BLAKE2b-256 f99d17d1fbda48ae16bea310c1c9296ba34ba3f83a01b950a95faf6147592b5f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.31.0-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.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 5512fd85e6ff9edb613d66c584f71704bdf482d6e6e5337d7761ec0c880155f7
MD5 e7f3b05d40d84d421aa170bd6c2b06d7
BLAKE2b-256 cc3568c7624958f7ad7c518e5876768d1e549d18f21f1d1fcd67a08fa386c28f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.31.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b483e1ca3eb00016dddfbe458d2b2c1b844c5727d1b57a54540ee2904a2798e9
MD5 a488981e5dc3cad136ac84ebb9fb8784
BLAKE2b-256 327874f94783696623babca5480eb6d9fdb863e006d179ae1b6406d6b9cb83f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.31.0-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.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d6994290a5aebc88849dba81fcff9d373a918b39558065ce70a3fc0d3eebe2e9
MD5 4af1973536212e156f90c99f5af65e24
BLAKE2b-256 9135706c52130b993da368cdaa5899e9e139c8faaedb42316770c34ad2046bba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.31.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8b442a967a9008cf0f201f99acbf17d68918450bca15d924ab6463890e986a78
MD5 cf69bba19d09b0fc4278cf813772774f
BLAKE2b-256 a307060b5b20329a5d085988cdcf0cefc2a45d9fb65ad3745384fa2dacec1410

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.31.0-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.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c629656834b80a91cd3d0c9e585c2a053663264ccfdc2c87eb28343c522ce8d0
MD5 5b2bc601fd0811883a0ca2a6a0ae0616
BLAKE2b-256 1ca41e0838cf26965d2294aafd69bfaf286f1ab8b012f5a977517d13d7a6b64c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.31.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 575572c2f7f3e61f4d048453eff65815ae8c9db52338d4140b504a697df5aa9c
MD5 82de131df59fc530ae368dec40bafdf4
BLAKE2b-256 8421e82a92e9ae78518ff1498b0e4a031c72a734bd4807ff7ef0f3fb93253b77

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.31.0-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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fb4346244f18179c3c44fa29769fb192229b156e084ea636c7e7e5089550de0b
MD5 7429cb33ea82c772726a20392eb8325b
BLAKE2b-256 eb594f346dcde24f4947fedd4867f616b33f2f9d2847eecd37f5a2c8c2df5051

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.31.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c89497647260cad85f73da8b0e0f180445c08de7932f6d413959aa37c48a5d1e
MD5 8ad98bd5425c635a9ae2dae6eb53a61a
BLAKE2b-256 6e67a5cb1b90f1be9d4af01c0a53a1aace5a924865964a584d3a9202005bba63

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.31.0-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.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b8ce77b2f392f04fb8fab66600cca103eec269046878d110c1c58e037db9b87c
MD5 02968042b46ab0c7ab9108ec7e1b5ba1
BLAKE2b-256 cd8decacdf62d9d9cbcc5c4d7a83ead32f2b7d58bd14c3e9621e0b0804a2de3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.31.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 57daf34fcda04c32d80a5d37ddc42341c6d75b10d5ac83f010ecc4a1f3e216e6
MD5 b21cb345803aa62b69160d2c4d069b60
BLAKE2b-256 5e2a34187049caa453de2933ee313ad71fb9c4e293034bbb49862dcd5b4f8e74

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