## 3 Heuristic Solution Applied to an Elevator Group Control System
### Running example  
Suppose we have an elevator system with two cars and eleven floors. Car 1 is currently on floor 5, and car 2 is currently on floor 3. Car 1 wants to move up to floor 8, and car 2 wants to move down to floor 2 (see Figure 2). The time needed to stop is equal to 4 units of time. The time to go from one floor to a successive one is equal to 3 units of time. The time needed to change direction is equal to 1 unit of time (one unit of time is equivalent to one second). * Car 1: moves up from floor 5 to floor 8 (9 units of time), stops at floor 8 (4 units of time), moves up from floor 8 to floor 10 (6 units of time), changes direction (1 unit of time), moves down from floor 10 to floor 7 (9 units of time), stops at floor 7 (4 units of time), moves down from floor 7 to floor 4 (9 units of time), stops at floor 4 (4 units of time), moves down from floor 4 to floor 0 (12 units of time), changes direction (1 unit of time), moves up to floor 2 (6 units of time). * Car 2: moves down from floor 3 to floor 1 (6 units of time), stops at floor 1 (4 units of time), moves down from floor 1 to floor 0 (3 units of time), changes direction (1 unit of time), moves up from floor 0 to floor 2 (6 units of time), stops at floor 2 (4 units of time), moves up from floor 2 to floor 10 (24 units of time), changes direction (1 unit of time), moves down from floor 10 to floor 7 (9 units of time), stops at floor 7 (4 units of time), moves down from floor 7 to floor 4 (9 units of time). Table 2 shows the cost of a trip between the actual position of cars (Car 1 and Car 2) and hall calls (HC2, HC4, HC7) based on the first heuristic. Car 1 => HC7 = 29 => HC4 = 42 => HC2 = 65  
Figure 2: A simplified example for an elevator system composed of 11 floors and 2 cars. Car 1 can perform the following calls: HC7 and HC4 (arriving at HC4 at 42 units of time). Car 2 can perform the following call: HC2 (arriving at HC2 at 20 units of time). _Heuristic 2_: Priority is given to the set of calls in the same direction (without reversing direction), or the direction of the car is changed when all calls in the same direction are responded to, beginning from the highest position if the direction is DOWN or from the lowest position if the direction is UP (in case of equity of opposite directions, priority is given to the same direction). _Running example_  
Suppose we have an elevator system with two cars and eleven floors. Car 1 is currently on floor 5, and car 2 is currently on floor 3. Car 1 wants to move up to floor 8, and car 2 wants to move down to floor 2 (see Figure 2). The time needed to stop is equal to 4. The time to go from one floor to a successive one is equal to 3. The time needed to change direction is equal to 1. * Car 1: moves up from floor 5 to floor 8 (9 units of time), stops at floor 8 (4 units of time), changes direction (1 unit of time), moves down from floor 8 to floor 7 (3 units of time), stops at floor 7 (4 units of time), moves down from floor 7 to floor 4 (9 units of time), stops at floor 4 (4 units of time), moves down from floor 4 to floor 2 (6 units of time). * Car 2: moves down from floor 3 to floor 1 (6 units of time), stops at floor 1 (4 units of time), changes direction (1 unit of time), moves up from floor 1 to floor 2 (3 units of time), stops at floor 2 (4 units of time), moves up from floor 2 to floor 7 (15 units of time), stops at floor 7 (4 units of time), changes direction (1 unit of time), moves down from floor 7 to floor 4 (9 units of time). Table 3 shows the cost of a trip between the actual position of cars (Car 1 and Car 2) and hall calls (HC2, HC4, HC7) based on the second heuristic. \[\text{Car 1}\Rightarrow\text{HC7}=17=>\text{HC4}=30=>\text{HC2}=40\]  
\[\text{Car 2}\Rightarrow\text{HC2}=14=>\text{HC7}=33=>\text{HC4}=47\]  
Car 1 can perform the following calls: HC7 and HC4 (arriving at HC4 at 30 units of time). Car 2 can perform the following call: HC2 (arriving at HC2 at 14 units of time). A waiting time longer than 30 s is usually considered long and undesirable for this service [20].