Traffic lights consist of three signals, transmitting meaningful information to road users through colours which are red to stop traffic, orange for traffic change, and green to allow traffic to proceed. In Europe, they follow the cycle: green, orange, red, green, orange, red, ...
The constants tG, tO, tR define the time allocated for the colours green, orange and red.
In America, traffic lights follow the cycle: green, orange, red, orange, green, orange, red, orange, green, orange,...
In this example, when the failure occurs, we need to switch off the traffic light and send a message warning the vehicles. To do so, we create a transient phase with its null sojourn time. The same thing happens when the failure is over. We insert another transient phase to switch on the traffic light and send a message saying that the cars can move forward safely again.
A pedestrian traffic light follows the cycle: green, blinking green, red, green, blinking green, red, .... When the pedestrian clicks the button, we need to switch from red to green. To do so, we create a transient phase with its null sojourn time with before, the click input, and after the output message to tell the pedestrians they can move forward.
In this example, the pedestrian traffic light fully controls the cars traffic light.
The pedestrian traffic light sends a message to the cars traffic light when a pedestrian clicks the button to be able to cross the road. In this configuration, both lights for pedestrians and cars can be red at the same time.