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.27.3.tar.gz (3.2 MB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.13 Windows x86-64

pywr-1.27.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.0 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12 Windows x86-64

pywr-1.27.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.0 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11 Windows x86-64

pywr-1.27.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10 Windows x86-64

pywr-1.27.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pywr-1.27.3.tar.gz
Algorithm Hash digest
SHA256 3b87dcd7733a4f4a4369afeff467c63df2d1597d09f077c048f985b4d817678e
MD5 b34438977c6393213fc170d3a116828c
BLAKE2b-256 07103494926fb7d98fbca44906941a3ae8010550fff1be81522e32b2917bc53b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.27.3-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.12.8

File hashes

Hashes for pywr-1.27.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 790e52508b71157ecff43204178eeba4906329a8b5f40929b34c26e23f9d0a95
MD5 dabe5e595a37b84ccb7071b8dee214b4
BLAKE2b-256 2463d8b4bd7ccdabf372a59823f0c33d400f5f4679a467016e138a20968558a1

See more details on using hashes here.

File details

Details for the file pywr-1.27.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.27.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 93203733e8e6bf612bd3363e078c48bee33a6f35669f7d0887b7366f0c8a19f5
MD5 bc91d539ec92a2e31731cc8070786682
BLAKE2b-256 cc9cb04331f26402882cec7a652dbd9494174815f8d27be65270a799315fab5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.27.3-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.12.8

File hashes

Hashes for pywr-1.27.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 36584e7beb984eee51991af37a58f0729a497ef2d8c69ad5e83ff5020a6ad157
MD5 21235c38d75c9a007a239c5bd026540f
BLAKE2b-256 c98e910a2abbe55577fcae383c6a5a5cbcf576682ed2f4fde10f8f92b2b43714

See more details on using hashes here.

File details

Details for the file pywr-1.27.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.27.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 373c0b3cfa30673071d6a92a20e970f6cf3c86918e027559755c8c47546047aa
MD5 4008bde18418b0c65c8a2ec2dfe63fc7
BLAKE2b-256 c723e0c4bb76470ae75352321f58184445bfd80f97a4fb50adb6c5cfe74723e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.27.3-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.12.8

File hashes

Hashes for pywr-1.27.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fe2bb67cc1073adae6255aeeab224bc1c7c6f53dd982dce764a41df9d450b639
MD5 260ac8c7ba17f5c546779ac88614a9fd
BLAKE2b-256 ad74bd95ac8f72a9270b6f011301537bb9c94b76252e7259a2a7b1f98d1b9dea

See more details on using hashes here.

File details

Details for the file pywr-1.27.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.27.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 88f1304176f257ccc033b9f8d9d8cef298268bead4c82fc1c239d6a67c0a95c4
MD5 7abc273858351d0e680d438b0a8cfd72
BLAKE2b-256 26ec74e3f1165fe49343e9db7afc54d16fe5c28b75feaff46fa79e98833860f3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.27.3-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.12.8

File hashes

Hashes for pywr-1.27.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c561ac102aebce52bba75ae9d2d26152bc90a565947c982ac8a5b28ea8a79b68
MD5 c875945918029221a1d7ad5ecd11d920
BLAKE2b-256 9f59285e86c2c9cc1adf3b0e875bd3840dfe8516fb9e6a6ce9efe70702ee8c6c

See more details on using hashes here.

File details

Details for the file pywr-1.27.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.27.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ad22bb2f6988cce72dba64d50b87c4265ebb65132a78ae511bb00e3edcfcae22
MD5 4987835704f44337c49080b50848ff2c
BLAKE2b-256 4dfaa76657459933e590e6b25703fe04bbfe79a9e312bd1482760e6d12bd4bac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page