You are on page 1of 16

# Queing Theory A flow forms a queue from finite/infinite population towards the service facility forms a queue on account

of lack of capability to serve them all at a time. In the absence of a perfect balance between the service facilities and the consumers, waiting time is required either for the service facilities or for the consumers arrival. The arriving unit that requires some service to be performed is called customer. The customer may be persons, machines, vehicles, etc. queue stands for the number of customers waiting to be serviced. This does not include the customer being serviced. The process or system that performs services to the customer is termed by service channel or service facility. Queing System Queuing System can be completely described by The Input (arrival pattern) The service mechanism (service pattern) The queue discipline Customers Behaviour The Input (Arriaval Pattern)

The input describes the way in which the customers arrive and join the system. Generally, customers arrive in a more or less random fashion which is not worth making the prediction. Thus the arrival pattern can be described in terms of probabilities, and consequently the probability distribution for inter arrival times must be defined. The mean arrival rate is denoted by . The service Mechanism: This means the arrangement of service facility to serve customers. If there is infinite number of servers then all the customers are served instantaneously on arrival, and there will be no queue. If the number of servers is finite then the customers are served according to a specific order with service time constant or random variable. Distribution of service, which is important in practice, is the negative exponential distribution. The mean service rate is denoted by . The queue discipline: It is a rule according to which the customers are selected for service when a queue has been formed. The most common disciplines are First Come First Served(FCFS)

Last In first Out(LIFO) Service In Random order(SIRO) Service on priority basis. There are various other disciplines. Under priority discipline, the service is of two types, namely preemptive and non-pre-emptive. In pre-emptive system, the high priority customers are given service over the low priority customers; in non-pre-emptive, a customer of low priority is serviced before a customer of high priority is entertained for service. Customer Behavior The customer generally behaves in the following four ways: Balking: A customer who leaves the queue because the queue is too long and he has no time to wait or has no sufficient waiting space. Reneging: This occurs when a waiting customer leaves the queue due to impatience. Priorities: In certain applications some customers are served before others regardless of their arrival. These customers are served before others regardless of their arrival. These customers have priority over others.

Jockeying Customers may jockey from one waiting line to another. This is most common in a supermarket. Traffic Intensity (or Utilization factor) An important measure of a simple queue is its traffic intensity and it is given by Traffic Intensity () = Mean arrival rate/ Mean service Rate = / Unit of traffic Intensity is Erlang. Kendalls Notation of queuing system Generally, queuing model may be completely specified in the following symbol from (a/b/c);(d/e) Where a = probability law for the arrival (inter arrival ) time. b = probability law according to which the customers are being served. c = number of channels ( or service stations) d = capacity of trhe system, i.e., the maximum number allowed in the system ( in service and waiting) e = queue discipline

(M/M/1: /FCFS) Model Measures Of Model 1. Traffic Intensity = / 2. Expected(average) number of units in the system Ls= /(-) 3. Expected(average) number of units in the queue Lq = 2/( (-)) 4. Expected waiting line in the system Ws = 1/(-) 5. Expected waiting time in the queue Wq = / (-) 6. Expected waiting of the customer who has to wait (w/w>0) (w/w>0) = 1/(-) 7. Probability of queue size >= n is n 8. Probability (waiting time in the system >= t) = (-) e( - )w dw t 9. Average queue length of non-empty queue (L/L>0) =

Example 1: If in a particular single-server system, the arrival rate, = 5 per hour and service rate, = 8 per hour. Assume the condition for use of the single channel queuing model, find out: (a) The probability that the server is idle. (b) The probability that there are at least two customers in the system. (c) Expected time that a customer is in the queue. Solution: (a) P (the server is idle) = / (1- /) = 5/8 * 3/8 = 15/64 (b) P (at least two customers in the system) = P (n 2) = (/) 2+1 = (5/8) 3 (c) Expected time that a customer is in the queue: Wq = / ( - ) = 5/8 (8-5) = 5/24 hr. or 12 min.

Example 2: Customer arrives at the First Class Ticket counter of a Theatre at a rate of 12 per hour. There is one clerk serving the customer at a rate of 30 per hour. Assuming the conditions for use of the single-channel queuing model, evaluate: (a) The probability that there is no customer at the counter. (b) The probability that there are more than 20 customers at the counter. (c) The probability that there is no customer waiting to be served. (d) The probability that a customer is being served and nobody is waiting. Solution: Here, in usual notations, we are given: Arrival rate, = 12 per hr. and service rate, = 30 per hr. Pn = Probability that there are n units in the system. = (1- /) (/)n = (1-12/30) (12/30) n = 0.6(0.4) n for n = 0, 1, 2,3. (a) P (no customer at the counter) = Po = 1-0.4 = 0.6 (b) P (more than 2 customers at the counter)

= 1 P (at most 2 customers at the counter) = 1 (Po + P1 + P2) = 1 {0.6 + (0.6)(0.4) + (0.6) (0.4)2} = 1 (0.6 + 0.24 + 0.096) = 0.064. (c) P (no customer is waiting) = P (at most one customer at the counter) = Po + P1 = 0.6 + 0.6 * 0.4 = 0.84 (d) P (a customer being served and no body is waiting) = P1 = (0.6 * 0.4) = 0.24. Example 3: A bank has one drive-in counter. It is estimated that cars arrive according to Poisson distribution at a rate of 2 every 5 min. and that there is enough space to accommodate a line of 10 cars. Other arriving cars can wait outside this space, if necessary. It takes 1.5 min. on an average to serve a customer, but the service time actually varies according to an exponential distribution. You are required to find: (a) The probability of time, the facility remains idle.

