Stochastic Traffic Cellular Automaton

November 17th, 2009

Lately, I have started to study Traffic Flow Models. This post will hopefully be a start of a long series of posts regarding the field. Typically, there are two types of approaches when modeling traffic flow. The first approach is to treat traffic as a fluid. In this model, the behavior of individual cars are not directly modeled. Instead of modeling cars, this approach models the behavior of traffic density using Constitutive Laws. The second approach attempts to model traffic flow using a Cellular Automaton. The basic idea is that the driver’s behavior only depends on the car(s) immediately in-front and behind him. In this post, I am going to construct a simple model to describe this later approach.

First, let us divide the road into equal segments of length \Delta x and divide time likewise into equal time-steps \Delta t. The road would look something like this:

At any given timestep, a car can only occupy one grid space. This space is represented by the integer x. After each time-step, we will move the car according to it’s current velocity. We will define the integer m as the number of steps that the car will take at each time-step. Hence, the new car position will follow the iterative formula x_{new} = x_{old} + m_{new}. In order to understand Stochastic Traffic Cellular Automaton, we will also have to define two more variables. The first is g which the number of steps between the car and the car in-front of it. The second variable is M which corresponds to the max distance that any car can move on a time-step.

The Stochastic Traffic Cellular Automaton model will then follow the following steps for each car on the road for each time-step:

Speed-up: If m_{old} \neq M , then m_{new} = m_{old} + 1
Do not Overrun: If m_{new} > g_{old} , then m_{new} = g_{old}
Randomization: If m_{new} \neq 0 , then with probability p take m_{new} = m_{new}-1 .
Move Car: x_{new} = x_{old} +m_{new} .

Without any traffic, a driver would speed up to a velocity of \frac{M}{\Delta t} with an acceleration of \frac{1}{\Delta t^2}. If there is a car in front, it makes sure that it doesn’t crash into the car (which is usually a good idea). Lastly, there is a random factor placed into the equation. This is to make the model non-deterministic. For example, a driver could over-brake or do other non-deterministic behaviors. The randomization is created to encapsulate all these possible behaviors. As you can see, the model is very basic. However, we can add further rules if we want a more accurate description of a driver.

If you want to try coding this up, I would try simulating traffic behind a red light. What happens when the light turns green?

Holmes, Mark, Introduction to the Foundations of Applied Mathematics, Chapter 5
K. Nagel and M. Schreckenberg, J. Physique I, 2, 2221 (1992), A cellular automaton model for freeway traffic

Pingback by Simulating when a Green Light turns Red « jkwiens.com

Made Saturday, 9 of January , 2010 at 10:29 pm

[...] a previous post, I talked about the Stochastic Traffic Cellular Automaton. I am finally going to post some [...]

Leave a Reply