The Lift Simulator is a web-based application that simulates the operation of multiple lifts in a building. It allows users to specify the number of floors and lifts, and then interact with the lifts by calling them to different floors.
Access live site : https://jc-lift-sim.netlify.app/
- Customizable building setup (number of floors and lifts)
- Real-time lift movement simulation
- Lift door opening and closing animations
- Intelligent lift selection based on proximity
- User-friendly interface for calling lifts
- The user starts on a landing page where they can input the number of floors (1-10) and lifts (1-10) for the simulation.
- Upon clicking the "Start" button, the simulation page is displayed with the specified number of floors and lifts.
- Each lift is represented by an object with properties such as current floor, direction, availability, and movement status.
- Lifts are initially positioned on the ground floor (floor 1).
- Each floor (except the top floor) has an "Up" button, and each floor (except the ground floor) has a "Down" button.
- When a user clicks a button, they are prompted to enter their destination floor.
- The system selects the closest available lift to respond to the user's request.
- If no lifts are available, the user is notified to wait.
- The selected lift becomes unavailable and moves to the user's current floor (if not already there).
- The lift's doors open, and a message is displayed indicating that it's picking up the user.
- After a short delay, the doors close, and the lift moves to the destination floor.
- Upon reaching the destination, the doors open again, and a message indicates that the user is being dropped off.
- Finally, the lift becomes available again for new requests.
- Clone the repository to your local machine.
- Open the
index.htmlfile in a web browser. - Enter the desired number of floors and lifts (1-10 for each).
- Click "Start" to begin the simulation.
- Use the "Up" and "Down" buttons on each floor to call lifts and enter your destination floor when prompted.
This Lift Simulator provides a basic yet functional representation of lift operations in a multi-story building. It demonstrates concepts of state management, user interaction, and animation in web development.