traffic light signals
As we have seen, the domain knowledge was missing when we tried to constrain the state space using constraints. What are the signals that a traffic light is supposed to communicate?
The basic signals are:
proceed- “you have the right of way and you may proceed”prepareToStop- “you are about to loose the right of way, prepare to stop”stop- “you don’t have the right of way, stop and wait”warning- “you may have the right of way, proceed with caution”
The signals only in some variants are:
allStop- “all way stop”, whenallWayFlashingRedAsStopprepareToGo- “you are about to get the right of way, prepare to go”, whenredAndYellowToGreenallYellow- “traffic lights off on all ways, proceed with caution”, whenallWayYellowadvancedLeft- “you have the right of way left before the opposite direction”, whenadvancedOrExtendedLeftextendedLeft- “you have the right of way left after the opposite direction stopped”, whenadvancedOrExtendedLeft
Therefore, we can model the TrafficSignals as follows.
The xor group indicates that a TrafficLight
must be showing exactly one of the possible signals. Also, we make some
signals conditional on the system features by adding a constraint.
Now, selecting the system features will restrict the possible light signals.
Let’s try it out. Again, assert certain system features and see what signals are possible. E.g., when you turn all features off:
Now that we have meaningful signals, we can express how they should
be communicated using the lamps:
linking
signals and lamps.
Previous
