UnderControl allows you to control a set 4-way junction traffic lights. Using the control table you control the status of all 4 lights and a filter to allow right hand turns. A delay for each light must be set until it is running perfectly with no accidents or long delays. As in real life the cars will obey the lights. It is your job to create a control sequence that efficiently allows the cars to progress without crashing. In the event of a collision the program will stop and you can fix whatever caused the accident.
In real life, there is a set sequence that traffic lights follow. Click on the following link to see a movie clip that explains this.
In the control table there are nine columns. The first four columns represent the colour of each traffic light facing in each direction. Their values can be:
The next four columns refer to the filters for each direction. Their values can be set to:
The last column is how long the line is shown. The unit is seconds. To write a sequence table, click on the cells and type in the appropriate value. Delete will clear any cell or group of cells. In the View menu, the Single Cars option allows you to have one car from each direction at any time. The Many Cars option shows two lanes on the approaches to the junction. Cars will queue up and go with each phase of the lights, the number of cars waiting in each direction is shown. This allows fine-tuning of your sequence - alter the times so cars do not wait too long. When you have created a sequence, click on Start to run it. The cars can go left and straight on but can only turn right when the filter is on. |