High Level Requirements:
- User should able to request the elevator from the floor.
- Once elevator reaches the requested floor, User should get in and should able to choose destination floor.
- Once destination is chosen by user, elevator should move to destination floor.
- Once elevator reaches destination floor, user leaves elevator.
User
- Presses the button on particular floor to request the elevator.
- Inside elevator cabin (referred as Cabin here after) user presses the required floor button.
- Leaves the cabin once elevator reaches particular floor.
Floor
- Floor has ID which indicates which floor it is.
- Floor has buttons to request the elevator.
- Floor has a display which indicates current location of the lift.
Buttons
- Button get illuminated when pressed indicating the action is performed.
- Button should stop illuminating once action is complete.
- When pressed, button places request for elevator for particular floor.
Cabin
- Cabin can move up or down as requested by controller.
- Cabin has set of buttons which tells user which all floors elevator can go.
- Cabin has button to close/open door.
- Cabin has door.
- Cabin commands door to open.
- Cabin commands door to close.
- Cabin has weight limit, which indicate how many passengers it can carry.
Door
- Door can be opened or closed as requested.
- Once door is open it closes automatically after certain delay.
Elevator Controller
- Elevator controller start up or stops the elevator.
- Elevator controller has status of the elevator.
- Elevator controller accepts request from floor and cabin buttons.
- Elevator controller commands cabin to move to particular floor.
- Elevator controller commands cabin to stop.
- Elevator controller updates status to each floor.
Elevator Request
Elevator Status
- Stores all elevator requests.
- Has a scheduling algorithm which decides, which request should be served next.
- Each request has direction, floor id.
Elevator Status
- Cabin State
- Current floor
- Directions
Cabin State
- Moving
- Idle
- Under Maintenance
Direction
- Up
- Down
No comments:
Post a Comment