in reply to Re: Re: Multi-Threaded Elevator Simulator
in thread Multi-Threaded Elevator Simulator

As far as making the simulation more accurate, there are many ways I could go.

I suggest you go to a near-by university and observe people's habbits getting on and off elevators (as well as finding out how the elevators operate), calculating how long people usually wait for an elevator to come down before leaving ... etc.

(Or if that doesn't strike you as fun, or you don't have several weeks ... :), you could always check out Knuth's The Art of Computer Programming. I don't have the books here as a reference, but I believe it is either the first or second one. Knuth does just what I described above--memory permitting, of course. Its pretty informative if you have the books or can get them at a library--of course, I make no guarentees that he talks about threading, either in Perl 5.8.0 or otherwise :)

  • Comment on Re: Re: Re: Multi-Threaded Elevator Simulator

Replies are listed 'Best First'.
Re: Re: Re: Re: Multi-Threaded Elevator Simulator
by samtregar (Abbot) on Aug 09, 2002 at 20:45 UTC
    At my university (NYU) they actually had security guards posted at all the ground floor elevator doors to tell people how to get on and off the elevators. No joke.

    But ultimately, this exercise isn't about building the best possible elevator simulator. It's about showing people how to use Perl's threading support. In fact, if anyone could show me how to build a dumber, simpler simulator that still works I'd probably use that. The elevator algorithm is really just a distraction here.

    -sam