Skip to main content

Python Wrapper for SWMM5 API

Project description

Python Wrapper for Stormwater Management Model (SWMM5)

Documentation

http://pyswmm.readthedocs.io/en/latest/

Development

https://github.com/OpenWaterAnalytics/pyswmm/

PySWMM Wiki

https://github.com/OpenWaterAnalytics/pyswmm/wiki/

Build status

Appveyor build status Circle-CI build status Travis-CI build status Code issues Scrutinizer Code Quality

Project information

Documentation Status License Latest PyPI version

YouTube Examples

Stream Results and Adjust Weir Setting
http://img.youtube.com/vi/U5Z0NXTEjHE/0.jpg

Overview

PySWMM is a Python language software package for the creation, manipulation, and study of the structure, dynamics, and function of complex networks.

With PySWMM you can load and manipulate USEPA Stormwater Management Models. With the development of PySWMM, control algorithms can now be developed exclusively in Python which allows the use of functions and objects as well as storing and tracking hydraulic trends for control actions. Enabling complex controls rules opens the door to faster prototyping for basin-wide coordinated control frameworks such as agent-based modeling or market-based optimization. PySWMM more easily facilitates the implementation of machine learning techniques such as a support vector machine to be used as forecasting tools.

Who uses PySWMM?

PySWMM is used by engineers, modelers, and researchers who want to streamline stormwater modeling optimization, controls, and post-processing results.

Goals

PySWMM is intended to provide

  • tools for the study of the structure and dynamics within USEPA SWMM5,

  • a standard programming interface and graph implementation that is suitable for many applications,

  • a rapid development environment for collaborative, multidisciplinary projects,

  • an interface to USEPA SWMM5,

  • development and implementation of control logic outside of native EPA-SWMM Controls,

  • methods for users to establish their own node inflows,

  • a coding interface to binary output files,

  • new modeling possibilities for the SWMM5 Community.

Download

Get the latest version of PySWMM from https://pypi.python.org/pypi/pyswmm/

$ pip install pyswmm

To get the git version do

$ git clone https://github.com/OpenWaterAnalytics/pyswmm.git

Usage

A quick example that steps through a simulation:

Examples:

Intialize using with statement. This automatically cleans up after a simulation

>>> from pyswmm import Simulation
>>>
>>> with Simulation('model.inp') as sim:
...     for ind in sim:
...         pass
...     sim.report()

Initialize the simulation and execute. This style does not allow the user to interact with the simulation. However, this approach tends to be the fastest.

>>> from pyswmm import Simulation
>>>
>>> sim = Simulation('model.inp')
>>> sim.execute()

Intialize a simulation and iterate through a simulation. This approach requires some clean up.

>>> from pyswmm import Simulation
>>>
>>> sim = Simulation('model.inp')
>>> for ind in sim:
...     pass
>>>
>>> sim.report()
>>> sim.close()

Bugs

Our issue tracker is at https://github.com/OpenWaterAnalytics/pyswmm/issues. Please report any bugs that you find. Or, even better, fork the repository on GitHub and create a pull request. All changes are welcome, big or small, and we will help you make the pull request if you are new to git (just ask on the issue).

License

Distributed with a BSD2 license; see LICENSE.txt:

Copyright (C) 2014 PySWMM Developers
Bryant E. McDonnell <bemcdonnell@gmail.com>

Powered By

EmNet LLC:
http://emnet.net/templates/emnet/images/footer_logo.png
Open Storm:
https://avatars2.githubusercontent.com/u/28744644?v=3&s=200

Acknowledgements

  • Tim Cera

  • Assela Pathirana

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

pyswmm-0.4.0.tar.gz (43.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyswmm-0.4.0-py2.py3-none-any.whl (594.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pyswmm-0.4.0.tar.gz.

File metadata

  • Download URL: pyswmm-0.4.0.tar.gz
  • Upload date:
  • Size: 43.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyswmm-0.4.0.tar.gz
Algorithm Hash digest
SHA256 2ad4afdcaa39ea41c96cd15a35800214d7e62636eec4f07206e608bb8b89253b
MD5 3f6b0eec78ad261fe932de9544f99204
BLAKE2b-256 b626722c50cf287dd9efe1cead083025d17d92aebb655b9f4688ddd994fa21b3

See more details on using hashes here.

File details

Details for the file pyswmm-0.4.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pyswmm-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 098541ee022765d0b80c64f85f93c90dedfe7eb04d48a95609044d9fcad8aa93
MD5 da327cc49decfa553bbec65b124eab17
BLAKE2b-256 20caa730cff054acbe19b11d3ee214096ce2cf8b8feeebc99edcbb9feeeedfed

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