Inspiration

We are all interested in simulations and keeping our communities safe. We were all intrigued by the complexities of responding to a variety of different disasters and crises at once with a variety of resources, so we decided to build a tool that could simulate that in cities like our very own Pittsburgh.

What it does

In short, a user simulates ongoing disasters and response in their city. First, they select from a dropdown of cities. The program automatically pulls the city's various resources (hospitals, police stations, etc.) which the user can edit the quantities for if they wish, as well as the likelihoods of various disasters. Finally, a live simulation runs where emergency vehicles are automatically dispatched to a variety of disasters, distributing themselves across the map in a realistic and visually engaging manner.

How we built it

We used: —Java Spring Boot for the backend/API —React.js for the frontend —Leaflet, Open Street Map, and Overpass for maps We built a custom graph-like data structure to represent the movements of various emergency units across a city, as well as existing capacity at each station and on-site forces at each emergency location. We also built interactive introductory displays, automatically updating capacity health bars, and a live event log.

Challenges we ran into

The challenges of asynchronous programming led to lots of difficult race conditions and mysterious errors that disappeared into the void, which are harder to debug than errors that fail visibly.

Accomplishments that we're proud of

—Our decision algorithm automatically routes the nearest available units to the scene of a disaster, whether they are waiting at a station or on their way back from another incident. It will also pull from further stations when necessary, and adapt to the scale of the emergency. —Our front end interface automatically loads location-specific information when the user selects a city, including relocating the map and pulling lists of local emergency facilities with exact coordinates. —Our live log and health bars, plus the map display, give users an intuitive feeling for the state of emergency management at any moment, with multi-modal information that meets any type of curiosity.

What we learned

—We all learned a lot more about React, and about Spring Boot (which we had never used). —We all learned a lot of new nuances about simulation-specific programming, such as the numerous edge cases for various combinations of events.

What's next for Watchtower

—(Partially implemented) the user won't just watch: they'll allocate resources themselves! Soon, the user will be able to override the suggestions of the decision algorithms and do what they see fit, in order to learn about the trade offs that come with their decisions.

Share this project:

Updates