pystorms

Simulation sandbox for the evaluation and design of stormwater control algorithms


⚔️ Want to know how your control algorithm stacks up against others in smart stormwater systems? ⚔️
 
   


Welcome! We have built this library in an effort to systematize quantitative analysis of stormwater control algorithms. It is a natural extension of 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.

Ultimately we want to encourage more researchers to explore smart stormwater control problems! Whether you only have experience in controls or stormwater or neither, our aim is to have this library be accessible to you. We have streamlined all of the backend details of running a smart stormwater control problem, so all you have to do is focus on the control algorithm (see below for an example).

 

Getting Started

To try out how exactly to interact with stormwater networks using our pystorms library, we encourage you to first begin with scenario theta, our "toy control problem". Once you feel comfortable with how our toolbox works, we then encourage you really begin to have some fun by interacting with our five challenging scenarios: alpha, beta, gamma, delta, and epsilon. These scenarios are built using real-world inspired stormwater networks, driving events, and control assets.

To learn more about this work, check out our github repository:

kLabUM/pystorms

To install and begin working, use:

This is how one would go about running a scenario ...

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()

For more technical details on what we have developed, and why, please check out our documentation.

Contributing

If you want to be more involved, please consider the following:

 

Testimonials


 

Partnering Institutions


University of Michigan
University of Virginia
Emnet, LLC
University of Tennessee, Knoxville
open-storm.org
 

Funding Sources

GLPF
NSF