Activity: The Scenario App

KSL Applications Activities

Author

Manuel D. Rossetti, PhD P.E.

Work in pairs. Each question asks you to predict before you run the model; write the prediction down, then check it.

The question. The drive-through pharmacy from the Single-Model app activity now has a mean service time of 0.8 minutes, and one pharmacist cannot keep up. Should the pharmacy staff one, two, or three pharmacists? You will answer it the way an analyst would: run every alternative, compare them statistically, and then decide.

Setup. Start KSL Scenario. Keep your notes from the Single-Model app activity at hand; you will need its busy and twopharm results.

1. Build the scenarios

  1. On the Scenarios tab, click Add…, choose the DriveThroughPharmacyWithQ model from the KSL Book Examples bundle, and name the scenario One. Select it and click Edit…. Override the mean service time to 0.8, leave Pharmacy.numPharmacists at 1, and keep 30 replications.

  2. Select One and click Clone twice. Name the clones Two and Three, and edit each to set Pharmacy.numPharmacists to 2 and 3. Check the Overrides column: every scenario should show the service time override, and Two and Three the pharmacist override.

  3. Predict the average time in the system for each scenario. You already have numbers for one and two pharmacists. For three, use the M/M/c formulas (Appendix C, the section Summary of Queueing Formulas).

  4. Set the Analysis name in the toolbar to Staffing, choose Sequential mode, and click Simulate.

2. Read the results

  1. Before you open the reports, predict: will One and Two match your busy and twopharm results from the Single-Model app exactly, closely, or only roughly? Then check on the Scenario Reports tab, and explain what you see.

  2. Compare Num Served across the three scenarios. Why is it almost the same in all three, when the staffing is so different?

  3. Does the 95% confidence interval for System Time in Three contain your M/M/3 prediction?

3. Which is best?

Open the Comparison Analyzer tab and check all three scenarios. Each analysis has a Configure… button; pick System Time as the response.

  1. Generate a Box Plot. Before you look, predict which scenario has the widest box and which the narrowest. Were you right, and why?

  2. Generate a Confidence Intervals Plot. Do the intervals for Two and Three overlap?

  3. Generate a Multiple Comparison Analysis with the indifference δ left at 0.0. We want the smallest time in the system. Which scenario does the analysis pick as best? Read the interval it reports for Two: what does it say about how much worse Two is than the best?

  4. Generate it again with the indifference δ set to 0.25 (a quarter of a minute, 15 seconds). What changes, and what does δ mean in words a pharmacy manager would understand?

  5. The analysis compares replication 1 of Two with replication 1 of Three, replication 2 with replication 2, and so on. Use your answer to 2b to explain why that pairing is fair, and why it makes a small difference easier to detect.

4. Decide

Statistically best is not the same as best for the business. Suppose a pharmacist costs $50 per hour, and each car in the system costs the pharmacy $0.50 per minute in lost goodwill. Let \(s\) represent the number of pharmacists and \(L\) represent the average number of cars in the system. Then the cost per hour is

\[50 s + 0.50 \times 60 \times L.\]

  1. Before you compute anything, predict which staffing level costs the least.

  2. Use Num in System from each scenario’s report to compute the cost per hour of each staffing level. Which is cheapest?

  3. How large would the goodwill cost per car per minute have to be before three pharmacists cost less than two? Would you trust a decision that hinges on a number that large?

5. Save it, and one more run

  1. Choose File > Save and save the scenario set as Staffing.toml, noting the folder it goes in. You will use it in the KSL Server activity.

  2. Switch the mode to Concurrent, change the Analysis name to StaffingC, and simulate again. Predict first: will any number change? Why or why not?