Queuing Models

Many discrete event simulations are interested in the service time of items, whether in manufacturing, customer service, or other kinds of situations. When an item is not actually being processed or serviced, it is usually waiting in line. Thus, the simulation models are usually queuing models.

Today, we'll look at a few queuing models and some modeling techniques.


To have a more graphical output between a min and max, you can use a meter. Here's an example:


To use a meter:

Queuing Models

I didn't build these myself. I got these from the web site of Charles Winton at the University of North Florida, which is linked from the Extend web site.

  1. Basic queuing models
  2. Priority queues, matching queues, suspending a queue
  3. Using resources and attributes

The W output of the Queue

It would be cool to choose a queue by the minimum average waiting time, rather than the queue length. After all, if there were two queues, one with a dozen people, all with 1 or 2 items, and the other with two or three people with carts full of items, you'd probably choose the long queue.

You might think that the W output of the Queue block would be the way to go. Alas, it turns out that the W output has several problems. First, it only produces the waiting time of the last item to leave. While this might be useful sometimes, it's often not what we want. Here's how we can tell:


Secondly, it often produces no value, rather than a zero. That can be solved with relatively simple tricks, namely, comparing the value to zero and taking the larger:




If you really want the minimum mean waiting time, it's best to use timers:


In this last model, notice the fun stuff I did with the plotter: you can control the colors and textures of the lines.

Here it is with a hierarchical block. I could spend a bunch of time drawing a cool icon for it, but this is sufficient, though not as pretty.


Lab exercise

To practice with these ideas, try the following:

  1. This work is licensed under a Creative Commons License
  2. Creative Commons License
  3. Viewable With Any
  4. Valid HTML 4.01!
  5. Valid CSS!