This project is a more sophisticated of the basic StarLogo
model 'traffic'. Much like traffic, this model demonstrates
how traffic jams can form with two lanes, and how drivers
can react by changing lanes, although this often does little
to solve their problem. 

Again, no centralized cause may be responsible for the slowdown
of traffic.

Click on the SETUP button to set up the cars. Click on DRIVE
to start the cars moving. The STEP button performs the all
the drive functions, for just one tick of the clock.

The NUMBER slider controls the number of cars on the road,
and C-TYPES determines their appearance.
The LOOKAHEAD slider controls the distance that drivers look
ahead (in deciding whether to slow down or change lanes).
The SPEEDUP slider controls the rate at which cars
accelerate when there are no cars ahead. The SLOWDOWN slider
controls the rate at which cars decelerate when there
is a car close ahead.
The DELAY slider determines the time delay between clock
ticks. Slow down the simulation to watch the behavior of
certain cars more closely.

Traffic jams can start from small "seeds." 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.

Just as each car has a current speed and a maximum speed,
each driver has a current patience and a maximum patience.
When a driver decides to change lanes, he may not always
find an opening the the lane. When his patience expires, he
tries to get back in the lane he was first in. If this
fails, back he goes... As he gets more 'frustrated', his
patience gradually decreases over time. When the number of
cars in the model is high, watch to find cars that weave in
and out of lanes like this.

* What could you change to minimize the chances of traffic
jams forming, besides just the number of cars? What is the
relationship between number of cars, number of lanes, and
(in this case) the length of each lane?

* Try to create a 'traffic-3 lanes', 'traffic-4 lanes', or
'traffic-crossroads' model.

* Note that the cars never crash into each other- a car will
never enter a patch or pass through a patch containing
another car. Remove this feature, and have the turtles that
collide die upon collision. What will happen to such a model
over time?

The turtles/cars use SPEED-AT to find out the value of the 
SPEED variable for other turtles/cars.

Each turtle has a shape unlike the turtles from other
StarLogo models. Each patch size is 8 by 8 pixels, instead
of the standard 4 by 4. StarLogo uses SETSHAPE to alter the
shapes of turtles. You can, using the toolbar, create your
own turtle shapes or modify existing ones. It should be
relatively straightforward to modify the code of 'traffic-2
lanes' to include your own shapes.