O'Reilly logo

Digital Dice by Paul J. Nahin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

image

image

15. How Long Is the Wait to Get the Potato Salad?

To simulate the operation of the deli counter, the sequence of decisions that the clerk(s) go through, at each moment of time, is as follows, where, to simulate the flow of time, the code deli.m defines the variable clock whose value at the opening of the deli counter is zero and is 36,000 at closing; i.e., clock advances the code through simulated time in one-second increments:

 

(a)   continue the service of the customer(s) presently being processed;

then

 

(b)   if there is a/are clerk/s available ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required