You caught a shooting star
All projects

ES 1050 course project

TTC Flood Rerouting Simulation

  • Graph algorithms
  • GIS
  • Python
Street map around King and Bathurst with the normal 504 route in grey, flooded roads in red, and the shuttle detour in orange looping north to Queen Street

01 / Overview

My first-year design project for ES 1050 at Western Engineering. The brief was to take on a problem related to flooding or fires and engineer a solution. Our team chose flooding in Toronto and built a simulation that reroutes TTC service around flooded streets. Try it below: click the map to flood an area.

02 / Scope

What it had to do

When a flood closes streets, show which stops and roads are lost and how a replacement shuttle should detour, so transit service can keep running.

Route
504 King
Data
TTC GTFS + OpenStreetMap
Network
1,916 intersections
Routing
Dijkstra, one-way aware

03 / My contribution

What I did

I wrote all the code for the original program, with help from ChatGPT. My four teammates didn’t code and focused on the rest of the project. The 2026 browser version was built with Claude Code under my direction.

Picking the problem

ES 1050 gave every team the same theme, floods or fires, and we had to find a problem inside it to solve. We chose rerouting TTC transit when a stop floods.

The original simulation

The original program was written in Python and covered two or three streets. You picked any stop on them, the program treated that stop as flooded, and it gave a reroute. It read the TTC’s GTFS schedule data to get the stop sequence, pulled the road network from OpenStreetMap, removed roads near the flooded stop, and plotted the original and rerouted paths on a map.

The 2026 rebuild

In 2026 the prototype was rebuilt as a tested Python package and ported to the browser for this page:

  • Roads are cut when their actual centreline enters the flood zone, not just when an endpoint does, so long blocks through the flood are caught
  • The street network stays directed, so detours respect one-way streets
  • Only the corridor around the route is downloaded and cached, instead of the whole city on every run
  • Detours are measured in real distance and compared with the normal path over the same stops
  • The most common daytime stop pattern is used, so overnight and short-turn variants don’t distort the route
  • The 504 is a streetcar, so detours are modelled as the replacement shuttle bus that would run on the roads

07 / Try it

Flood a street

Loading map…

Normal route
–
During flood
–
Extra distance
–
Roads cut
–

Click anywhere on the map, or pick a scenario, to flood that area.

Normal routeShuttle during floodFlooded roadsFlood zone

08 / Where it stands

Completed, with an interactive demo

  • Example: a 200 m flood at King & Bathurst cuts 32 road segments, closes 1 stop, and adds 1.78 km to the shuttle route
  • The browser version matches the Python simulator on the same scenario and recomputes in about 10 ms, so the map updates live

Keep exploring

All projects

Personal buildPrototype in progress

Tendon-Driven Robotic Gripper

A 3-finger gripper prototype: an adapted open-source finger design for rubber-band and string tendons, with a 3-servo palm and one finger opposing two.

  • Prototyping
  • Grasping

SoftwareCode on GitHub

Research Paper Summarizer

A Python tool that takes a research paper and gives back what you need to know: section summaries with the key methods, results and figures, without the long derivations. I built it at the start of summer 2026, when I began reading papers for my lab work. It was my first serious Claude Code project.

  • Python
  • LLM tooling