Pywr
Simulates customisable water allocation and operation rules throughout complex multi-purpose managed water systems at each user-defined time-step.
https://github.com/pywr/pywr
Category: Natural Resources
Sub Category: Water Supply and Quality
Keywords
hydrology water-resources
Keywords from Contributors
qt water
Last synced: about 24 hours ago
JSON representation
Repository metadata
Pywr is a generalised network resource allocation model written in Python.
- Host: GitHub
- URL: https://github.com/pywr/pywr
- Owner: pywr
- License: gpl-3.0
- Created: 2015-01-20T23:13:55.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2025-10-06T08:37:24.000Z (3 months ago)
- Last Synced: 2025-12-20T06:52:38.341Z (6 days ago)
- Topics: hydrology, water-resources
- Language: Python
- Homepage:
- Size: 23.4 MB
- Stars: 176
- Watchers: 17
- Forks: 63
- Open Issues: 143
- Releases: 36
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- License: LICENSE.txt
README.rst
====
Pywr
====
Pywr is a generalised network resource allocation model written in Python. It aims to be fast, free, and extendable.
.. image:: https://github.com/pywr/pywr/workflows/Build/badge.svg?branch=master
:target: https://github.com/pywr/pywr/actions?query=workflow%3ABuild
.. image:: https://img.shields.io/badge/chat-on?logo=zulip&color=blue
:alt: Static Badge
:target: https://pywr.zulipchat.com
.. image:: https://codecov.io/gh/pywr/pywr/branch/master/graph/badge.svg
:target: https://codecov.io/gh/pywr/pywr
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 `__.
.. image:: https://raw.githubusercontent.com/pywr/pywr/master/docs/source/_static/pywr_d3.png
:width: 250px
:height: 190px
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:
.. code-block:: console
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.
Owner metadata
- Name: Pywr
- Login: pywr
- Email:
- Kind: organization
- Description: A collection of repositories related to the Pywr ngeneralised network resource allocation modelling library.
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/15239563?v=4
- Repositories: 11
- Last ynced at: 2023-02-27T20:50:25.063Z
- Profile URL: https://github.com/pywr
GitHub Events
Total
- Create event: 25
- Release event: 8
- Issues event: 1
- Watch event: 23
- Delete event: 19
- Issue comment event: 30
- Push event: 55
- Pull request review comment event: 2
- Pull request review event: 19
- Pull request event: 43
- Fork event: 5
Last Year
- Release event: 5
- Watch event: 21
- Delete event: 8
- Issue comment event: 20
- Push event: 28
- Pull request review comment event: 2
- Pull request review event: 10
- Pull request event: 23
- Fork event: 5
- Create event: 13
Committers metadata
Last synced: 4 days ago
Total Commits: 1,289
Total Committers: 21
Avg Commits per committer: 61.381
Development Distribution Score (DDS): 0.413
Commits in past year: 19
Committers in past year: 2
Avg Commits per committer in past year: 9.5
Development Distribution Score (DDS) in past year: 0.053
| Name | Commits | |
|---|---|---|
| James Tomlinson | t****e@g****m | 756 |
| Joshua Arnott | j****h@s****t | 451 |
| James Batchelor | j****r@o****m | 44 |
| Batchelor | J****r@a****m | 7 |
| khaledk2 | k****d@m****k | 5 |
| Lauren Petch | 3****h | 5 |
| James Batchelor | j****r@a****m | 3 |
| JackJohnson93 | 4****3 | 3 |
| Stefano Simonelli | 1****i | 2 |
| matrosoe | m****e@g****m | 2 |
| Av Nish | a****h@o****m | 1 |
| David Rheinheimer | r****r | 1 |
| Iñigo Ricalde | 3****e | 1 |
| Jose Miguel Gonzalez | j****a@p****k | 1 |
| Kevis Pachos | k****4@u****k | 1 |
| Mohammed Basheer | 4****r | 1 |
| Vicente Jander | 6****r | 1 |
| adlwk2 | 1****2 | 1 |
| knoxsp | k****p | 1 |
| m7142yosuke | 4****e | 1 |
| tom-gribbin | 7****n | 1 |
Committer domains:
- atkinsglobal.com: 2
- ucl.ac.uk: 1
- postgrad.manchester.ac.uk: 1
- manchester.ac.uk: 1
- snorfalorpagus.net: 1
Issue and Pull Request metadata
Last synced: 30 days ago
Total issues: 56
Total pull requests: 144
Average time to close issues: 6 months
Average time to close pull requests: about 2 months
Total issue authors: 20
Total pull request authors: 11
Average comments per issue: 3.73
Average comments per pull request: 0.63
Merged pull request: 112
Bot issues: 0
Bot pull requests: 2
Past year issues: 0
Past year pull requests: 30
Past year average time to close issues: N/A
Past year average time to close pull requests: 2 days
Past year issue authors: 0
Past year pull request authors: 4
Past year average comments per issue: 0
Past year average comments per pull request: 0.4
Past year merged pull request: 17
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- jetuk (14)
- BaptisteFrancois (7)
- xoxshirl (5)
- ahamilton144 (4)
- ccalvocm (4)
- Batch21 (3)
- aiduran (3)
- s-simoncelli (2)
- knoxsp (2)
- wdvichete84 (2)
- MaVerDel (1)
- drheinheimer (1)
- KevisPachos (1)
- terfani (1)
- TrevorJA (1)
Top Pull Request Authors
- jetuk (103)
- Batch21 (21)
- s-simoncelli (5)
- laurenpetch (4)
- 05michaelallen (2)
- pmslavin (2)
- dependabot[bot] (2)
- MohammedBasheer (2)
- Jmiguel17 (1)
- adlwk2 (1)
- JackJohnson93 (1)
Top Issue Labels
- enhancement (9)
- bug (7)
- question (5)
- documentation (4)
- good first issue (4)
- housekeeping (2)
- deployment (2)
- performance (1)
- appveyor (1)
- waiting for upstream (1)
- needs review (1)
Top Pull Request Labels
- housekeeping (2)
- dependencies (2)
- deployment (1)
Package metadata
- Total packages: 4
-
Total downloads:
- pypi: 4,128 last-month
- Total docker downloads: 230
- Total dependent packages: 0 (may contain duplicates)
- Total dependent repositories: 6 (may contain duplicates)
- Total versions: 130
- Total maintainers: 2
proxy.golang.org: github.com/pywr/pywr
- Homepage:
- Documentation: https://pkg.go.dev/github.com/pywr/pywr#section-documentation
- Licenses: gpl-3.0
- Latest release: v1.29.0 (published 3 months ago)
- Last Synced: 2025-12-22T21:08:03.389Z (3 days ago)
- Versions: 48
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.395%
- Average: 5.576%
- Dependent repos count: 5.758%
pypi.org: pywr
Python Water Resource model
- Homepage:
- Documentation: https://pywr.github.io/pywr/
- Licenses: gpl-3.0
- Latest release: 1.29.0 (published 3 months ago)
- Last Synced: 2025-12-22T21:08:05.305Z (3 days ago)
- Versions: 51
- Dependent Packages: 0
- Dependent Repositories: 6
- Downloads: 4,119 Last month
- Docker Downloads: 230
-
Rankings:
- Docker downloads count: 2.869%
- Forks count: 5.625%
- Dependent repos count: 5.994%
- Stargazers count: 6.032%
- Average: 6.217%
- Downloads: 6.658%
- Dependent packages count: 10.126%
- Maintainers (1)
conda-forge.org: pywr
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. It uses Cython extensions for computational efficiency.
- Homepage: http://github.com/pywr/pywr
- Licenses: GPL-3.0-or-later
- Latest release: 1.19.0 (published about 3 years ago)
- Last Synced: 2025-12-22T21:08:03.878Z (3 days ago)
- Versions: 28
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Forks count: 22.915%
- Stargazers count: 29.743%
- Dependent repos count: 34.025%
- Average: 34.465%
- Dependent packages count: 51.175%
pypi.org: pywr-stoch
Python Water Resource model
- Homepage: https://github.com/pywr/pywr
- Documentation: https://pywr-stoch.readthedocs.io/
- Licenses: gpl-3.0
- Latest release: 1.20.2 (published over 2 years ago)
- Last Synced: 2025-12-22T21:08:04.031Z (3 days ago)
- Versions: 3
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 9 Last month
-
Rankings:
- Dependent packages count: 7.617%
- Average: 40.034%
- Downloads: 42.994%
- Dependent repos count: 69.491%
- Maintainers (1)
Dependencies
- ipython *
- jinja2 *
- matplotlib *
- networkx *
- openpyxl *
- packaging *
- pandas *
- scipy *
- tables *
- actions/checkout v2 composite
- psf/black stable composite
- JamesIves/github-pages-deploy-action 3.7.1 composite
- actions/checkout v2 composite
- actions/download-artifact v2 composite
- actions/setup-python v2 composite
- actions/upload-artifact v2 composite
- pypa/gh-action-pypi-publish release/v1 composite
Score: 17.191545093993827