Lab #3
A bank manager wishes to run a “Queue Simulation” to determine the optimal number of cashiers to employ – too many cashiers costs too much money, while too few cashiers means dissatisfied customers needing to wait a long time. The C++ STL Queue library should be used to manage the simulation.
Initial Settings
N = 180 (Number of minutes for simulation)
P = 0.1 (Probability of a new customer in any minute)
MinServ = 2 (Minimum service time for customer)
MaxServ = 15 (Maximum service time for customer)
Cashiers = 1 (Number of Cashiers)
Your job is to write a simulation. An example of the output for each customer could be:-
Customer #1 – Arrival Time 1 – Wait Time 0 – Service Time 8 – Departure Time 9
Customer #2 – Arrival Time 4 – Wait Time 5 – Service Time 3 – Departure Time 12
…
An example of a summary for the simulation could be:-
Number of cashiers – XX
Number of customers – XX
Average Service time – XX
Average wait time – XX
Customers at end of simulation – XX
Allow the bank manager to adjust the initial settings to run simulations for different branches of the bank.