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://travis-ci.org/pywr/pywr.svg?branch=master https://ci.appveyor.com/api/projects/status/j1llo3j6o4ww9t1t/branch/master?svg=true https://img.shields.io/badge/chat-on%20gitter-blue.svg

Overview

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.6 (or later) on Windows, Linux or OS X.

See the documentation for detailed installation instructions.

Provided that you have the required dependencies already installed, it’s as simple as:

python setup.py install --with-glpk --with-lpsolve

For most users it will be easier to install the binary packages made available for the Anaconda Python distribution. See install docs for more information. Note that these packages may lag behind the development version.

License

Copyright (C) 2014-17 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.0.0.tar.gz (3.0 MB view details)

Uploaded Source

Built Distributions

pywr-1.0.0-cp36-cp36m-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.6m Windows x86-64

pywr-1.0.0-cp36-cp36m-manylinux1_x86_64.whl (10.5 MB view details)

Uploaded CPython 3.6m

File details

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

File metadata

  • Download URL: pywr-1.0.0.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for pywr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fdaddaf772c128f6bcc61e937b18dfc0ae5f80c3a0bf592fac97dd6579cd002b
MD5 ec64394ab08c62fd5f5891c7b11bb9ae
BLAKE2b-256 b6cfbcfa7ec5da44cdbae6df9e8b2e4192cc46e2a75941bb8869f93826316017

See more details on using hashes here.

File details

Details for the file pywr-1.0.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pywr-1.0.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for pywr-1.0.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 22d9b3462448569b075e989c679ef46d011900c7bc1ee282c0ee1fb308cdbb8f
MD5 88f0349a0384892fe45ac84275d7d0ed
BLAKE2b-256 9e71adabbd7e8c0b99e686e77b67fe9ebf6c352e96a52aecbf60e994254a4b33

See more details on using hashes here.

File details

Details for the file pywr-1.0.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pywr-1.0.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.5 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for pywr-1.0.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 027396d3989f78ec2bd0ca587716c3b6bda15d2846270432cd7469a2220231fc
MD5 6c0e9031527ae6f929779b20a3bf2a2e
BLAKE2b-256 ceb741622fe31ee54d206e1f1e19fa70f9bc229330201ed8c4e4c6c3971af758

See more details on using hashes here.

Supported by

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