Phantom Traffic Jam Simulation
Explore how small changes in driver behavior can create stop-and-go waves on a highway, even without obstacles. Adjust parameters and watch phantom jams form in real time.
Live Traffic Metrics
Showing last 150 samples (~15s). Select metric to view trends.
About This Simulation
What is This?
This is an interactive traffic jam simulation that models how vehicles behave in different situations. Each vehichle makes decisions about acceleration and braking behavior based on different paramters set by the user, driver aggresion, reaction time, and folowing distance. Changing these paramters shows how driving behaviors and variance leads to traffic jams and stop-and-go waves that propagates.
How Does It Work?
The simulation runs on a circular highway where vehicles continuously loop around. Each vehicle:
- Observes the vehicle ahead: Measures the distance and speed difference to the next car
- Calculates desired behavior: Determines how much to accelerate or brake using the Intelligent Driver Model (IDM)
- Applies reaction time: Simulates human reaction delays before executing actions
- Updates position: Moves forward based on current speed, while ensuring vehicles never overlap
You can adjust various parameters like reaction time, following distance, and driver aggressiveness to see how these factors influence traffic patterns. The simulation also includes realistic events like sudden braking, gradual slowdowns, and rubberneck zones that demonstrate how disturbances can create traffic waves and congestion.
What is the Intelligent Driver Model (IDM)?
The Intelligent Driver Model (IDM) is a mathematical model developed to simulate realistic car-following behavior. It's widely used in traffic simulation software because it accurately captures how real drivers adjust their speed based on traffic conditions.
The IDM calculates acceleration using two main components:
- Free Road Acceleration: When there's plenty of space ahead, drivers accelerate toward their desired speed. The acceleration decreases as they approach their target speed.
- Interaction with Leading Vehicle: When following another vehicle, drivers adjust their speed to maintain a safe following distance. The closer they get, the more they brake. The desired following distance increases with speed and depends on the speed difference between vehicles.
The model is described by the formula: a = a_max × [1 - (v/v₀)⁴ - (s*/s)²]
Where v is current speed, v₀ is desired speed,s is the gap to the car ahead, and s* is the desired gap. This formula ensures smooth acceleration when free, and appropriate braking when following, creating realistic traffic flow patterns.
Key Features
- Realistic Physics: Vehicles have different acceleration/deceleration capabilities based on type (cars, trucks, sports cars)
- Reaction Time Delays: Simulates human reaction time, creating more realistic traffic behavior
- Collision Prevention: The simulation ensures vehicles never overlap, automatically correcting positions if needed
- Traffic Disturbances: Test how sudden braking, gradual slowdowns, and rubberneck zones affect traffic flow
- Live Metrics: Monitor average speed, density, and flow rate in real-time
- Configurable Parameters: Adjust driver behavior to see how different driving styles impact traffic