← All projects

Models & Simulations

IDMTraffic

IDM traffic model script

Screenshot of IDMTraffic

This is a school project where we were given the basic concept of the IDM traffic model and instructed to create a script that follows the model. It's a simple physical model/simulation that allows for a variety of vehicle counts, road size/circumference, and multiple other adjustable variables. It outputs a gif of the simulated traffic on a single road.

Try it in your browser

This runs the real script with Python compiled to WebAssembly, entirely in your browser. Type help to get started.

Examples: