Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a ASM diagram for this traffic light Time Description Light Light 2 Red greenLightReque | greenLightLoc sted ked false t=0 Red false 1=6 Red

Create a ASM diagram for this traffic lightimage text in transcribed

Time Description Light Light 2 Red greenLightReque | greenLightLoc sted ked false t=0 Red false 1=6 Red Red true false 1 = 12 Green Red false, then true true 1= .. Yello Red true true W 1=... Red Green false false, then true At the start of the simulation, both traffic lights are red. After 6 seconds (REDDELAY), there are cars waiting in both streets. Both traffic lights request a green light by setting greenLightRequested = true. After another 6 seconds (REDDELAY): Light 1 turns green, setting greenLightLocked = true and greenLi ghtRequested = false. Light 2 requests a green light by setting greenLightRequested = true. After 10 seconds (MINGREENDELAY), DELAY), Light 1 turns yellow. After 2 seconds (YELLOWDELAY): Light 1 turns red, setting greenLightLocked = false. Light 2 turns green, setting greenLightLocked = true and greenLi ghtRequested = false. After 6 seconds (REDDELAY), Light 1 requests a green light by setting greenLightRequested = true. Light 2 turns yellow 10 seconds (MINGREENDELAY) after turning green. After 2 seconds (YELLOWDELAY): Light 2 turns red, setting greenLightLocked = false. Light 1 turns green, setting greenLightLocked = true and greenLi ghtRequested = false. After 6 seconds (REDDELAY), Light 2 requests a green light by setting greenLightRequested = true. 1 = Red Green | true true 1 Red Yello true true 1= .... Green Red false false, then true Green Red true true Time Description Light Light 2 Red greenLightReque | greenLightLoc sted ked false t=0 Red false 1=6 Red Red true false 1 = 12 Green Red false, then true true 1= .. Yello Red true true W 1=... Red Green false false, then true At the start of the simulation, both traffic lights are red. After 6 seconds (REDDELAY), there are cars waiting in both streets. Both traffic lights request a green light by setting greenLightRequested = true. After another 6 seconds (REDDELAY): Light 1 turns green, setting greenLightLocked = true and greenLi ghtRequested = false. Light 2 requests a green light by setting greenLightRequested = true. After 10 seconds (MINGREENDELAY), DELAY), Light 1 turns yellow. After 2 seconds (YELLOWDELAY): Light 1 turns red, setting greenLightLocked = false. Light 2 turns green, setting greenLightLocked = true and greenLi ghtRequested = false. After 6 seconds (REDDELAY), Light 1 requests a green light by setting greenLightRequested = true. Light 2 turns yellow 10 seconds (MINGREENDELAY) after turning green. After 2 seconds (YELLOWDELAY): Light 2 turns red, setting greenLightLocked = false. Light 1 turns green, setting greenLightLocked = true and greenLi ghtRequested = false. After 6 seconds (REDDELAY), Light 2 requests a green light by setting greenLightRequested = true. 1 = Red Green | true true 1 Red Yello true true 1= .... Green Red false false, then true Green Red true true

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_2

Step: 3

blur-text-image_3

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

Loss Control Auditing A Guide For Conducting Fire Safety And Security Audits

Authors: E. Scott Dunlap

1st Edition

1439828865, 978-1439828861

More Books

Students also viewed these Accounting questions