Skip to content

An application presenting a simulation of an optimized algorithm that efficiently manages an elevator system, complete with visualizations. Written using Java language + JavaFX framework.

Notifications You must be signed in to change notification settings

YoC00lig/Elevator-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚙️ Elevator management system

The program presents an algorithm that handles the elevator management system. It also provides a visualization of the designed algorithm and allows the user to try it out.

▫️ Algorithm:

  • The elevator can be in an IDLE state (not moving) or directed up/down.
  • When it comes to elevators that move up and down, it is necessary for the floor from which the request is made to be located along their route.
  • The elevator that is IDLE and closest to the floor from which the request is made is selected if none of the moving elevators have that floor on their route.
  • If there is no elevator that meets these criteria, then the elevator with the closest destination to the given floor is chosen.
  • If there are no more stops in the direction in which the elevator is moving, it changes direction (if there are stops in the opposite direction) or becomes IDLE (if there are no more stops).

▫️ Example:

I believe that my algorithm is optimal and performs better than the "First Come, First Serve" algorithm. Let's consider a scenario where passengers are waiting on the first, fifth, and eighth floors, and we have only one elevator. If the requests are sent first by the passenger on the first floor, then the eighth floor, and finally the fifth floor, even though the elevator will pass the fifth floor where a passenger is waiting, it will not pick them up. It will have to return for them later, adding extra distance and time. In such a situation, my algorithm will pick up the person waiting on the fifth floor before person waiting on eight floor, because fifth floor will be on its route to eight floor.

▫️ Technologies used:

  • Java 17
  • JavaFX
  • Gradle
  • The icons have been sourced from here.

▫️ Run a program:

To run the program you can execute the following commands:

./gradlew run

or to avoid gradle command prompt use:

./gradlew -q --console plain run

▫️ Application presentation:

The application will first ask for data. Remember that the number of elevators must be less than or equal to 16 and greater than 0. Otherwise, the program will throw an IllegalArgumentException.

The application allows for easy monitoring of the situation. At the beginning, each elevator is in the IDLE state and located on the 0th floor. On the right side, there is a sidebar that describes the current status of each elevator.

▫️How passengers call the elevator?

The desired floor to which the passenger wants to go can be entered in the TextField located under the red button. For example, if the passenger is on the 3rd floor and wants to go to the 10th floor, they must enter 10 in the TextField corresponding to the floor number 3. Then, to call the elevator, the red button must be pressed.

If a passenger enters a floor that does not exist (less than zero or greater than the highest floor), the program will throw an IllegalArgumentException.

About

An application presenting a simulation of an optimized algorithm that efficiently manages an elevator system, complete with visualizations. Written using Java language + JavaFX framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages