Prove it
If a picture is worth a thousand words, how much is a dynamic, moving picture worth? Let’s find out. Rather than just talk about the theory behind the statistical reasons for replications, let’s watch some results in real time.
Download Case Study 2 – Replications model here.
Open the model called Case Study 2 – Replications.
This model uses a non-repeating periodic arrival with a quantity of 100 entities, 102 minutes of run length, a 50% route leading to Process2, 30% route leading to Process3, and a 20% route leading to Process4. Just for visual effect we rename the Item entity on the percentage routes.
This is a very simple model but it has a couple of new tools to make our “proof” a little easier to visualize.
We could just view the output report and do a simple calculation to determine if the number of entities entering each of the end processes matches the percentage on the routes leading to those activities. But with just a little extra work, the system can do all the work for us using variables and labels.
Double click the exit route leaving Process2. Click the Action tab, view the Action Logic window.
These action logic statements increment the variable v_TotalCount by value of 1 each time an entity uses this route in order to count the total number of entities leaving the model. The variable v_Count2 is also incremented, increasing the count of entities going through Process2. A calculation is then done for each of the 3 entities using the latest total count variable in order to accurately calculate the percentages of each entity type. The same action logic is repeated on each exit route, replacing Inc v_Count2 with the appropriate variable name.
Double click the red label titled Item2 Percentage.
The function of a label is to display the value of a variable on the screen during simulation. In this case, the variable selected from the Name drop down list is v_Pct2, which was calculated on the 50% route and shows the actual percentage of total entities entering the Process2 activity.
As the model simulates you will see that the percentage of entities crossing each percentage route varies because the system uses random functions to determine which of the percentage routes to select. For example, when the first entity arrives, it must choose which of the three routes to take. Regardless of which one it takes, the percentage break down will not be correct because one entity can’t be divided 50/30/20. As the second entity arrives, the same thing happens. But statistically it is impossible for the 50/30/20 breakdown to occur. A large enough sampling of entities must enter the model for those percentages to start to occur. The larger the sample of entities, the greater the chances for the breakdown to match the 50/30/20 percentages. But even with a large sample, randomness is still in effect. So the numbers will not be exact.
How can we minimize the effect of variation in the percentages? Replications. As you complete the simulation of this model you see the percentages are 52%, 25%, and 23%. That’s close to the expected results. But we should be able to do better.
Click the Simulation menu and select Options. Then change the Run Length to 1 day and Replications value to 30. Uncheck the Show Animation option and click Close.
When you run multiple replications, it can take quite a bit longer to run the simulation. Since we are just wanting to get the results and don’t need to watch the animation, let’s speed things up a bit.
Simulate the model, click Yes at the end of the simulation, or click the icon in the ProcessModel toolbar to view the Smart Stats. Click General Report to view the Averaged results.
Goto the Variables tab and view the average variable values for v_Pct2, v_Pct3, and v_Pct4.
Note the percentages are now closer to the expected values, but still not quite there. Let’s get it closer.
Close the report. We will need a larger sample of entities. Increase the number of arrivals to 1000. Click Simulation and select Options. Then increase the Run length value to 1020 minutes and run the simulation again.
You will see the following in the Variables section of the output report.
Even closer?
Close the report. Click Simulation and select Options. Increase the arrival quantity to 10000. Then increase the Run length value to 10200 minutes and the Replications to 50. Run the simulation again and view the Variables section.
As you can see, the more replications and the larger the entity sample size, the closer the results get to the expected values. This is the statistical nature of variation you build into your models whether through percentage routes, distributions, arrival rates, etc.
The reason replications yield different results from each other is because of the starting random seed value. Each time you start a model with a single replication, the random functions start at the same point (starting seed). When you use replications, the starting seed for the next replication begins where the previous seed value left off. Therefore all subsequent random calculations have a new sequence.
Self Teaching Guide
Getting Started
Lessons
- Your First Model
- Replications and Distributions
- Entity Arrivals
- Routings
- Attributes, Variables and Action Logic
- Shifts
- A More Complex Call Center
- Model Building Techniques
Case Studies
- Analysis
- Replications
- Froedtert Hospital Improves ICU Care
- Nuclear Site Cleanup
- Restaurant Customer Seating Optimization