18-649 Scenarios and Sequence Diagrams


18649 <semester>
Group x - Student names and andrewIds 


Scenarios:


Use Case 1: Passenger Makes A Hall Call

Scenario 1A: Passenger arrives at a hallway while elevator is elsewhere.

Pre-Conditions:

Scenario:

  1. Passenger pushes hall call (up or down) button for passenger's desired direction d.
  2. Passenger sees that corresponding hall button light turns on.

Post-Conditions:

Sequence Diagram:

1A


Scenario 1B: Passenger arrives at a hallway when elevator is already there and the car is traveling in the same direction as desired by passenger.

Pre-Conditions:

Scenario:

  1. Door[b,r] starts closing.
  2. Passenger arrives at a hallway [f, b] to use the elevator, with intent to travel in direction d.
  3. Passenger presses hall call button before doors are fully closed, but after doors are too fully closed for passenger to enter.
  4. Hall button lights up.
  5. Doors complete closing. (You might want to change this step; it's OK to do that for this project assignment.)

Post-Conditions:

Sequence Diagram:

1B


Scenario 1C: Passenger arrives at a hallway when elevator is already there and the car is traveling in opposite direction as desired by passenger.

Pre-Conditions:

Scenario:

  1. Door[b,r] starts closing.
  2. Passenger arrives at a hallway [f,b] to use the elevator going in direction d.
  3. Passenger presses hall call button before doors are fully closed, but after doors are too fully closed for passenger to enter.
  4. Hall button lights up.
  5. Doors complete closing.

Post-Conditions:

Sequence Diagram:

1C


Use Case 2: Passenger Makes A Car Call

Scenario 2A: Passenger is in the car and elevator is not at the desired destination floor.

Author name: Example Solutions

Pre-Conditions:

Scenario:

Post-Conditions:

Sequence Diagram:



2B: Passenger is in the car and the elevator has arrived at the passenger's desired floor, but passenger has not yet exited the car as the doors begin to close.

Author name: Example Solutions

Pre-Conditions:

Scenario:

Post-Conditions:

Sequence Diagram:



 

Use Case 3: Passenger Enters Elevator

Scenario 3A: Passenger is waiting at a hallway for the elevator and has already pressed the hall call button.

Author name: Example Solutions

Pre-Conditions:

Scenario:

Post-Conditions:

Sequence Diagram:



 

Use Case 4: Passenger Exits Elevator

Scenario 4A: Passenger is in the elevator as it arrives at the passenger's desired hallway.

Author name: Example Solutions

Pre-Conditions:

Scenario:

Post-Conditions:

Sequence Diagram:



 

Use Case 5: Passenger Triggers Door Reversal

Scenario 5A: Passenger attempts to enter the car as the doors begin to close.

Author name: Example Solutions

Pre-Conditions:

Scenario:

Post-Conditions:

Sequence Diagram:



Scenario 5B: Passenger attempts to exit the car as the doors begin to close.

Author name: Example Solutions

Pre-Conditions:

Scenario:

Post-Conditions:

Sequence Diagram:



 

Use Case 6: Passenger Reads Car Position

Scenario 6A: Passenger is in the car, which is moving from floor f past floor g (the next floor in the direction of travel)

Note: Recall that the Drive of the elevator we provided is never commanded to go Fast, so the elevator only moves Slow and can therefore stop right away when it sees the appropriate AtFloor[f, b](True). Your solution will probably involve the Drive going Fast for some portion of the trip, and the CarLevelPosition Sensor to plan when to slow down. You will be given information on how to design a Fast Drive in the upcoming projects. For Project 2, a Slow Drive will suffice.

Author name: Example Solutions

Pre-Conditions:

Scenario:

Post-Conditions:

Sequence Diagram:



 

Use Case 7: Passenger Reads Car Direction

Scenario 7A: Passenger is in the hallway when the elevator arrives. Elevator opens doors when Dispatcher's intended direction is Up or Down.

Author name: Example Solutions

Pre-Conditions:

Scenario:

Post-Conditions:

Sequence Diagram:



Scenario 7B: Elevator opens doors when Dispatcher's intended direction is stop. Passenger arrives at the hallway when the elevator is already there

Author name: Example Solutions

Pre-Conditions:

Scenario:

Post-Conditions:

Sequence Diagram:



Scenario 7C: Elevator doors close on a hallway.

Author name: Example Solutions

Pre-Conditions:

Scenario:

Post-Conditions:

Sequence Diagram:



 

Use Case 8: Dispatcher Moves Car to Next Floor

Scenario 8A: Dispatcher moves the elevator from {floor f, hallway b} to {floor g, hallway c} in direction d.

Note: You will want to create other scenarios that involve fast speed for your elevator, but this is a starting point.

Pre-Conditions:

Scenario:

Post-Conditions:

Sequence Diagram:


 

Use Case 9: Dispatcher Cycles Doors

Scenario 9A: Elevator stops at hallway and doors open. Dispatcher computes next desired floor just as doors open. Doors close.

Note: This dispatcher is really dumb and stops at every floor, in order. It would be much better to stop only at floors with people on them or that people want to go to.

Pre-Conditions:

Scenario:

Post-Conditions:

Sequence Diagram: