

Campus Flow Simulation
If you’ve ever wondered why getting from one class to another at Tech sometimes feels like you’re merging onto I-85 at rush hour, you’re not alone. For my CX 4230 project, I wanted to visualize how and why student traffic jams happen, and what kind of emergent patterns you get when you turn a campus map into a physics simulation.
Campus Flow Simulation started as a pretty simple idea:
- Give every “student” a schedule and a start point.
- Use the Social Force Model to pull them toward their next class, push them away from crowds, and keep them on walkways (most of the time).
- Let the simulation run, and see what chaos emerges.
The simulation doesn’t have much hardcoded logic, making it easy to apply the same model to other areas. We just draw the map, with things like buildings, entrances, and roads/walkways all in different colors. Then, we have a script that converts the pixel colors on the map into a vector field, mapping pixels and walls into a force field that influences the pedestrians. Here’s what the vector field looks like for our campus map:
Basically, every location on the map has a precomputed vector that tells a simulated student which direction to go—factoring in obstacles, grass, and the layout of buildings. Add a little randomness and you end up with some particles taking shortcuts, some forming clumps at bottlenecks, and others just beelining it through the crowd.
A few things I learned doing this:
- Even a simple “social force” model gives you real human-like crowd patterns—lanes, jams, ans shortcuts.
- The busiest areas in the sim were almost always the same as the actual “bad” spots on campus (if you know, you know).
- Tweaking little things—like moving a door or adding a new path—could totally change the flow, and sometimes fix a jam.
There’s a lot of potential improvements, like:
- supporting vehicles like bikes, cars, buses
- other activities apart from just going to class, like waiting in line at food trucks, or just chilling on tech green
- supporting more structured variation in student behaviors (some people walk faster, some people like running, some people don’t like taking shortcuts, etc)
Maybe in the future, we can use models similar to this to optimize high traffic areas.
You can play with the live version at campusflow.ausaf.xyz, or check out the code on GitHub. If you want a deep dive into the math or just want to run your own “student traffic” sim, all the details and writeups are in the repo.
*Built by me, Liam Frank, Mudit Gupta, and Rahul Katre for CX 4230 @ Georgia Tech.
← Back to projects