Where's My Elevator?
If I ever got a job teaching introductory computer science, the first major assignment I would give would be to write an algorithm for the optimal distribution of a bank of elevators. If the current state of the art is any indication, everyone would fail.
I know it doesn't sound thrilling to most, but there's actually nothing more intriguing than standing in the lobby of a large building and watching the crazy paths some elevators take to pickup their cargo. Often, you can guess the algorithm used by just observing the traffic. There's the Stay-Where-You-Are-And-Wait algorithm. This one usually lead to a mad dash from all floors when the first request comes in. Others employ the sometimes more optimal Half-Sit-On-The-Top-Floor-The-Other-Half-Sit-On-The-Ground-Floor algorithm, which usually leads to confusion when picking up passengers in the middle ("Are you going to go get him, or shall I? Me? No, you? Wait, I'll get him. Oh, okay, you've got him.") Then there's the Whichever-One-Is-Going-In-The-Same-Direction algorithm. You can be on the 2nd floor with 10 elevators sitting on Ground, but if you push the 'down' button, you'll have to wait as an elevator from the 40th floor slowly makes its way to you. Apparently, elevators are subject to a new law of physics which makes moving a short distance, stopping, and returning, too difficult.
There is nothing...NOTHING...more frustrating than waiting for an elevator, only to have it shoot right past your floor! Unless, of course, it's finally getting an elevator to stop at your floor, only to find that it's filled to capacity and you're staring face-to-face with 20 stressed and cramped passengers who are all silently giving you signals that if you even attempt to enter the car, you should not expect to exit alive.
The building I used to work in had a frustrating flaw in its elevator control system. Say I was on the 5th floor and requested an elevator going down. It would dispatch a free car from, say, the 10th floor to come and get me. If another elevator going up happened to stop on the 5th to release a passenger, the algorithm was totally confused. My elevator would think "Well...I was called to pick up Don on the 5th floor, but I see there's already an elevator on the 5th, so he can take that one." and would bail on coming to pick me up. Of course, I didn't want to go UP with the rest of the people in the 5th floor car, so I essentially got dropped from the system. My request light would be extinguished, and I would have to try all over again.
Modern elevators have been in existence since the mid-1800s and the technology hasn't really changed all that much over the years. The system has become automated, and significantly safer, but modern advances in computer systems has done little to help optimize the flow of traffic. I witnessed one valiant effort on a recent trip to the West Coast.
My hotel was equipped with an elevator system with NO floor buttons inside the car. You had to tell the elevator which floor you wanted when you called it. This way, it could optimize elevator usage. For instance, to get to your room from the lobby, you would press your floor number on one of a series of panels in the hallway, and the system would tell you which elevator to take when it arrived. Only the named elevator would be told to stop on your floor. Of course, this led to all kinds of interesting scenarios. If you got on the wrong elevator, you were toast. If you happened to be chatting with your colleagues as they called the elevator, and you all entered the same one, you had better hope they were staying on the same floor as you. There was nothing funnier than seeing people walk into a waiting elevator car, wait until the doors closed, and then look for a button to press, not finding any. Talk about a feeling of entrapment!
One additional feature of this system, was that you could simply 'scan' your room card in the elevator hallway, and it would know what floor to send you to without you even pushing a button. Well...in theory at least. In my case, when I scanned my room keycard, the system requested an elevator for "Floor 31" on my behalf. Unfortunately, my room was located on the 21st floor. That's progress for you.
I'm sure that being in the elevator business must have its ups and downs (Come on! You knew I was going to say something like that, didn't you?). But I think it's time we put some real effort into optimizing the algorithms in these systems. If you ever have me as your computer science teacher...you'd better be prepared!
Don