Project 2

advertisement
Project 2
Part 1
In this project we will consider the dynamics of queues, or waiting lines. We will suppose that
customers arrive in some random manner at a service facility, that upon arrival they are instructed
to wait in a queue until it is their turn to be served, and that once served they leave the system.
Beyond obvious applications to businesses with a focus on customer service, the ideas involved in
queuing theory extend to such varied situations as traffic flow and computer networking.
For this project you will be collecting your own data. Find a commercial queuing line with
a single server and develop values for waiting times. You will need to measure the time between
customer arrivals, and you should measure the time it takes for each customer to be served. For
Poisson distributions we have average arrival rate λ and average service rate µ.
For queuing line of your choice, you can pick for example the espresso bar in Blocker. If you
would like to observe Poisson processes for arrival you will need to pick a time when you do not
see any reason why the rate would change. Times like 11:30-12:30 are clearly bad, because the
lunch crowd picks up. You should watch your line at least an hour and record at least fifty arrivals.
Include brief discussion of the time and place you chose in you report.
Write MATLAB code that draws a random variable from your empirical distribution and use
it to simulate the queue for long time. Our goal is to find P n = P r(X(t) = n) when t → ∞. Here
X(t) is the number of waiting customers. Clearly P n is a critical measure of the system. If for
instance P10 = 0.5 we know that the probability of finding ten people in the system is fifty percent.
1) Write a code that will simulate the queue with your empirical data. Furthermore, compute
the fraction of the time, Ti when there were i customers were in the system, where i = 1, 2, ..., n,
n is the maximum number of the customers in the system and will depend on your data. Plot i
versus T . You will simulate the process to some long time. I will discuss this in the class.
2) Use Poisson data for your code assuming the rate of arrivals is constant and given by a)
λ = 1 and the rate of service µ = 1. b) λ = 0.1 and the rate of service µ = 1. c) λ = 1 and the rate
of service µ = 0.1. In all cases plot i versus T . You will simulate the process to some long time. I
will discuss this in the class.
1
Download