26-09-2016, 04:10 PM
TRAFFIC_SIMULATION is a MATLAB program which simulates the way cars must wait at a traffic light.
The user can only input the number of 10-second time periods to be simulated.
The program operates with the following internal parameters:
GREEN, the number of 10-second time periods that a green light lasts, set to 2.
P, the probability that a new car will come to the light in the next second, set to 0.3.
PERIOD_LENGTH, the number of seconds in one time period, set to 10.
RED, the number of 10-second time periods that a red light lasts, set to 4.