You are on page 1of 48

QUEUING THEORY

WAITING LINE THEORY

A common situation occurring in everyday life is that of the queuing or waiting in line. Queues (waiting lines) are usually seen at bus stops, ticket booths, clinics, bank counters, traffic lights and so on. Queues are also seen at
workshops where machines wait to be repaired; at a tool crib where the mechanics wait to receive the tools; in a warehouse where items wait to get used; at airports where planes wait to take off or land etc.

In general, a queue is formed at a queuing system when the customers (human beings or physical entities) requiring service wait because the number of customer exceed the number of service facilities, or service facilities do not work efficiently and take more time than prescribed to serve a customer.

Queuing theory can be applied to a number of operational situations where it is not possible to predict accurately the arrival rate (or time) of customers and service rate (or time) of service facility or facilities. In particular, it can be used to determine the level of service (either the service rate or the number of service facilities) that balances the following two conflicting costs:

The cost of offering the service The cost incurred due to delay in offering service The first cost is associated with the service facilities and their operation, and the second represents the cost of customers waiting time.

Obviously, an increase in the existing service facilities would reduce the customers waiting time. Conversely, decreasing the level of service should result in long queues. This means an increase (or decrease) in the level of service increases (or decreases) the cost of operating service facilities, but decreases (or increases) the cost of waiting.
(The figure)

The optimum service level is the one that minimizes the sum of the two costs.

Since the cost of waiting is difficult to estimate, it is usually measured in terms of loss of sales or goodwill when the customer is a human being who has no sympathy with the services. But, if the customer is a machine waiting to repair, the cost of waiting is measured in terms of the cost of lost production.

Many practical situations in which study of queuing theory can provide solution to waiting line problems are:
Situation
Petrol pumps

Customers
Automobiles

Service Facilities
Pumps/Personnel

Hospital
Airport

Patients
Aircraft

Doctors/Nurses/Beds
Runways

Post Office
Job Interview

Letters
Applications

Sorting system
Interviewers

The Structure of a Queuing System Calling population (or input source) Queuing process Queue discipline Service process ( or mechanism)

Arrival rate : /unit of time

Service rate : /unit of time

Customers are defined as those in need of service. Customers requiring service are generated at different times by a calling population, commonly known as input source. The manner in which customers arrive at the service facility individually or in batches, at scheduled or unscheduled time is called the arrival process. The customers entry into the queuing system depends upon the queue condition.

The service is provided by one or more service facilities. This may be person (bank teller, barber, etc.) or a space (airport runway, hospital bed, parking lot etc.). Customers from a queue are selected for service according to a certain rule known as queue discipline. The service facility may be without server (self-service), or include one or more servers operating either in a series (as a team) or in parallel (multiple service channels).

The rate (constant or random) at which service is rendered is known as the service process. After the service is rendered, the customer leaves the system. If the server is idle at the time of customers arrival, the customer is served immediately, otherwise the customer is asked to join a queue or waiting line, which may have single, multiple or even priority lines.

The order of service may be random, by appointment, first-cum-first served or some other order. The queue can also be considered to be either infinite or finite. Infinite finite
Queue length Calling population Queue length Calling population

We will not cover all the possible infinite waiting line models but will restrict our discussion to situations involving the firstcome-first-served queue discipline and the Poisson distribution of arrivals. We will deal initially with the single server case. Our objective will be to develop predictions for some important measures of performance for waiting lines, such as the mean length of the waiting line and the mean waiting time for an arriving unit.

Poisson Arrivals
The Poisson distribution function has been shown to represent arrival rate in a large number of real-world situations. It is a discrete function that provides the probability of a given number of arrivals in a unit of time. The Poisson distribution function is given by

The Poisson distribution function is given by f(x) = x e- / x! (1) Where f(x) = Poisson distribution function = The mean arrival rate x = The number arriving in one unit of time x! = x factorial

For instance, if = 4 per hour, then the probability of x=6 arrivals in 1 hour is
f(6) = 46 e-4 / 6! = 0.104

