SYSEN 5200 Homework 3
This homework is due Monday March 4 at midnight 11:59pm Pacific timezone. Feel free to use Excel or Python for solutions to these problems. You can attach any code or screenshots of excel spreadsheets at the end of your pdf.
1. Consider a two-server queueing system, where the customers arriving into the system join a single queue, wait for their turn, receive service from either one of the two servers and leave the system. The first server is faster than the second one. If an arriving customer finds both servers available, then it uses the first server. Otherwise, it simply uses whichever server is available. We are interested in simulating the behavior of this system with the intention of estimating
. the proportion of time that the first server is busy;
. the proportion of time both servers are busy; and
. the proportion of time that there are one or more customers in the queue over the first 100 minutes.
The interarrival times for the customers are exponentially distributed with mean 0.5 minutes. The service times at the first server are exponentially distributed with mean 0.8 minutes and the service times at the second server are exponentially distributed with mean 0.9 minutes. We assume that the queue can accommodate infinite number of customers and the system starts empty.
a) Draw a diagram of this two-server queue.
b) Describe the state of the system and the events that change the state of the system.
c) Write precise pseudo code that describes how different events change the state of the system and what other events are scheduled in response.
d) Use a worksheet to manually simulate the system over 10 minutes. For the interarrival times, use the sequence 1.3, 1.1, 0.6, 1.5, 2.2, 1.1, 0.5, 0.7, 0.1, 1.4, 1.2, 1.4, 1.4, 1.2, 2.1. For the service times at the first server, use the sequence 2.1, 1.3, 0.9, 1.4, 1.2, 2.1, 2.2. For the service times at the second server, use the sequence 2.2, 1.6, 1.1, 1.7, 2.1, 1.3, 0.9. If you run out of interarrival and service times, then make up your own. Make sure that you compute the statistics of interest in your manual simulation. Use appropriate variables to compute the statistics “on the fly” rather than finishing the whole simulation and looking at the whole worksheet later. Clearly report the final statistics.
e) Write a computer program that simulates the two-server queueing system with the probability distributions given above. Turn in your (commented) computer program. Make sure that your computer program computes the statistics of interest. Run your computer program 20 times and use the output from the 20 runs of the simulation to construct estimates and confidence intervals for the statistics of interest.