(b) The expected no. Of customers waiting but currently not being served at a particular point of time. (c) The expected time a customer spends in the system (d) The probability that the waiting line will exceed the capacity of the space leading to the drive-in counter. Solution: From the given information, we find that: Mean arrival rate, = 2 * 60 / 5 or 24 per hour. Mean service rate, = 60 / 1.5 or 40 per hour.

(a) The proportion of time, the facility remains idle: P0 = 1 - / = 1 24 /40 = 0.4, 40% of time facility remains idle. (b) The expected number of customer in the waiting line: Lq = 2 / ( - ) = 24 * 24 / 40 (40 24) = 576 / 640 = 0.9. (c) The expected time a customer spends in the system: Ws = I / - = 1 / 40 24 = 1/ 16 hours or 3.75 min. (d) Waiting time will exceeds the capacity of the space if 11 or more cars are there because the space can accommodate only 10 cars. Hence the required probability can be worked out as under: P (n 11) = (/) 11 = (24 / 40) 11 = 0.0036. Example 4: A child care shop dealing with childrens requirements has one cashier who handles

customers payments. The cashier takes on an average 4 min per customer. Customers come to cashiers area in a random manner but on an average of 10 people per hour. The management received a large number of customer complaints and decided to investigate the following questions: (a) What is the average length of the waiting line to be expected under the existing conditions? (b) What portion of his time is the cashier expected to be idle? (c) What is the average length of time that a customer would be expected to wait to pay for his purchase? (d) If it was decided that no customer would not tolerate a wait of more than 12 min, what is the probability that a customer would have to wait at least that length of time? Solution: From the data of the problem, we have Mean rate of arrival, = 10 customers/hour Mean rate of service = 15 customers/hour (a) Average number of customers in the queue: Lq = 2 / ( - ) = 10 * 10 / 15 (15 10) = 4 / 3

(b) Probability that the cashier would be idle: P0 = 1 - / = 1 10 / 15 = 1/3, i.e. the cashier will be expected to be idle for 33.3% of his time. (c) Average length of time that a customer is expected to wait in the queue: Wq = / ( - ) = 10 / 15 (15 10) hr. or 8 min. (d) Probability that a customer has to wait at least 12 min. before he can make payment: P (waiting time 1/5 hr.) = / e (
- ) t

= 2/3 e (10 10) .1/5 = 2/3 e = 2/3 (0.368) = 0.245. Example 5: Customer arrives at a one-window drivein bank according to a Poisson distribution with mean 10 per hour. Service time per customer is exponential with mean 5 min. the space in front of the window, including that for the serviced car can accommodate a maximum of 3 cars. Other cars can wait outside this space.

(a) What is the probability that an arriving customer can drive directly to the space in front of the window? (b) What is the probability that an arriving customer will have to wait outside the indicated space? (c) How long is an arriving customer expected to wait before starting service? (d) How many spaces should be provided in front of the window so that all the arriving customers can wait in front of the window at least 20% of the time?

Solution: From the data of the problem, we have Mean arrival rate, Mean service rate, customer/hr. Utilization facto, = 10 customer/hr. = 1/5 * 60 = 12 = / = 10/12 or 5/6.

(a) The probability that an arriving customer can drive directly to the space in front of the window = P0 + P1 + P2 (1 - ) + (1 - ) + 2 (1 - ) (1 - ) (1 + + 2) = 1/6 (1 + 5/6 + 25/36) = 0.42 (b) The probability that an arriving customer has to wait outside the indicated space = Probability that there are at least 3 customers in front of the window. = 1 (P0 + P1 + P2 +P3) = 1 0.42 P3 = 0.58 {3 (1 - )} = 0.58 {(5/6)3. 1/6} = 0.58 0.10 = 0.48. (c) Expected waiting time of a customer in a queue:

Wq = / ( - ) = 10 / 12 (12 10) = 5/12 or 0.417 hrs. (d) P0 = 1 - C =1 5/6 = 0.16; P1 = / P0 = 5/6 (1/6) = 0.14 P0 + P1 = Probability that there will be no or one car in the space which cover 0.30, i.e. 30%. Hence there should be at least one car space for waiting at the window space at least 20% of the time. Example 6: A T.V. repairmen finds that the time spent on his jobs has an exponential distribution with mean 30 mins. If he repairs sets in the order in which they come in. if the arrival of sets is approximately Poisson with an average rate of 10 per 8-hour day, what is the repairmans expected idle time each day? How many jobs are ahead of the average set just brought in? Solution: Here = 1/30 & = 10/ (8 x 60) = 1/48 Expected No. of jobs are Ls= /(-) 1/48 1/30 1/48

5 jobs 3 Since the fraction of the time the repairman is busy equals to /, the no. of hrs. for which the repairman remains busy in 8-hr day = 8 x (/) = 8 x ( 30/48) = 5 hrs. Therefore, the time for which the repairman remains idle in an 8-hr day=(8 5)hrs=3 hrs.