Calculate the time spent in the queue and the service time for each customer.
For this coursework you are required to solve a simulation problem using SAS. Your solution should be word-processed and submitted electronically. Your solution should include any SAS code used to process the data, any output produced from the analysis, and a detailed account of the methods you have used, the reasons you have chosen those particular methods, and the conclusions you have drawn.
The problem:
The inter-arrival times of customers in a bakery have an exponential distribution with mean 2.4 minutes. Customers of type 1 buy only their daily loaf of bread, and have a service time that has a normal distribution with mean 1 minutes and standard deviation 0.05 minutes. Customers of type 2 buy more than one item, and have a service time that has an exponential distribution with mean 1.9 minutes. For each arrival, the probability that it is type 1 is 0.4 and the probability that it is type 2 is 0.6.
(i)Simulate 500 arrivals at the bakery, randomly selecting which are of type 1 and 2 and simulating the corresponding service-times. Calculate the time spent in the queue and the service time for each customer. Explain carefully the meaning of each value you calculate. Dont print out the whole simulation: just print the records for the first 20 customers.
20 marks
(ii)Calculate the size of queue each customer finds on arrival. Again, dont print out all the records.
20 marks
(iii)Calculate for all customers the maximum and mean for both queue length and waiting time (time spent in the queue plus time spent getting served). Investigate situations where large queues build up and discuss the apparent causes.
20 marks
(iv)Calculate separately for customers of type 1 and 2 the maximum and mean for both queue length and waiting time. Compare the experiences of the two types of customer.
10 marks
(v)The bakery is considering introducing a separate queue for customers buying only a loaf of bread. This would effectively produce two totally separate queue regimes for the two types of customer. Simulate this and investigate the effect on waiting times and queue lengths for each type of customer. Remember to adjust the arrival rates for the two types of customers.
30 marks






