TRAFFIC EXTENDED (Original U. Wilensky, Extended by Forrest Sondahl)
WHAT IS IT?
-----------
This project models the movement of cars on a (possibly
multi-lane) highway. Each car follows a simple set of rules: it slows
down if it sees a car close ahead, and speeds up if it doesn't see a
car ahead. If it can change lanes to move around a slower car in its
path, it does.
The project demonstrates how traffic jams can
form even without any accidents, broken bridges, or overturned
trucks. No "centralized cause" is needed for a traffic jam
to form.
HOW TO USE IT
-------------
Adjust the
varous sliders to the appropriate settings you would like to test.
Click on the SETUP button to set up the cars.
Click on GO
to start the cars moving. Note that they wrap the screen as they
move, so the road is like a continuous loop.
The SPEED-UP
slider controls the rate at which cars accelerate when there are no
cars ahead.
When a car sees another car right in front, it
matches that car's speed and then slows down a bit more. How much
slower it goes than the car in front of it is controlled by the
SLOW-DOWN slider.
The SPEED-LIMIT slider controls the maximum
speed that cars will go when they have open road ahead of them.
The
RANDOMNESS? switch determines whether cars will exhibit some
randomness and variation in their speed. Randomness may cause cars to
go marginally over the speed limit for short periods of time.
The
NUM-LANES slider controls the number of lanes. Changing its value
while the simulation is running will not necessarily have the desired
effect, so it is recommended that you change it and then run SETUP.
THINGS TO NOTICE
----------------
Traffic jams can
start from small "seeds." These cars start with random
positions and random speeds. If some cars are clustered together,
they will move slowly, causing cars behind them to slow down, and a
traffic jam forms.
Even though all of the cars are moving
forward, the traffic jams tend to move backwards. This behavior is
common in wave phenomena: the behavior of the group is often very
different from the behavior of the individuals that make up the
group.
The plot shows three values as the model runs:
-
the fastest speed of any car (this doesn't exceed the speed limit!)
- the slowest speed of any car
- the speed of a single car
(turtle 0), painted red so it can be watched.
Notice not only the
maximum and minimum, but also the variability -- the "jerkiness"
of one vehicle.
Sometimes it is possible to attain smoother
flow (and greater average car speed) by cutting down the speed limit
(probably to around 30), when randomness is turned on.
THINGS
TO TRY
--------------
In this model there are three variables
that can affect the tendency to create traffic jams: the initial
NUMBER of cars, SPEED-UP, and SLOW-DOWN. Look for patterns in how the
three settings affect the traffic flow. Which variable has the
greatest effect? Do the patterns make sense? Do they seem to be
consistent with your driving experiences?
Set SLOW-DOWN to
zero. What happens to the flow? Gradually increase SLOW-DOWN while
the model runs. At what point does the flow "break down"?
Does doubling the number of lanes double the capacity for
traffic flow? Since each run is random, consider using the
BehaviorSpace tool to run experiments that perform many runs, so that
you can average the results for greater accuracy.
EXTENDING
THE MODEL
------------
Try other rules for speeding up and
slowing down. Is the rule presented here realistic? Are there other
rules that are more accurate or represent better driving strategies?
In reality, different vehicles may follow different rules.
Try giving different rules or speedup/slowdown values to some of the
cars. Can one bad driver mess things up?
What could you
change to minimize the chances of traffic jams forming?
What
could you change to make traffic jams move forward rather than
backward?
Could the rules for lane-changing be more
realistic? What would happen if drivers were required to keep right
except to pass?
Consider making a model with bidirectional
traffic, where cars must pass by going into the other lane (when it
is free from oncoming traffic).
NETLOGO FEATURES
-----------------
The plot shows both global values and the
value for a single turtle, which helps one watch overall patterns and
individual behavior at the same time.
The WATCH command is
used to make it easier to focus on the red car.
RELATED
MODELS
---------------
"Traffic" (in StarLogoT)
adds graphics, trucks, and a radar trap.
"Gridlock"
(a HubNet model which can be run as a participatory simulation) looks
at traffic in a grid with many intersections.
CREDITS AND
REFERENCES
-----------------------
This model was developed
at the MIT Media Lab. See Resnick, M. (1994) "Turtles, Termites
and Traffic Jams: Explorations in Massively Parallel Microworlds."
Cambridge, Ma: MIT Press. Adapted to StarLogoT, 1997, as part of the
Connected Mathematics Project. Adapted to NetLogo, 2000, as part of
the Participatory Simulations Project.
It was then extended to
its present form by Forrest Sondahl for a class on Multi-Agent
Modeling at Northwestern University in 2005.
To refer to this
model in academic publications, please use: Wilensky, U. (1997).
NetLogo Traffic Basic model.
http://ccl.northwestern.edu/netlogo/models/TrafficBasic. Center for
Connected Learning and Computer-Based Modeling, Northwestern
University, Evanston, IL.
In other publications, please use:
Copyright 1997 by Uri Wilensky. All rights reserved. See
http://ccl.northwestern.edu/netlogo/models/TrafficBasic for terms of
use.