Question: An extended state machine describing a traffic light at a pedestrian crosswalk is shown above. This is a time triggered machine that assumes it will
An extended state machine describing a traffic light at a pedestrian crosswalk is shown above. This is a time triggered machine that assumes it will react once per second. It starts in the red state and counts 60 seconds with the help of the variable count. It then transitions to green, where it will remain until the pure input pedestrian is present. That input could be generated, for example, by a pedestrian pushing a button to request a walk light. When pedestrian is present, the machine transitions to yellow if it has been in state green for at least 60 seconds. Otherwise, it transitions to pending, where it stays for the remainder of the 60 second interval. This ensures that once the light goes green, it stays green for at least 60 seconds. At the end of 60 seconds, it will transition to yellow, where it will remain for 5 seconds before transitioning back to red. The outputs produced by this machine are sigG to turn on the green light, sigY to change the light to yellow, and sigR to change the light to red. Please write a simulation in Python using the above formula to simulate the traffic light for 200 seconds with a scenario where a pedestrian is present at 70. second.
Your simulation shall have a one second step size. Your simulation shall log every second (in simulation time) time, inputs. system state and the outputs to console. Please provide your source files, a makefile with a setup and run target1, and a Markdown document.

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