Poisson distribution is typically skewed towards the right. The distribution is simple in that its standard deviation is expressed solely in terms of the mean, = ()1/2

Evidence that the Poisson distribution does indeed represent arrival patterns in many applications is great. Many empirical studies have validated the Poisson arrival distribution in general industrial operations, traffic flow situations, and various service applications. Arrival distributions are sometimes given in terms of the time between arrivals, or the inter-arrival times. The distribution of the time between arrivals often follow the negative exponential distribution. However, if the number of arrivals in a given interval are Poisson distributed, then necessarily the times between arrivals have a negative exponential distribution, and vice versa.

Although we cannot say that all distributions of arrivals per unit of time are adequately described by the Poisson distribution, we can say that it is usually worth checking to see if it is true, for then a fairly simple analysis may be possible. It is possible that arrivals may follow the Poisson distribution when many factors affect arrival time because the Poisson distribution corresponds to completely random arrivals. This means that each arrival is independent of the other arrivals as well as of any condition affecting the waiting line.

Customer Behavior
Bulk arrival
Generally, it is assumed that the customers arrive into the system one by one. But, in reality, customers may arrive in groups. Such arrival is called bulk arrival.

Jockeying
If there is more than one queue, the customers from one queue will be tempted to join another queue because of its smaller size. This behavior of the customers is known as queue jockeying.

Balking
If the queue length appears very large to a customer he/she may not the queue. This property is known as balking of customers.

Reneging
Sometimes, a customer who is already in the queue may leave the queue in anticipation of longer waiting time. This kind of departure from the queue without receiving the service is known as reneging.

We assume that the mean service rate is greater than the mean arrival rate; otherwise, the system would be unstable and the waiting line would become infinitely large.
(/) < 1

We also assume the single server case, the first-come-first-served queue discipline, and arrivals waiting for service; that is, arrivals neither fail to join the line (balk) nor leave because the line is too long (renege).

Variables used in the Queuing Model


n : C : Pn(t) : Pn : Number of customers in the system Number of servers in the system Probability of having n customers in the system at time t Steady-state probability of having n customers in the system P0 : Probability of having 0 (zero) customers in the system. Pn>k : The probability that the number of customers in the system is greater than k Lq : Average (expected) number of customers waiting in the queue (queue length). Ls : Average (expected) number of customers waiting in the system (in the queue and in the service station)

Variables used in the Queuing Model


Wq : Ws : : : : eff : M : N : GD: Average (expected) waiting time in the queue. Average (expected) waiting time of customers in the system (in the queue and in the service station). Arrival rate of customers Service rate the server Utilization factor of the server Effective arrival rate of customers. Poisson distribution Maximum number of customers permitted in the system. General discipline for service. This may be serve(FIFS), last-in-first-serve (LIFS), random order (RO) etc.

The input values to the queuing model are:


C

The output values to the queuing model are:


Ls Lq Ws Wq

The intermediate vales are:


P0 P1 Pn etc.

Kendall Notation
This basic queuing models can be classified into six categories using Kendall notation which in turn uses six parameters to define a model such as:

(P/Q/R):(X/Y/Z)
Where,
P Q R X Y Z indicates indicates indicates indicates indicates indicates arrival rate distribution service rate distribution number of servers service discipline Maximum number of customers permitted in the system Size of the calling population

