Activity: Comparing Two Systems

Simulation Output Analysis Activities

Author

Manuel D. Rossetti, PhD P.E.

We write this experiment together: the instructor types the code, and you type along. Before each run, write down a prediction; then run and check it.

The situation. Customers arrive at an ATM in a shopping mall as a Poisson process at 60 per hour (stream 1). The current ATM serves a customer in an exponential time with a mean of 0.9 minute (stream 2). After complaints, the bank is considering replacing it with two ATMs of a cheaper model, each with an exponential service time with a mean of 1.8 minutes. The mall is open 10 hours a day, and opens with no one waiting. The bank will invest in the two ATMs only if they decrease the probability that a customer waits 3 minutes or more by more than 0.05. Make a statistically valid recommendation, from 30 days of each configuration.

Setup. Get the starter file ATMComparison.kt from the code/ folder beside this activity, and put it in src/main/kotlin/student/activities. The ATM model is complete; the experiment in main, marked TODO, is what we write. As given, main runs the current ATM once.

1. Predict

  1. Predict the utilization of an individual ATM in each configuration.

  2. Treat each configuration as a queue that runs forever: an M/M/1 queue, and an M/M/2 queue. Let \(P_w\) represent the probability that a customer must wait, the Erlang delay probability of Appendix C (the section Square Root Staffing Rule). In an M/M/\(c\) queue, a customer who waits does so for an exponential time with rate \(c\mu - \lambda\), so \(P(W_q > t) = P_w\,e^{-(c\mu - \lambda)t}\). Compute the long-run probability of a wait of 3 minutes or more for each, and the decrease. Which recommendation do you expect?

  3. Which configuration will have the shorter time in the system?

2. Code along

  1. TODO 1 and TODO 2. We attach a KSLDatabaseObserver and run the first experiment, named “1 ATM”. What will the database hold after both experiments?

  2. TODO 3. For the second experiment we change the number of ATMs and the service time, and set resetStartStreamOption to true. What does that option do, and why does the comparison need it?

  3. TODO 4. We ask the database for a multiple comparison analyzer on the waiting probability. Why does it need both experiments to have the same number of replications?

3. Decide

  1. Read the comparison report. What is the 95% confidence interval on the difference between “1 ATM” and “2 ATM”?

  2. Apply the bank’s rule. What do you recommend, and how confident can you be?

  3. Compare the time in the system for the two configurations. Would customers agree with the bank’s rule?

  4. Suppose the second experiment had not restarted the streams, so the two experiments were independent. Predict what would happen to the confidence interval on the difference. The instructor runs it; was your prediction right, and would the recommendation have been the same?