Traffic


This program simulates a 2-lane highway with cars and trucks, with a variety of speed settings. A traffic jam can be created by starting with a road block, located about halfway the track. When it is removed, one can see how the vehicles in front start moving while vehicles approaching the jam still have to slow down and possibly stop, until the jam eventually dissolves.

There are a few other things to play with, like adding speeders and 'slow pokes', and allowing vehicles to pass only on the left or both on the left and on the right. The app shows various statistics, such as the number of vehicles that are on the road or have exited, and the minimum, average and maximum vehicle speed.

I wrote this app in 2007 and still find it mesmerizing to watch its traffic flow from time to time.

Screenshot