Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I wanted to know how (real) elevators work. But, so far, I could not find much material about the algorithms they use, nor software (if any) for simulation. Could anybody give me references for that?

share|improve this question

closed as off-topic by Martijn Pieters, gnat, GlenH7, Doc Brown, MichaelT Apr 4 at 16:21

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Martijn Pieters, gnat, GlenH7, Doc Brown, MichaelT
If this question can be reworded to fit the rules in the help center, please edit the question.

Fundamentally, it's a problem described by queueing theory. –  Rein Henrichs Jul 27 '11 at 7:58

3 Answers 3

up vote 5 down vote accepted

Interesting question. Makes me want to do some research on this as well.

Wiki has a reference to a book Barney, G. (2003, January). Elevator Traffic Handbook: Theory and Practice. ISBN 9780415274760.

Here's a snippet from Wiki (you might have seen it already):

The elevator algorithm has found an application in computer operating systems as an algorithm for scheduling hard disk requests. Modern elevators use more complex heuristic algorithms to decide which request to service next. An introduction to these algorithms can be found in the "Elevator traffic handbook: theory and practice" given in the references below.

share|improve this answer

There are different implementations of course, but the most prevalent is this one:

Since in actual buildings the ground floor is usually used more frequently than others, there are also a fair amount of implementations which let the elevator return to the ground floor after a certain time of inactivity.

(On a side note, there is a telling that Donald Knuth once spent a day in an elevator just to be absolutely sure that he would describe the elevator algorithm correctly, but I can't find a reference for that.)

share|improve this answer

Elevator algorithm is best described using Knuth's Elevator algorithm.

But in the simple steps, the algorithm can be stated as:

  1. Travel in the single direction until the last request in that direction.
  2. If there is no request, stop and proceed towards other direction, if there is any request from other direction.
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.