The algorithm just does a simple sweep in the up or down direction, much like a real elevator. Any fancier prediction would require there to be some pattern of use by the passengers, but this simulation is just random.
I did at one point initialise to the third floor to give a slight advantage on average in picking up the first passenger, but I didn't bother with parking it on the third floor when idle at other times, because passengers arrive at a sufficient rate that it is never idle once it is started... Since the advantage of improving performance for just one client wasn't really worth the effort, I removed it altogether.