BANK SIMULATION
A bank has asked you to write a simulation to help them decide how many cashiers to open at a time. The bank need to hire cashiers, and they want enough so that customers don’t need to wait ‘too long’ in line, but they don’t want too many as they have to pay them, so they want to find the optimal number of cashiers.
Customers arrive at random, and their service takes a random amount of time.
The bank would like to adjust the following inputs;
MaxCustomers
MinCustomers
MaxServiceTime
MinServiceTime
NumCashiers
The simulation should last for 4 hours – 240 minutes.
For each customer generate a random number for their arrival time, and the service time – e.g.
Customer 1 – 35 – 14
Customer 2 – 38 – 12
Where Customer 1 arrived at minute 35, and took 14 minutes for service.
Your program should output the experience of each customer, and calculate the average waiting time. Assume we use the data above, and there is 1 cashier. The output would be:-
Customer 1 – arrived 35 – wait time 0 – left 49.
Customer 2 – arrived 38 – wait time 11 – left 61.
Average wait time – 5.5 minutes.