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 https://img.shields.io/badge/chat-on%20gitter-blue.svg 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.20.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.20.0-cp311-cp311-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.11Windows x86-64

pywr-1.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pywr-1.20.0-cp310-cp310-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.10Windows x86-64

pywr-1.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pywr-1.20.0-cp39-cp39-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.9Windows x86-64

pywr-1.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pywr-1.20.0-cp38-cp38-win_amd64.whl (4.8 MB view details)

Uploaded CPython 3.8Windows x86-64

pywr-1.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

pywr-1.20.0-cp37-cp37m-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.7mWindows x86-64

pywr-1.20.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.2 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pywr-1.20.0.tar.gz
Algorithm Hash digest
SHA256 6e70bb830b2f5e1862cfe0af58b5e5a29a79d20c3ee7c763c83d60b50cdf6008
MD5 c717fa443028ce172fd4f0f09dae130d
BLAKE2b-256 286ef34f9ac0025d5462d10ab095a60019caf7437c683983654b3c9a0fcc0a17

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.20.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for pywr-1.20.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 15c79bef32965895246888b8ea58d3efbfd4e794fc84385124dd843432c55081
MD5 e3facf1dcf8e1adcdc01fc47263c3c16
BLAKE2b-256 b3fd513b5af68966433caab3f3bd7803135004d3890315390ff9a5f0e6c106f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7cf4635b5b6373ce246a4796ec25b56210d61c92e37bb0a359d0321228bcaecc
MD5 54fa82509bd4d68e08468e6eb3e9c870
BLAKE2b-256 2ada818f4454e10afe853ef6e704ded98f2c0df78cf210be61596c6f30214592

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywr-1.20.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for pywr-1.20.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1aec8dfe791c752aaf78f3108eaa8bb01745c5a5a31005b50a7ae6fca01cb3d3
MD5 50bed794a586aa92e5c7d754a90bdbce
BLAKE2b-256 de599481b15b87c54645f453f9a6cae75d128c31bc715068d2d67451c5c0cdca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pywr-1.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e3bc99908020e11dab8a2841bc06b605affb263fcc4b9e4760ab25c050f191cf
MD5 fd5223d9b56a736cf74c31bc5d3de771
BLAKE2b-256 71ca68c5b73b084497955d940757d2c468feeebc5d31c2ff919cb574238471a3

See more details on using hashes here.

File details

Details for the file pywr-1.20.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pywr-1.20.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for pywr-1.20.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a7ba3d952193ecfdd063a70211ab5ee3fdbe2f07dff63f41f799e95f87c65283
MD5 93615c669909a0b1a5cecb730df3bc2d
BLAKE2b-256 8aab01d880e82ae9ea7311fe125fba93adcc697493a3f125ac6b685010fb98d7

See more details on using hashes here.

File details

Details for the file pywr-1.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8bfa0c27ef41ec7781c60fa01cfafdc95a418322100f08ea38e9c079ef660d6
MD5 7a2a07b44f606119c595bbd0c3b65e64
BLAKE2b-256 1f12e877ffaca3d484b183becaf254ab1e4f66d7fb80f7d4442c851270d687be

See more details on using hashes here.

File details

Details for the file pywr-1.20.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pywr-1.20.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for pywr-1.20.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d8f6fc2ca7d537ea0aee7d6c4aa57c1642cc43d31cc32e938243b2ce680f31be
MD5 2824dd85604309956f559e74b35e781b
BLAKE2b-256 36c1d76e32ddd8054e1c4c28b409cd365b1e2782016765df671abed6d3e3e3cf

See more details on using hashes here.

File details

Details for the file pywr-1.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d14095b4bef4b1b795b001ae3703f49525661543c363e160ad85adf36a9d86c6
MD5 a4eee111e0b55ce027fa412dc6d2449c
BLAKE2b-256 6163636ef4acca022db4a55ee4f70fe9d9d6a0b3c5861432c8fdfb8ef7bb8565

See more details on using hashes here.

File details

Details for the file pywr-1.20.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pywr-1.20.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for pywr-1.20.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 7dbcc63316cf0231a6cc83de578a1478346b70cc183534853c9d4247a36ffe3a
MD5 fd0397c810c90808ba8ac0606f5b16d0
BLAKE2b-256 a5d7cf40222e3a27d94d24dbc27ca71bf0fb1c56d6082cb0531a736a07c8aee1

See more details on using hashes here.

File details

Details for the file pywr-1.20.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pywr-1.20.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d89525ad8f3c397367a82df24d8f3e1a25e151b606e82bb35a68a5dd81a06d9e
MD5 05ca5c6afd746e59f7151c75b12b78c3
BLAKE2b-256 4efcb9b10eb7ba48f14349347fe4ea05bc29c15216008cc058aacf7498296a4a

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