Traffic & Traffic Lights

Two related PSA using the ClassLogo system involve traffic patterns. Both of these models have fully functional StarLogoT counterparts which are shown graphically here. The N-Logo simulations run on a background computer, whose screen is projected. Students, using the calculators, have real-time control over simulation parameters and behavior through their calculators via the network system in the classroom.

The first model, Traffic, shows a line of cars. Each car slows down if there is a car right in front, and speeds up if there's an open space ahead. The amount of this speeding up and slowing down, along with the density of the traffic, affects the likelihood of traffic jams forming spontaneously.

 

The Traffic Model

Plot of max-speed(green), min-speed(blue) and speed of red car

In the case above, the red car oscillates between being stopped and reaching a maximum speed as it goes in and out of jams. In the ClassLogo version, each student can control the variables of one or more cars which would be a unique color. Thus each student can influence the collective behavior through controlling the behavior of their individual cars. Students can work collectively to get a smooth flow, or find out if a single individual could harm or improve it.

The second model, Traffic Lights, sets up crossing traffic lanes. Each student controls the traffic light at an intersection, represented here by red and green patches. Cars come in to lanes from the top and the left of the screen. The task is to figure out what kind of coordination produces the smoothest traffic flow under a variety of conditions &endash; equal traffic in both directions, unequal traffic or speed limits, greater or lesser densities. This model cannot be implemented with modeling systems. It requires a HubNet-like architecture which enables distinct, coordinated input from many individuals.

Traffic Lights Simulation


Uri Wilensky
Northwestern University
Evanston, IL

Walter M. Stroup
The University of Texas
Austin, Texas