Your task is to compose a single Hierarchical Finite State Machine that controls a system composed of
Question:
Your task is to compose a single Hierarchical Finite State Machine that controls a system composed of two chompers, like those in the movie, together with the cleaning robot. Submit a drawing of your HFSM that clearly labels the states, transitions, transition events, and actions that take place in each state (if they are not synonymous with the state's name). Use hierarchy to prevent duplication of arcs with the same transition condition. Use parallelism as appropriate.
Your HFSM can employ the following events:
● Heartbeat Detected (H)
● No Heartbeat Detected (NH)
● Mess (M)
● No Mess (NM)
● nSec - n seconds have elapsed since entering a state
Your HFSM should have the following behaviors:
● While the chompers are active, the robot is idle.
● While the robot is active the chompers are idle. Assume idle chompers are open.
● Chompers begin in an armed state, waiting for anything with a heartbeat to arrive.
● They return to the armed state if the lifeform (or lifeforms) with the heartbeat escapes.
● Once active, chompers keep chomping until nothing with a heartbeat remains.
● The robot is only active when there is a mess.
● The robot returns to idle when the mess is gone. It never stays active more than 4 minutes.
● The robot cleans by sweeping the floor, hosing down the equipment, blasting everything
with a flamethrower, and then polishing out any remaining spots, each for 30 seconds. It
repeats this process indefinitely, until it is told to stop.
● Each chomper follows a regular, timed pattern where it opens, pauses, and closes.
● Each chomper takes a different amount of time to complete its pattern.
● Chomper A's first chomp is immediate. Chomper B's first chomp is 1 second later.
Sketch your HFSM here
Hierarchical Finite State Machine (HFSM) for Chompers and Robot:
1. Chompers State:
- Armed:
- Waiting for a heartbeat.
- Transition: On Heartbeat Detected (H) -> Active
- Active:
- Chomping until no heartbeat remains.
- Transition: On No Heartbeat Detected (NH) -> Armed
- Chomper A:
- Open: Waits for a certain time.
- Transition: On nSec (time for Chomper A to open) -> Pause
- Pause: Waits for a certain time.
- Transition: On nSec (time for Chomper A to pause) -> Close
- Close: Waits for a certain time.
- Transition: On nSec (time for Chomper A to close) -> Open
- Open: Waits for a certain time.
- Chomper B:
- Open: Waits for a certain time.
- Transition: On nSec (time for Chomper B to open + 1 second) -> Pause
- Pause: Waits for a certain time.
- Transition: On nSec (time for Chomper B to pause) -> Close
- Close: Waits for a certain time.
- Transition: On nSec (time for Chomper B to close) -> Open
- Open: Waits for a certain time.
2. Robot State:
- Idle:
- Waiting for a mess.
- Transition: On Mess (M) -> Active
- Active:
- Cleaning until no mess remains or 4 minutes have passed.
- Transition: On No Mess (NM) or 4 minutes elapsed -> Idle
- Sweep: Sweeping the floor for 30 seconds.
- Transition: On nSec (30 seconds) -> Hose
- Hose: Hosing down the equipment for 30 seconds.
- Transition: On nSec (30 seconds) -> Flamethrower
- Flamethrower: Blasting everything with a flamethrower for 30 seconds.
- Transition: On nSec (30 seconds) -> Polish
- Polish: Polishing out any remaining spots for 30 seconds.
- Transition: On nSec (30 seconds) -> Sweep
This textual representation should give you a clear understanding of the states, transitions, and actions in the HFSM. If you need further clarification or a different representation, please let me know!
I now need this converted to an actual sketch of an HFSM
Project Management The Managerial Process
ISBN: 9781260570434
8th Edition
Authors: Eric W Larson, Clifford F. Gray