Cellular Automaton Traffic Simulators

This applet demonstrates the simulation of traffic flow by cellular automata. You can choose between update rules according to the models by Kai Nagel and Michael Schreckenberg, by Robert Barlovic, Ludger Santen, Andreas Schadschneider, and Michael Schreckenberg, or by Dirk Helbing.

Please enable Java to see the applet!

Some model parameters may be changed: The cell length can be adjusted. Usually, the Nagel/Schreckenberg model uses a cell length of 7.5 meter, while Helbing's model uses 2.5 meter. The slowdown probability specifies how often drivers slow down without any obvious reason (usually 50% for the Nagel/Schreckenberg model and 0.1% for Helbing's model). For the slow-to-start rules by Barlovic, Schreckenberg et al., the slowdown probablity is set to 1% for moving cars, whereas the probability that stopped cars do not accelerate when possible, can be selected (usually 50%). The density can be adjusted within reasonable limits. Lambda is a model parameter which specifies how fast drivers accelerate to their gap-dependent optimal velocity (usually 100% for the Nagel/Schreckenberg model and 77% for Helbing's model).

The diagrams in the java applet above also require some explanations: The upper left one is a simple space-time plot of the vehicle positions. Red regions indicate congested traffic. As the vehicles move to the right, the jam waves propagate backwards in space. Below, one can see a picture of the simulated road with periodic boundary conditions.

In this simualation the local flow of vehicles q [vehicles/time], the mean local velocity v [distance/timestep] and the local density rho [vehicles/distance] are measured. The respective dependencies among these three quantities (so-called fundamental diagrams) are plotted on the right side. The two bar charts on the bottom show the global relative frequencies f of the velocities and the gaps (i.e. the number of empty sites between two consecutive vehicles), respectively.

You can download the source code of this applet written by Kai Bolay. It is based on B. Eisenblätter's and L. Neubert's Applet which was inspired by Cay Horstmann's Traffic Simulator Applet.

To Dirk Helbing's Homepage