Skip to content
/ pywr Public
forked from pywr/pywr

Pywr is a generalised network resource allocation model written in Python.

License

Notifications You must be signed in to change notification settings

Batch21/pywr

 
 

Repository files navigation

Pywr

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

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.

Installation

Pywr should work on Python 2.7 (or later) and 3.4 (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.

About

Pywr is a generalised network resource allocation model written in Python.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.8%
  • JavaScript 0.7%
  • Shell 0.2%
  • Jupyter Notebook 0.2%
  • Batchfile 0.1%
  • CSS 0.0%