Elevators That Weigh You
The elevator algorithm is the not-so-well-known method of choosing which floor that an elevator stops on next. The elevator algorithm is also used for hard drive head movement, but that application is probably not relevant to this discussion.
In a nutshell, an elevator will continue to go in the direction it is currently headed, up or down, until it is either empty or has reached the bottom or top floor, respectively. Along the way it will stop at any floor to let people off or on.
The latter, stopping to let people on, can be a problem. Say you’re at the tenth floor of a ten story building. You and about eight more people get into an elevator and you’re all headed for the ground floor. The elevator is very full and not one more person could possibly squeeze in. However, on your way down, it stops several times at floors where people want to get on, but when seeing that the elevator is already crowded, decide to wait for the next one.
So here’s the improvement - the elevator should continuously measure the aggregate weight of all of the people on it. If the amount is greater than some threshold, say 2000 pounds, it will assume that it is full and not stop at intermediate floors to let people on. However it will stop to let people off. And if enough people get off to reduce the aggregate weight of the remaining people to less than the threshold, the elevator will begin to let people on again. This way, the process of getting from one point to another should be faster for everyone.