Cellular Automata Simulation 217
FIGURE 7.27 (See Color Insert): Simulating a traffic jam (with Slow-
toStart).
occupied by one vehicle). All the vehicles move with a specific speed (integer
number, 0 to v
max
). This model was visualized and implemented on Swarm.
To see the time change of one-dimensional cellular automaton (CA), it is
drawn on PatternSpace (Discrete2d). To implement a two-dimensional CA
like the life ga me, it is good to use DblBuffer2d, which has two buffers. For
example, the movement of a car with v
max
= 1 0, ρ = 0.1 is shown in Fig. 7.27.
The vehicle moves in the right-hand direction, and the right end a nd the left
end are connected. The top row shows the current ro ad conditions, and the
time passe d as we move down (displayed for 200 steps). In Swarm, the vehicles’
sp e e d is represented by shades of color s. In fact, green becomes dar ker with the
increase in speed, and the red beco mes darker as the speed decreases (as set
in colorMap). A chunk of red color is the point of occur rence of a traffic jam,
and the black part shows a cell without a vehicle. In Fig. 7.27, the occurrence
of a series of vehicles with sp e e d 0 in the middle is a traffic jam. We can see
that the traffic jam moves forward with time.
In this model, SlowtoStart has been introduced to realize the effect of
inertia. This is a rule that says once the vehicle has sto pped, it starts moving
after 1 time s tep even if the front is open to move. This is considered impor tant
to bring the model closer to actual metastability. If SlowtoStart is used, it takes
time to accelerate, which leads to more stationary vehicles and worsens the
traffic jam (Fig. 7.27). On the other hand, without SlowtoStart, the line of
the stationary vehicles w ill not elongate unless there is a slowdown due to a
random number, and therefore as a result, the traffic jam is eased (Fig. 7.28).
Recently ASEP (Asymmetric Simple Exclusion Process) has been studied
extensively as a model of traffic flow [99]. In this model, the maximum speed
of each vehicle existing in each cell is taken as 1; if the c e ll in front is vaca nt,
the vehicle moves to it with a probability p (stops with a probability 1 − p).
Let us take the inflow and outflow probabilities of new cars as α and β,
respectively (in other words, right and left ends are not connected, and the
number of vehicles is not fixed). Figure 7.29 shows the ASEP model simulation
in Swarm. Parameters are α = 0.3, β = 0.9, p = 0.5 for (a) free phase, α = 0.3,