164 comments

[ 0.23 ms ] story [ 66.7 ms ] thread
This article gives me war flashbacks about a particularly irritating OO design interview from 5 years ago.
Oh my god, every time I'm waiting for the elevator, I think of how annoying it must be to be someone who's building the algorithm to make sure that you minimize the amount of wait times between picking up people and taking them to their destination. Then I also wonder if the people who apply the logic and program the logic into the elevators are actually evil sadists that are doing it on purpose to make us wait longer enough and suffer a little extra.
Maybe I missed it, but the algorithm should also redistribute empty elevators that stop too closely to each other.
This is a good article. It reminds me of a story.

At a previous employer we had heteregenous elevators. In one bank, some went to the lower half of floors only while others went to all and the company installed a "smart" elevator system. I kind of became known because I was constantly yelling about this system in the feedback group because I hate "smart" elevators and and (IMHO) they just don't work. What actually works is express elevators and sky lobbies.

This article covers one of the deficiencies this system had: full elevators. For example, you'd want to go down and an elevator would skip your floor because another had already been assigned. That one would show up full and you couldn't go down. Down wasn't so bad because the stairs weren't a bad option but up was terrible. Going up a few floors was fine. Going up 20 was... a bigger issue.

Back in the day we had elevator operators and people in the lobby during the morning rush who would shepherd people into particular elevators. I actually think this system works way better than anything technology has come up with. Even if you nail the implementation (and I've never experienced elevators that have), people don't read and will just get into elevators anyway.

Anyway the article says that generally speaking on smaller banks simple up and down buttons work best. I absolutely agree.

There's a deeper issue here though and that is solutions looking for a problem. Nobody is making money from up and down buttons. They are fromn selling smart elevator solutions. And you see this everywhere in life. It basically devolves into rent-seeking behavior. Salespeople wine and dine a couple of people responsible for making decisions and then make bank on selling something nobody wants or needs as well as the constant maintenance and updates.

Makes me want to play Sim Tower again.

There’s something so satisfying about watching a machine just dutifully work through queued tasks like this.

Reminds of something I haven't thought about in a very long time... SimTower
Slightly OT, but this reminded me of Colson Whitehead's _The Intuitionist_[1], an amazing speculative mystery novel about two dueling schools of elevator inspection philosophies: the Empiricists and the Intuitionists.

1. https://en.wikipedia.org/wiki/The_Intuitionist

My biggest pet peeve is elevator banks where they don’t make some number of idle elevators automatically come back to the lobby. Half your traffic is over there! Everyone coming in has to wait an extra minute or two because all your elevators were chilling on the 35th floor and above.
I've never really liked Destination Dispatch elevators. Besides struggling to find the car I've been assigned to, sometimes you really have to hustle across the lobby to catch it. Then you also run into visitors that assume it's a normal car and can hit a floor button when the get in, only to realize they've walked into a car without buttons.
I think a small improvement that could be made is to have the dot representing the person be colored the same as a dot on each floor, which would obviate the destination floor for each individual.
The biggest problem I always have with elevators is not the algorithm, it's the people seemingly being unable to grasp the concept of pressing either the up or the down request button, depending on where they want to go. Almost always I find someone will press both, because "then the elevator comes faster". Completely ignoring the fact that they end up going the wrong way first half the time, and adding an unnecessary halt for everyone already in there. How hard can it be to understand?..
I live in Ireland. 10+ years ago I used to the travel to the US quite a bit (5-10 trips a year). The majority of the time I would fly via a major EU hub like AMS or CDG even if there was a direct flight from Ireland.

The reason? Other factors that were important to me!

Examples:

- cost optimisation. I could fly business within company budget rules.

- flight time. I highly valued longer flight times between Europe and the US west coast so I got a proper night's sleep when flying east-bound. Doing connections on the east coast often meant quite short transatlantic flights that arrived very early in the morning. Much harder to manage the jetlag.

- Product offering. Some of the routes from AMS and CDG had much newer planes and cabins.

- Airline alliance loyalty. Given the travel pattern it meant sense to pick an alliance that delivered some value. Irish airlines didn't have much to offer and were much more expensive for a worse end to end product.

Yes, same here, in croatia people believe that you need to press the opposite direction to "summon" the elevator, if the elevator is on lower floor they will press the "up" arrow to bring it up to their floor. And then of course when the doors open they will ask "going up or down?", which is ridiculous. When I point out that the ground floor only has the "up" button they just ignore it (hard to unlearn ingrained beliefs).
OMG ! This is a huge problem in India. Frustrating.
>All this technology just to underperform the S&P

My takeaway is that the benefit of using a much more complex algorithm is marginal.

Don't forget the executive elevator algorithm (EEA), which uses a priority interrupt to take passengers directly to the top floor.
Hah, I thought a lot about this problem while developing Sky Lobby, a mobile game (iOS / Android) about controlling and automating elevators.

In the game, some of the elevators are automated, and I wanted to choose an algorithm that best aligned with what players would expect an elevator to do. I ended up going with something close to LOOK, which (as the article states) is mostly what people expect. Except in case of ambiguity, I had it prioritise floors that have been waiting longer, to improve the p90, which is important in the game.

But now, add in these challenges:

- double-deck cabs (where attached cabs cover two floors at once)

- transfer floors between shafts

- express shafts

and the best (or at least, most expected) algorithm becomes much less obvious! I'll leave it as an exercise for the reader to figure out the best one.

Luckily I was in charge of a game, not a real elevator system, so I just had to find a heuristic that was good-enough, and could tweak the rules to let players manually override the elevator's plan if they don't like where it's going. This seems to have satisfied most players.

I think this comparison is also assuming the distribution of request & requested floor is uniform? When actually near pairs are less likely (I'll just take the stairs) than bottom to top, so even analysing it is more complex than at first glance.
did he factor in the lifting speed?
This is absolute catnip to me. Fantastic job to the author! It really scratches the itch of wanting to understand elevator dispatch algos!

I want something similar for advanced sensor stop lights...

I've long toyed with creating an elevator simulator game, but every time I build a prototype I realize it's not that fun to manually dispatch elevators, and playing with algos only goes so far! Elevator Saga is great for the programming side: https://play.elevatorsaga.com/

You have no idea how excited I was to see this article today. I've long been fascinated with elevators and the algorithms that control them. Thank you!
> Everyone has shared the frustration of waiting for an elevator that never seems to arrive.

Really? Maybe I'm lucky I never had to deal a lot with elevators.