...

/

Getting Ready: Elevator System

Getting Ready: Elevator System

Understand the elevator system problem and learn the questions to simplify this problem.

Problem definition

Elevators are essential in multi-story buildings, enabling the efficient movement of people and goods. A typical system includes one or more elevator cars that respond to user requests from call buttons on each floor and destination selections inside the car.

To ensure efficiency and safety, an elevator system must handle requests intelligently, minimize passenger wait times, respect car capacity, and support centralized and decentralized control of multiple cars. The system must also manage concurrent requests, optimize car movements, and provide real-time feedback through displays inside and outside the cars.

Robust safety protocols are critical: in emergencies like power failures or fire alarms, the system may need to ignore inputs and keep doors closed until operation is safe. Handling such scenarios correctly is essential for user protection and reliable operation.

In this LLD interview case study, your focus will be on:

  • Multiple elevators coordination: Distributing requests among cars and managing their interaction.

  • Request scheduling: Prioritizing and queuing floor requests.

  • Capacity management: Preventing overloading.

  • Real-time updates: Showing current floor, direction, and occupancy.

  • Safety and fault tolerance: Managing emergencies and critical faults.

  • User experience: Minimizing wait times, supporting up/down requests, and providing clear information.

This elevator system case study requires you to design a scalable, reliable, and user-friendly system that can be adapted to different building sizes and requirements.

Expectations from the interviewee

Numerous components are present in a typical elevator system, each with specific constraints and requirements placed on it. Interviewers look for your ability to break down and design the system, anticipate real-world scenarios, and identify components and interactions. Typical areas of exploration include:

Multiple elevators

You can also ask the interviewer whether the system should handle multiple elevators or just a single one. For this, you can ask the following questions:

  1. Can there be multiple elevator cars in the building?

  2. How could a one-elevator system be different from a multi-elevator system in terms of user wait time and running cost?

Display

You may want to ask the interviewer about the display of the elevator system:

  1. How will users request elevators (call panels on each floor, selection panels inside cars)?

  2. What information is shown on displays inside and outside the elevator cars (current floor, direction, occupied status)?

  3. How do you keep users informed of system state and updates?

Optimization

An interviewer would expect you to ask questions about the optimization of the elevator system in terms of wait time, maintenance, throughput, etc. You can ask questions like:

  1. What strategies can minimize passenger wait times and unnecessary car movements?

  2. How does the system handle peak hours and concurrent requests?

  3. How do you optimize for both user experience and operational efficiency (energy use, maintenance)?

Reliablity and safety

You may want to ask the interviewer about the safety and reliability of the elevator system:

  1. How does the system respond to faults, emergencies, or overloaded conditions?

  2. What features ensure passenger safety at all times?

Design approach

In this case study, we‘ll take a bottom-up design approach:

  1. Start small: Identify and design the smallest building blocks of the system, such as buttons, doors, and displays.

  2. Compose larger components: Use these small components to assemble larger modules, such as the elevator car, request panels, and floor subsystems.

  3. Integrate into the full system: Bring these pieces together to design the complete elevator control system for a building.

  4. Iterative refinement: At each stage, consider interactions, constraints, and edge cases; iterate and refine based on system requirements.

This approach helps ensure the design is modular, extensible, and robust, and makes it easier to adapt the solution for varying building types and requirements.

Design pattern 

During an interview, it is always a good practice to discuss the design patterns that an elevator system falls under. Stating the design patterns gives the interviewer a positive impression and shows that the interviewee is well-versed in the advanced concepts of object-oriented design.

Try to answer the following question. If you are not familiar with design patterns, don’t worry! You can learn about them by asking questions like, “Define design patterns.”

Which design pattern(s) should be used to design an elevator system? Please explain your choice(s).

Let’s explore the requirements of the elevator system in the next lesson.