Elevator Algorithms

in philadelphia, i spent a lot of time waiting for elevators. i inevitably paid a lot of attention to the control algorithms used by different elevators in different buildings.

all elevator algorithms solve the same type of optimization problem: given that a building has n floors and m elevators, how could we most efficiently move people up/down the floors? i'm sure you already know of the simple algorithm that every elevator implements, but one can definitely improve on this. here's one improvement someone tried to make.
example #1:
this building has one elevator, and 8 floors. the elevator was made to move back to floor 4 when it is idle.
this is an intuitive solution. since there are n floors where people could call the elevator, why not minimize the wait time by making the elevator go back to floor n/2 when it is idle? the problem with this argument is that it assumes that an elevator is equally likely to be called from any of the n floors, which is not true. in most cases, people who use the elevator would use it to either go down to ground floor from the floor they're at, or up from ground floor to the floor they should be in. this means that approximately half the time, elevator request would occur at the ground floor. a better design is the following:
example #2:
there are no more than 10 floors (i believe it was less), and about 6 elevators. when an elevator is idle, it moves to the ground floor, and opens its door.
this speeds things up a lot. not only could you avoid waiting for the elevator to get to the ground floor, you don't even have to press the button and wait for the door to open! i thought that this was a great idea! (an acquaintance pointed out, though, that unsuspecting people might mistakenly think that the elevator is broken. well then...)

the algorithm used in example #2 focuses a lot more on people going up as compared to people going down. i think this makes sense. going up stairs takes a lot more effort than going down stairs, so people are more likely to use the elevator to go up. however in a building with more floors, more people would want to use the elevator to go down, so having all the elevators in ground floor is not going to help. here's a solution that seems to work well:
example #3:
this building has two elevators and ~12 floors. it is programmed to ensure that at least one elevator is on the ground floor at any given time. the other elevator is often seen on floor 6, but i'm not sure if there's a pattern here.
this makes a lot of sense. the first elevator takes care of the case where people want to go up from floor 1. the second elevator takes care of the case where people would want to go down, and since the elevator is at floor 6, the wait time is reduced.

for small n and m, i really can't think of a better solution than the one used in example #3. for larger n and m, though, it becomes more complicated:
example #4:
this building has about 38 floors, and at least 12 elevators. the elevators are divided into two groups: the first group goes to floors up to 22. the second elevator skips all the floors until floor 22, so it stops at floors 22-38 (and the ground floor).
it would be quite disastrous if the elevators aren't organized this way. imagine working on the top floor and having to wait for the elevator to stop at every floor in between! this elevator is designed to go super fast from the first to the 22nd floor, making things even more efficient.

all of these examples are real. what i don't understand is why so many buildings do not have these optimizations built into their elevators. implementing these changes cost almost nothing, but can save a lot of peoples' time in the long run.

From:  www.lisazhang.ca

Add Comment

Cancel

Not comments yet.

More
About author
Posts
0
Answers
0
Follows
0

About Privacy Terms faq

@2017 CareerAnswers