Lab on Bimodal Distributions, Hierarchical Models, Fast Food Operation

Today, we'll learn a new simulation model that I hope will be interesting. Then, we'll spend some time doing some point estimates and confidence intervals.

Bimodal Distributions

Suppose we want to have a service time that is the sum of two Gaussians. This comes about when there are two kinds of service, one longer than the other, but both are Gaussian. The PDF for this distribution might look like a Bactrian camel, or one hump might be much larger than the other, dominating the appearance. Consider the following:

bimodal.mox

Now, let's see how this might work as a service time. Examine the following:

bimodal-service.mox

Note that there's gotcha with the histogramming. The reasons for this are:

  1. Efficiency: a number is only generated upon demand.
  2. Histograms don't generate demands, and even if they did, they'd get a different number

We'll talk about this. I asked the Extend support folks, and they sent the following, which works fine, and it explains why Winton's models (which we'll look at soon) so often use timers.

bimodal-service-2.mox

The "Timer" block lives in (Discrete Event Lib / Information / Timer). Essentially, you can determine how long an item (entity) takes to go from one place in a model to another. The end is marked with the "sensor" input.

Attributes

You noticed in the last model that there were three attributes of the items used: Dist1, Dist2, and WhichDist. What attributes can you use? Actually, you can use any you want; you can make them up. Let's do that.

That's all there is to it!

Hierarchical Models

(There may not be time for this today.)

Hierarchical models are nice when you have a fairly complex model that breaks into coherent parts. (Our global heat simulation might be usfully restructured this way.) The complex way of doing service times could be done this way. Let's try:

Here's what I came up with

bimodal-service-2-hier.mox

Notice how much nicer the main model is! We could use this block in a much more complex model and the overall model would be much easier to see and understand. Notice that the "help" button for the new block works, too.

The ability to create hierarchical blocks is a really nice feature of Extend.

Fast Food Operation

Extend has a built-in example model of a hamburger joint. We'll explore this first. You needn't understand every aspect of this model, but try to think about how this expands your repertoire of modeling techniques.

This is a pretty cool model, and pretty complicated. Some of you may decide to build something this complex for your project, but it's not required. I'm just looking for you to build something interesting and challenging.

Running the Restaurant

When we run the Fast Food Operation model, we get several kinds of data, including the wait time for each customer, the length of the line, and the number of burgers. Let's suppose we're only interested in the average wait time.

Now, here's some data you could take to your boss!

Suppose, though, that your boss knows some statistics and says, "Gee, I'd really rather have an estimate of the median wait time."

Now what?

  1. Run the simulation once.
  2. Extract the wait-time data from the plotter, copy it to Excel, and compute the median.
  3. Is the median the same as the mean? If so, this might be a symmetrical distribution, in which case you can tell your boss to use the original point estimate.
  4. Try this several times. Because this is so tedious, we won't collect a lot of median data.

Think about how you would compute a confidence interval on a median. There are a couple of issues:

Review

Today, we learned about the following:

This work is licensed under a Creative Commons License | Creative Commons License | Viewable With Any
Browser | Valid HTML 4.01! | Valid CSS!