Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Finite state machines are around us everywhere. State machines put simply, are logical unitsthat are limited to being in only one state at any given

Finite state machines are around us everywhere. State machines put simply, are logical unitsthat are limited to being in only one state at any given time. A finite state machine is one thatis limited to a defined set of states (there are defined limits to the number of possible states itcan be in).Traffic lights are a good example of finite state machines. In a typical traffic light, there are 3possible states: Green (go), Amber (dont begin to cross the intersection because the red light isabout to trigger), and Red (stop). Each state is strictly timed (can be different in duration foreach state) and synchronized with the opposing set of lights.Workshop DetailsA busy intersection in downtown Toronto needs to upgrade the current 3-light 3-state trafficlight system (see illustration below) to a 4-light 5-state system to address an increasingly heavydemand for left turns. A computer simulation needs to be developed as a proof of concept.Page |1APS145 Applied Problem SolvingLooking at the light that is red, we see the cars are stopped, waiting for the light to turn green.If 5 of more cars line up, the car sensor will signal the light to turn green sooner, as describedbelow. The pedestrian who wants to go in the same direction as the cars stopped on the redlight is also stopped. If the pedestrian presses the walk button on the light pole, this will alsodecrease the wait time for the red light as described below.The 4 lights in the new system are as follows:1. Red2. Amber3. Green4. Advance left turn(Green to Amber)4-Light 5-State Traffic Light: Sequence of statesThe sequence of a 4-light 5-state system is shown in the above illustration. Below are the 5-states including the time duration for each state:1. Solid Green + Advanced Left Green Arrow [15 seconds]2. Solid Green + Advanced Left Amber Arrow [5 seconds]3. Solid Green + Advanced Left Arrow (of)[45 seconds]4. Solid Amber [10 seconds]5. Solid Red [?? seconds YOU FIGURE THIS OUT ]Additional FeaturesPage |2APS145 Applied Problem SolvingRequest-To-Walk ButtonA button is provided for pedestrians to press to alert the system a person needs to cross. This isonly effective when the lights are in a red-light state. This request will reduce the remainingwait time of the red-light state to 10 seconds.Car SensorThere is a sensor mounted on the light fixtures that monitors the number of waiting cars whenin a red-light state. When the number of cars waiting reaches 5 or more, the sensor will triggerthe system to reduce the remaining wait time of the red-light state to 10 seconds.InterruptThe defined system should take in to account an interrupt. This is something that can occur atany time and will take over/supersede the active state. Examples of this type of interruptioncan be the traffic controllers setting all lights to flash amber (for caution) or to flash red (4-waystop) etc... You dont need to specify what the interrupt should do only account for it bychecking if there is an interrupt to the normal process flow and how the system shouldresume when the interrupt has completed.Work Breakdown[Logic 1] Define a standard 3-light system (red, green, amber) with an interrupt (no advancegreen, request to walk, or car sensor). The light durations are: Green=40 sec., Amber=15 sec.,and Red=?[you figure this out]. Flow chart

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions

Question

Design a job advertisement.

Answered: 1 week ago