This project simulates a lift (elevator) system with multiple lifts and floors. It dynamically responds to floor requests, manages lift movement, and provides real-time status updates. The system also optimizes lift allocation for faster response times.
- Multiple Lifts and Floors: The system allows you to generate multiple lifts and floors based on user input, creating a dynamic environment.
- Efficient Lift Allocation Algorithm: An optimized algorithm handles simultaneous floor requests, allocating lifts based on direction, distance, and availability to ensure quicker response times.
- Queue System for Coordination: The system includes a queue that coordinates lift movements, avoiding overlapping and ensuring smooth traffic flow, especially on busy floors.
- Real-Time Lift Status: The live status of each lift is logged in JSON format to the console, providing real-time updates on lift positions, directions, and states.
- Lift Movement Simulation: Lifts move between floors based on floor requests. Each lift is assigned a task based on its current state (Idle, In Progress, Moving).
- Efficient Request Handling: When a floor request is made, the system prioritizes lifts based on proximity and direction to optimize the allocation process.
- Queue for Collision Avoidance: A queue ensures that multiple lifts are properly coordinated, avoiding any overlap in movements or conflicting requests.
- JSON Logging for Live Updates: The current status of each lift (position, direction, and state) is logged to the console in real-time using a JSON format.
- JavaScript: For creating the simulation logic and managing interactions.
- JSON: For logging live data of lift movements and statuses.