EduCSE Blog


Lift/Elevator Simulator (JavaScript)

Author: Win Aung Cho
Lift/Elevator Simulator
Written in JavaScript and HTML

Simulation program is written in javascript. Lift carry peoples floor to floor as people go according to their decisional schedule plan.
In this simulation FPSControlLoop class is used for animation. This class run the Building class in which contains several lifts and floors. Peoples are represented with the Person class and each person has their time schedule plan. Some of them are living inside building and some come from outside. Person choice the location as their plan and wait for the elevator to go to any level.
Elevator is limitted with the maximum capacity to carry peoples. Each lift may has different capacity and different working floor range. Elevator hold several attributes to operate smoothly. Elevator do itself as an elevator controller. Elevator decides to go between floors up and down according to the Person's desire at floors.
Floor's heigh may vary from one to another. No of the Persons on the floor may different for each floor.
In example simulation, there are 3 elevator and 12 floors in the building. 20 persons come into building and waiting at Floor F0(ground). Floor 6 to 12 have 15 pearsons on each.
One of elevator has limitted to go between floor F0 to F5 while other two limitted F0 to F11.

Lift Simulator written in JavaScript
Check demo on link

Simulation is a model that allows you to run a real-world event on a computer. You can run a simulation model and analyze the situation. It builds the contents of the simulation class by class, builds a system, and implements external real-world processes.

The elevator simulation shown here is to try to find a solution for a transport system. How many people can you transport in one day? How long do people have to wait for the elevator? You can consider the answer you want, such as how much information the elevator needs to be on time to meet people's schedule. Not only numerical but also visual animation has been created. You can create a bus simulator according to that algorithm. If you need the program source code, you can download it from Github.

Developed by Win Aung Cho (StructSoftLab)
Original Post

Author: Win Aung Cho
15-Mar-2022 09:34:27 AM*