Python Wrapper for SWMM5 API
Python Wrapper for Stormwater Management Model (SWMM5)
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.
PySWMM is used by engineers, modelers, and researchers who want to streamline stormwater modeling optimization, controls, and post-processing results.
PySWMM is intended to provide
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
A quick example that steps through a simulation:
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()
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).
Distributed with a BSD2 license; see LICENSE.txt:
Copyright (C) 2014 PySWMM Developers Bryant E. McDonnell <firstname.lastname@example.org>
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|pyswmm-0.4.0-py2.py3-none-any.whl (594.5 kB) Copy SHA256 Checksum SHA256||py2.py3||Wheel||Jul 14, 2017|
|pyswmm-0.4.0.tar.gz (43.7 kB) Copy SHA256 Checksum SHA256||–||Source||Jul 14, 2017|