Skip to main content

pystorms: simulation sandbox for the evaluation and design of stormwater control algorithms

pystorms License: GPL v3 Code style: black

Overview

This library has been developed in an effort to systematize quantitative analysis of stormwater control algorithms. It is a natural extension of the Open-Storm's mission to open up and ease access into the technical world of smart stormwater systems. Our initial efforts allowed us to develop open source and free tools for anyone to be able to deploy flood sensors, measure green infrastructure, or even control storm or sewer systems. Now we have developed a tool to be able to test the performance of algorithms used to coordinate these different sensing and control technologies that have been deployed throughout urban water systems.

For the motivation behind this effort, we refer the reader to our manuscript pystorms. In general, this repo provides a library of scenarios that are built to allow for systematic quantitative evaluation of stormwater control algorithms.

Getting Started

Installation

Requirements

  • PyYAML >= 5.3
  • numpy >= 18.4
  • pyswmm
pip install pystorms

Please raise an issue on the repository or reach out if you run into any issues installing the package.

Example

Here is an example implementation on how you would use this library for evaluating the ability of a rule based control in maintaining the flows in a network below a desired threshold.

import pystorms 
import numpy as np

# Define your awesome controller 
def controller(state):
	actions = np.ones(len(state))
	for i in range(0, len(state)):
		if state[i] > 0.5:
			actions[i] = 1.0
	return actions 
	

env = pystorms.scenarios.theta() # Initialize scenario 

done = False
while not done:
	state = env.state()
	actions = controller(state)
	done = env.step(actions)

performance = env.performance()

Detailed documentation can be found on the webpage

Metadata

Release files for pystorms 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pystorms 1.0.0
File Size Uploaded Provenance Actions
pystorms-1.0.0.tar.gz 249.7 kB Without provenance Details for pystorms-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pystorms 1.0.0
File Interpreter ABI Platform Actions
pystorms-1.0.0-py3-none-any.whl Python 3 none any Details for pystorms-1.0.0-py3-none-any.whl

Total release size: 512.9 kB

Release files / pystorms-1.0.0.tar.gz

Download URL pystorms-1.0.0.tar.gz
Size 249.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0d2d96785d821a83c9efcd1419a90b8074b6d441fe59e14a0f6643cb2b2c66b4
BLAKE2b-256 checksum
How to use checksums
7a16a7d98e700c617fad04665216b61998d31fd346ac62b09020fc0259f2996c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / pystorms-1.0.0-py3-none-any.whl

Download URL pystorms-1.0.0-py3-none-any.whl
Size 263.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c78f9f7d4154e49c6f9aef3a8886b97d5b485961ad084cadfa0fb16c1d7a3cd
BLAKE2b-256 checksum
How to use checksums
3e12147c02b4d666d6e8b355a24c0661b2cf49b8e63b1da62443f2021c5f5a5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Security for pystorms 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page