Back to home
-
Java enhanced!
The Crossroad program is a simple program that displays two subsequent
intersections in a window. Each intersection is surrounded by 4 traffic lights.
While running the program the quantity of cars in the streets can be manipulated
as well as the green time per direction. Every car can only drive straight
forward. The program also includes an adaptive way to control the traffic lights
in order to avoid traffic jams that block the intersections.
This adaptive control mechanism can be enabled or disabled at each case for the intersections
ahead and below. When starting the program cars are moving in the streets. The quantity of the
cars can be provided per lane by using the appropriate buttons of the control
panel. The settings of the adaptive mechanism can be modified at each time for
the top intersection and the bottom intersection. The adaption of the green time
can be watched by a progress bar at each case for the upper intersection and the
lower intersection. Finally there is a kind of statistic available e.g. to compare
adaptive and undaptive control mechanism. The statistic displays by bars the
average time a car spends to enter the intersection at each time for the top side
and for the bottom side intersection.
The program was build by using JDK1.1.6. It also uses the JFC1.1. Thus the Applet version requires a quite new browser that supports jdk1.1. The application needs a Java virtual machine to be executed. It is bundled with the JFC1.1 classes and the JDK1.1.6 classes.
To take a look at the
To
download the application with JFC & JDK classes (10.5 MB)
To
download only the application (112 KB) (JFC must then be in classpath)
To see the
Java Class Hierarchy of the application