(M/M/1):(GD//)
Poisson arrival rate (or Exponential inter-arrival time) Poisson service rate (or Exponential inter-arrival time) Single server General discipline Infinite number of customers permitted in the system Size of the calling population is infinite

= Average number of arrivals per unit of time = Demand for service

= Average number serviced per unit of time

= Capacity for service


1/ 1/ = Inter-arrival time = Average service completion time

= (/) , the condition is ( < 1)


= Traffic intensity = Utility ratio = Probability that at least one customer in the system = Pw = Probability that the system is busy

(1- )

= Idle time

P0 P1 P2

= (1 - ) = Probability that the system is empty = P0 = Probability that there is 1 unit in the system = P0 2 = Probability that there is 2 units in the system = P0 n = Probability that there is n units in the system

Pn

P(n>k) = k+1 = Probability that there are more than k units in the system
P(n>k) = k = Probability that there are more than k units in the queue
P0 = P1

(1-P0-P1)

= k = Probability that the queue is non-empty

Pw

= = Probability that an arriving customer has to wait

n=

Ls =

nPn
n=1

= /(1- ) = /(-)

= Average number of units in the system


n=

Lq =

(n-s)Pn
n=s

= 2/(1- )

= Average number of units in the queue L = Expected length of a non-empty queue = /(-)

Ws
=

Ls/
=

(Wq+(1/))

1/( - )

Wq
=

Lq/
=

(Ws-(1/))

/( - ) = /( - )

Problem 1
A TV Repairman finds that the time spent on his jobs have an exponential distribution with mean of 30 minutes. If he repairs sets in the order in which they come in, and if the arrival of sets is approximately Poisson with an average rate of 10 per 8 hour day, what is repairmans expected idle time each day? How many jobs are ahead of the average set just brought in?

Solution 1
This problem is Poisson arrival/Negative exponential service / single channel /infinite capacity/FIFO type problem. Data: = 10 sets per 8 hour day = 10/8 = 5/4 sets per hour. Given 1/ = 30 minutes, hence = (1/30) 60 = 2 sets per hour. Hence, Utility ratio = = (/) = (5/4)/2 = = 5/8 = 0.625. This means out of 8 hours 5 hours the system is busy i.e. repairman is busy. Probability that there is no queue = The system is idle = (1 ) = 1 - (5/8) = 3/8 . That is out of 8 hours the repairman will be idle for 3 hours. Number of sets ahead of the set just entered = Average number of sets in system = /( ) = /(1 ) = 0.625/(1- 0.625) = 5/3 ahead of jobs just came in.

Problem 2
The arrivals at a telephone booth are considered to be following Poisson law of distribution with an average time of 10 minutes between one arrival and the next. Length of the phone call is assumed to be distributed exponentially with a mean of 3 minutes.
a) What is the probability that a person arriving at the booth will have to wait? b) What is the average length of queue that forms from time to time? c) The telephone department will install a second booth when convinced that an arrival would expect to wait at least 3 minutes for the phone. By how much must the flow of arrivals be increased in order to justify a second booth?

Solution 2
Data: Time interval between two arrivals = 10 min. = 1/ Length of phone call = 3 min. = 1/ Hence = 1/10 = 0.1 per min; = 1/3 = 0.33 per min. ; = / = 0.10 / 0.33 = 0.3 a) Any person who is coming to booth has to wait when there is somebody in the queue. That means 30% of the time the fresh arrival has to wait. That means that 70 % of the time the system is idle.

Solution 2
b) Average length of non- empty queue from time to time = L = /( ) = .33 /(.33 - 0.1) = 1.43 person c) The installation of the second booth is justified only if the arrival rate is more than the waiting time. Let be the increased arrival rate. d) The expected waiting time in the queue will be
Wq = /(- ) 3 = /(.33- ) = 0.25

Hence the increase in the arrival rate is 0.25-0.10 = 0.15 arrival per minutes

Problem 3
In a departmental store one cashier is there to serve the customers. And the customers pick up their needs by themselves. The arrival rate is 9 customers for every 5 minutes and the cashier can serve 10 customers in 5 minutes. Assuming Poisson arrival rate and exponential distribution for service rate, find: a) Average number of customers in the system. b) Average number of customers in the queue or average queue length. c) Average time a customer spends in the system. d) Average time a customer waits before being served.

Solution 3
Data: Arrival rate is = (9 / 5) = 1.8 customers per minute. Service rate = = (10 / 5) = 2 customers per minute. Hence = ( /) = (1.8 / 2 ) = 0.9 a) Average number of customers in the system = Ls = / (1 ) = 0.9 / (1 . 0.9) = 0.9 / 0.1 = 9 customers. b) Average number of customers in the queue = Lq = 2 /(1 ) = 0.81/(1-0.9) = 8.1 customers. c) Average time a customer spends in the system = Ws = 1/(1 ) =1/( ) = 1 / (2 - 1.8) = 5 minutes. d) Average time a customer spends in the queue = Wq = /(1 ) = 0.9/2(1-0.9) = 0.9/0.2 = 4.5 minutes.

Problem 4
A branch of a Nationalized bank has only one typist. Since typing work varies in length (number of pages to be typed), the typing rate is randomly distributed approximating a Poisson distribution with a mean service rate of 8 letters per hour. The letter arrives at a rate of 5 per hour during the entire 8-hour workday. If the typist is valued at Rs. 150 per hour, determine:
a) b) c) d) Equipment utilization, The percent time an arriving letter has to wait, Average system time, and Average idle time cost of the typewriter per day.

Solution 4
Data Arrival rate = = 5; Service rate = 8 per hour. Hence = ( /) = 5 / 8 = 0.625 a) Equipment utilization = Utility ratio = = 0.625, i.e. 62.5% of 8-hour day the equipment is engaged.

b) Percent time that an arriving letter has to wait = As the machine is busy
for 62.5 % of the day, the arriving letter has to wait for 62.5 % of the time. c) Average system time = Expected (average) a customer spends in the

system = 1/( ) = [1/(8 - 5)] = 1/3 hour= 20 minutes.


d) Average idle time cost of the typewriter per day = 8 hours idle time idle time cost = 8 (1 0.625) Rs. 150 = Rs. 450

Problem 5
A product manufacturing plant at a city distributes its products by trucks, loaded at the factory warehouse. It has its own fleet of trucks plus trucks of a private transport company. This transport company has complained that sometimes its trucks have to wait in line and thus the company loses money paid for a truck and driver of waiting truck. The company has asked the plant manager either to go in for a second warehouse or discount prices equivalent to the waiting time. The data available is:
Average arrival rate of all trucks = 3 per hour. Average service rate is = 4 per hour.

The transport company has provided 40% of the total number of trucks. Assuming that these rates are random according to Poisson distribution, determine:

a) The probability that a truck has to wait? b) The waiting time of a truck that has to wait c) The expected waiting time of company trucks per day.

Solution 5
Data: = 3 trucks per hour, = 4 trucks per hour. Hence = utilization factor = (/) = 3/4 = 0.75 a) This means that the system is utilized 75% of the time. Hence 75% the time the truck has to wait. b) The waiting time of truck that waits = Ws = 1/( ) = 1 / (4 - 3) = 1 hour c) Total expected waiting time of company trucks per day = (Trucks /day) (% company trucks) Expected waiting time/truck = = (3 8) (0.40) Ws where, Ws = [/( )] = 24 0.40 [0.75/(4-3)] = 24 0.40 0.75 = 7.2 hours per day.

Problem 6
In a large maintenance department fitters draw parts from the parts stores, which is at present staffed by one storekeeper. The maintenance foreman is concerned about the time spent by fitters in getting parts and wants to know if the employment of a stores helper would be worthwhile. On investigation it is found that: a) A simple queue situation exists b) Fitters cost Rs. 75 per hour c) The storekeeper costs Rs. 150 per hour and can deal on an average with 10 fitters per hour. d) A labour can be employed at Rs. 50 per hour and would increase the capacity of the stores to 12 per hour. e) On an average 8 fitters visit the stores each hour.

Solution 6
Data: = 8 fitters per hour, = 10 per hour. Number of fitters in the system = Ls = /( ) = /(1 ) = 8 / (10 - 8) = 4 fitters. Cost per hour = 4 x Rs.75 = Rs.300 With the addition of a stores labour = 8 per hour, = 12 per hour Number of fitters in the system = Ls = /( ) = 8 / (12 - 8) = 2 fitters. Cost per hour = Cost of fitter per hour + cost of labour per hour = 2 Rs.75 + Rs. 50 = Rs. 200 Since there a net savings of Rs.100 per hour, it is recommended to employ the labourer.

You might also like