Skip to content

ArielZidon/Elevator_algorithm

Repository files navigation

Elevator_algorithm

(The way to run the program is below an explanation of the algorithm) EX1 – Elevator offline algorithem

  • A collection of sources that helped understand the problem and build the algorithm:

Article 1: How do smart elevators work? what are the benefits of this elevators https://riseaboveelevator.com/2020/07/20/smart-elevators-the-next-big-trend/

Article 2: Which algorithem is work better today: https://www.youtube.com/watch?v=xOayymoIl8U

Article 3: The problem space of waiting times and short waiting times at the expense of too much investment of energy: https://www.smart-industry.net/smart-elevators-giving-iot-a-lift/

offline Algorithm: This algorithm works in such a way that each elevator has an ascent list and a descent list so that from any pre-known reading we will embed the elevator with the shortest time to arrive considering the data of all the elevators in the requested building. We will try to keep an elevator that goes up with appropriate readings going up until it stops on the top floor of the ascent list and then starts going down in the same way. Each elevator has a calculation of the time it will take it to reach the next call based on the data it has (speed, opening and closing doors ..)

uml

How to run the program:

  • Download all project files
  • Select a building in MyAlgo in the cmd function on line 50 to run the Calls file you want on it.
  • Then a line below the building selection must select some call so in line 51 we will select the call we want.

For example:

select building and call

  • We will now run the cmd function in main.

main run

  • We will now open the terminal and write the following line:

java -jar Ex1_checker_V1.2_obf.jar 1111,2222 (Building you want.json).json output.csv out.log

For example:

terminal

-After running the line in the terminal we can see the average time a person waited for an elevator and the number of people who did not receive service.

Enjoy!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages