Skip to content

ayman-bit/Elevators-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elevators-System

  1. The elevator first travels towards the closest floor with a button pressed (if there are two different floors which are closest to the current floor, then one is chosen at random). Also, only one elevator will go after a given request on a floor. If the request is being han- dled, another elevator will not go after the request.
  2. Then the elevator travels in the direction of travel towards the destination floor chosen by the rider. If there are intermediate floors where riders have pressed buttons to go in the same direction, then each of those riders should also be picked up if the maximum capacity of the elevator has not yet been exceeded. Otherwise, the potential rider(s) will be rejected and take the stairs instead.
  3. The elevator will only switch directions once all requests in the current direction (up or down) have been handled, and there is another direction in the opposite direction pending. If there is no other request pending in the opposite direction, once the elevator has handled all requests in the current direction, then the elevator waits at the current floor until another request is made.
  4. Design A: Because of COVID restrictions, the Chief Health Officer at the university proposes that there should be more elevators built, but each elevator should only have a capacity of 1 person at a time. In this scenario, there will be a total of 4 elevators built. Design B: The assistant to the Chief Health Officer thinks that if the elevators are built to be larger, then there should not be a major issue with having 2 people in an elevator at the same time. But because the elevators are supposed to be larger, only two elevators can fit in the allotted space for the elevator shafts instead of 4.

About

This algorithm is designed to assimilate an elevator system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages