Queueing Theory
Queueing Theory
1
Operations research waiting lines (queuing theory)
8. Service rate: It is the average number of customers served per unit time and is
denoted by ‘ ’.
9. Mean service time: It is the average time taken by the server to serve a customer
2
Operations research waiting lines (queuing theory)
The queuing system is in either a transient state or steady state. When a system is
started, it progresses through a series of changes. Eventually, it attains stability. In the
starting position the system is greatly influenced by the starting condition and by the
amount of elapsed time. This period of rapid transition termed as transient state. After
sufficient time has passed, the system becomes essentially independent of the starting
condition and elapsed time. This stable condition is termed as a steady state.
Elements of queuing system:
Basic elements of a queuing system are
1. Input process:
Customers arrive at a service counter for service. Two important characteristics of the
input process are its size and pattern of arrival. The size represents the number of
customers that arrive from time to time for service and pattern of arrival suggests the
distribution of the arrivals.
The size of the input process is generally assumed to be infinite as this assumption
facilities analysis. The arrival may either be at a constant rate or random in
accordance with some probability distribution. Where the arrivals are completely
random, they follow Poisson distribution with mean arrival rate equal to the average
number of arrivals per unit of time.
The following information is required to study the input process.
i) arrival distribution
ii) inter-arrival distribution
iii) Mean arrival rate. This is generally represented by a Greek letter ‘ ’
(Lambda).
2. waiting line: The following information is required to study the waiting line
a) Waiting time: Waiting time implies that a customer spends in the queue before
being taken up for service. It equals the time that elapses between the arrival of
the customer and the commencement of the service to that customer.
b) Service time: Service time implies the time spent by the service facility to render
service to a customer. It may be either constant or variable.
3
Operations research waiting lines (queuing theory)
c) Waiting time in the system: Waiting time in the system implies the time spent by
the customer in the queue system. It equals waiting time plus service time.
d) Queue length: Queue length implies the number of customers waiting in the
queue.
e) System length: System length implies the number of customers in the queue plus
those being serviced.
3. Service discipline: Service discipline is also called queue discipline, represents
the rule by which the next customer in the waiting line is selected for service.
i) First in first out (FIFO) or first come first serve (FCFS):
It is the discipline in which the customers are served in the chronological order of
the arrivals.
E.g.: Tickets at a cinema hall, sales at a grocery shop, trains on a single line
platform etc.
ii) Last in first out (LIFO) or last come first served(LCFS):
If the service is made in opposite order of arrivals of customers, i.e. whoever
comes last is served first and first obviously goes last; it is called LIFO or
LCFS.
E.g.: Stack of plates, loading and un-loading a truck or go-down, office filing of
papers in chronological orders, wearing socks and shoes, dressing a shirt and
coat over it, packing systems etc.
iii) Service in random order (SIRO):
By this rule, the customer for service is picked up at random, irrespective of
their arrivals.
E.g.: A telephone urgent call given to a customer charged at higher price, a
separate counter for cheques at a electricity bill payment counter, priority given
at (APSRTC) reservation counter who buys a CAT (Concessional annual ticket)
card etc.
4
Operations research waiting lines (queuing theory)
5
Operations research waiting lines (queuing theory)
iii) A customer may join the queue wait up to certain time and then leave the
queue system without getting service. This action of the customer is called
reneging.
iv) A customer may keep on switching from one queue to another. This happens
when there are more than one service counter. This tendency so observed is called
Jockeying:
5. Service facility:
Service facility represents servers, which render service. To analyze a service
facility, both number of servers and arrangement of servers need to considered.
The service facility can be arranged in any one of the following types:
a) single queue: single server
Under this arrangement there is one queue and one server in the service facility.
6
Operations research waiting lines (queuing theory)
7
Operations research waiting lines (queuing theory)
6. System output:
System out put refers to the rate at which customers are rendered service (i.e. rate
at which customers leave the queue system after service). System output is
dictated by the service time required by the facility to render service and
arrangement of service facility.
The Traffic Intensity:
The traffic intensity is the ratio of the average arrival rate to the average service rate.
That is
Traffic intensity signifies the likelihood and the extent of queuing. For example,
traffic intensity ( ) of
i) Less than unity ( <1) implies that customer will be serviced faster than
their average arrival rate.
ii) Equal to unity ( =1) implies that customers will be arriving as fast as
they can be serviced and
iii) Greater than unity ( >1) implies that customers will be arriving faster
than they can be serviced and as such the queue will go on building up.
8
Operations research waiting lines (queuing theory)
D.G. Kendall in 1953 has noticed three of them in the form (a / b / c) and later A.M. Lee
in 1966 added two more in the form (d / e) to describe a queue model. These are known
as Kendall-Lee notations in the standard format as (a / b / c): (d / e).
L s= = --------------------------- (1)
Since for
9
Operations research waiting lines (queuing theory)
Lq= = =
(L: L>0) =
4. Mean waiting time that a customer spends in the system (waiting time + service
time):
Ws=
Wq=
7. The probability that the number of customers in the queue being served is
greater than k is:
P(n>k)=
10
Operations research waiting lines (queuing theory)
11. To find probability of arrivals during the service time of any given customer:
= 1-
Problems on model- I
1. Customers arrive at a booking office window, being manned by a single individual at
a rate of 25 per hour. Time required to serve a customer has exponential distribution
with a mean of 120 seconds. Find the mean waiting time of a customer in the queue.
Solution:
We have = 25 customers per hour
Customers / hour
And
11
Operations research waiting lines (queuing theory)
Hours or 10 minutes
2. A repair shop attended by a single machine has an average of four customers an hour
who bring small appliances for repair. The mechanic inspects them for defects and
quite often can fix them right away or otherwise render a diagnosis. This takes him
six minutes on the average. Arrivals are Poisson and service time has the exponential
distribution. You are required to
a) Find the proportion of time during which the shop is empty
b) Find the probability of finding at least 1 customer in the shop
c) What is the average (mean) number of customers in the system?
d) Find the average (mean) time spent, including service.
Solution:
=4 customers per hour
minutes.
3. The belt snapping for conveyors in an open cast mine occur at the rate of 2 per shift.
There is only one hot plate available for vulcanizing; and it can vulcanize on an
average 5 belts snap per shift.
a) What is the probability that when a belt snaps, the hot plate is readily available?
b) What is the average number of belts in the system?
c) What is the waiting time of arrival?
12
Operations research waiting lines (queuing theory)
P0=
L s=
Shift.
W s= shift
13
Operations research waiting lines (queuing theory)
and
a) probability that a machinist arriving at the tool crib will have to wait (i.e. fraction
of time the server is busy) is given by 1-P0=1-
b) Ls= machinists
c) The installation of second tool crib will be justified if the customer (machinist) has
to wait at least six minutes before being served.
Since Wq= 6, =0.33 and = (say) for second tool crib, therefore
This yields =0.21. Hence the arrival rate should become 0.21 machinists per minute to
justify the second booth.
5. Customers arrive at a one-window drive-in bank according to a Poisson distribution
with mean 10 per hour. Service time per customer is exponential with mean 5
minutes. 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?
Solution:
= 10 per hour, = 60 /5 = 12 per hour
a) The probability that an arriving customer can drive directly to the space in front of
the window:
= P0+P1+P2
14
Operations research waiting lines (queuing theory)
b) the probability that an arriving customer has to wait out side the indicated space =
probability that there are at least 3 customers in the space in the front of the
window
=1-(P0+P1+P2) =1-0.42-P3
=0.58-
Hours
Ls= machines
15
Operations research waiting lines (queuing theory)
= 18
For Mr. Y: average number of machines in the system:
Ls= machine
7. In a railway marshalling yard, goods trains arrive at a rate of 30 trains per day.
Assuming that the inter-arrival time follows an exponential distribution and the
service-time (the time taken to hump a train) distribution is also exponential with an
average of 36 minutes. Calculate the following:
a) The mean line length
b) The probability that the queue size exceeds 10.
If the input of trains increases to an average of 33 per day, then what will be the
change in (a) and (b)?
Solution:
Trains / minute
16
Operations research waiting lines (queuing theory)
and
Then
Consequently, we obtain
a) Ls= or 5 trains
8. An air line has one reservation clerk on duty at a time. He handles information about
flight schedules and makes reservations. All calls to the airline are answered by an
operator. If a caller requests information or reservation, the, operator transfers the all
the reservation clerk. If the clerk is busy, then operator asks the caller to wait. When
the clerk becomes free the operator transfers to him the call of the person who has
been waiting for the longest duration. Assume that arrivals and services follow
Poisson and exponential distributions respectively. Calls arrive at the rate of 10 per
hour and the reservation clerk can a call in four minutes on the average.
a) What is the average number of calls waiting to be connected to the reservation
clerk?
b) What is the average time a caller must wait before reaching the reservation
clerk?
c) What is the average time for a caller to complete a call (i.e. waiting time plus
service time)?
Solution:
Per minute
Per minute
17
Operations research waiting lines (queuing theory)
and
9. On an average 96 patients per 24 hour day require the service of an emergency clinic.
Also on average, a patient requires 10 minutes of active attention. Assume that the
facility can handle only one emergency at a time. Suppose that it costs the clinic
Rs.100 per patient treated to obtain an average servicing time of 10 minutes, and that
each minute of decrease in this average time would cost Rs.10 per patient treated.
How much would have to be budgeted by the clinic to decrease the average size of
the queue from 11/3 patient to ½ patient.
Solution:
18
Operations research waiting lines (queuing theory)
minute.
Hence the average rate of treatment required is minutes.
Consequently, the decrease in the average rate of treatment = 10-15/2=5/2 minutes
And the budget per patient 100+ so in order to set the required size of the
queue, the budget should be increased from Rs.100 to Rs.125 per patient.
10. In a large computer industry, the average rate of a system break down is 10
systems per hour. The idle time cost of a system is estimated to be Rs.20 per hour.
The working hours per day are 8. The manager of industry considers two mechanics
for repairing. The first mechanic A takes about 5 minutes on an average to repair a
system and demands wages Rs.10 an hour. The second mechanic B takes 4 minutes
in repairing and charges at rate of Rs.15 an hour. Assuming rate of system
breakdown is Poisson distributed and repair rate exponentially distributed, which of
the two mechanics should be appointed.
Solution:
For mechanic A:
TC= 10 8+
For mechanic B:
TC= 15 8+
19
Operations research waiting lines (queuing theory)
Mechanic B has the lowest total cost and also repair three systems more than Mechanic A
i.e for 8 hours, 24 systems (8 3=24). Thus mechanic B can save (24 20) =Rs.480 per
day. So that total cost of Mechanic A becomes =Rs.880+Rs.480=Rs1360.
So, mechanic B has to be appointed.
11. In the production shop of a company the breakdown of the machines is found to be
Poisson with an average of Rs.3 machines/hour. Breakdown time at one machine
costs Rs.40 per hour to the company. There are two choices before the company for
hiring the repairman. One of the repairman is slow but cheap, the other fast but
expensive. The slow-cheap repairman demands Rs.20 per hour and will repair the
broken down machines exponentially at the rate of 4 per hour. The fast expensive
repairman demands Rs.30 per hour and will repair machines exponentially at an
average rate of 6 / hour, which repair man should be hired?
Model II:
This is similar to model I with a difference only in queue discipline. Since the derivation
of Pn is independent of nay specific queue discipline, there fore in this model also we
have,
Pn=
Consequently other results will also remain unchanged in this queuing system as long as
Pn remains unchanged.
Model III:
This model is different from model I, in respect to the capacity of the system. Here the
capacity of the system is limited to N customers only and therefore different equations
derived in model I will be same for this model as long as n<N.
The system of steady state different equations for this model is
; n=0
; 1
and ; n=N
Using the usual procedure, the first two different equations become
20
Operations research waiting lines (queuing theory)
; n
and PN= ; n
Now in order to find the value of P0, use the fact that
1=
= =P0
Thus P0 =
And consequently Pn =
Here the steady-state solution exists even for this is due to the limited capacity of
the system regardless of the traffic intensity.
L s=
21
Operations research waiting lines (queuing theory)
Solution:
Therefore
=0.26 or 2 trains
2. If for a period of 2 hours in a day, trains arrive at the yard every 20 minutes but the
service time continues to remain 36 minutes, and then calculate for this period.
22
Operations research waiting lines (queuing theory)
Pn= ;
23
Operations research waiting lines (queuing theory)
Thus P0=
Characteristics of model IV
1. Mean number of customers in the queue (mean queue length):
Lq=
Then Lq=P0
2. Mean number of customers in the system:
Ls= Lq+
Wq=
24
Operations research waiting lines (queuing theory)
Ws= Wq+
1-
P (n
Problems:
1. A super market has two girls at the sales counters. If the service for each customer is
exponential with mean 4 minutes, and if people arrive in a Poisson fashion at the
counter at the rate of 10 per hour, then calculate
a) the probability of having to wait for service
b) the expected percentage of idle time for each girl
c) If a customer has to wait, find the expected length of his waiting time.
Solution:
Per hour or per minute
Traffic intensity
Where P0=
= =
prob. (n
25
Operations research waiting lines (queuing theory)
b) the fraction of the time servers remain busy, i.e. traffic intensity
Thus expected percentage of idle time for each girl is given by
(1-
c) Expected waiting time in the system :( W: w>0)
= minutes
2. A company currently has two tool cribs, each having s single clerk in its
manufacturing area. One tool crib handles only the tools for the heavy machinery,
while the second one handles all other tools. It is observed that for each tool crib the
arrivals follow Poisson distribution with a mean of 20 per hour and the service time
distribution is negative exponential with a mean of 2 minutes.
The tool manager feels that, if tool cribs are combined in such a way that either
clerk can handle any kind of tools as demand arises, would be more efficient and the
waiting time could be reduced to some extent. It is believed that the mean arrival rate
at the two tool crib will be 40 per hour; while the service time will remain unchanged.
Compare the status of queue and the proposal with respect to the total expected
number of machines at the tool crib(s), the expected waiting time including service
time for each mechanic and the probability that he has to wait for more than five
minutes.
Solution:
a) when tool crib works independently:
Per minute
Traffic intensity
i. average number of arrivals waiting in each tool crib:
Ls=
26
Operations research waiting lines (queuing theory)
Traffic intensity
i) P0=
= =
ii) Ls=Lq+
=2.4
iii) Ws=3.6 minutes
3. A telephone exchange has two long distance operators. It is observed that, during the
peak load, long distance calls arrive in a Poisson fashion at an average rate of 15 per
hour. The length of service on these calls is approximately exponentially distributed
with mean length 5 minutes.
a) What is the probability that a subscriber will have to wait for his long
distance call during the peak hours of the day?
b) If the subscribers will wait and are serviced in turn, what is the expected
waiting time?
Solution:
a) p(n =
Where P0=
27
Operations research waiting lines (queuing theory)
p(n =
=0.48
b) Wq=
Lq
Lq=0.8
4. A bank has two tellers working on savings accounts. The first teller handles
withdrawals only. The second teller handles deposits only. It has been found that the
service time distributions for both deposits and withdrawals are exponential with
mean service time 3 minutes per customer. Depositors are found to arrive in a Poisson
fashion throughout the day with mean arrival rate of 16 per hour. Withdrawers also
arrive in a Poisson fashion with mean arrival rate of 14 per hour. What would be the
effect on the average waiting time for depositors and withdrawers if each teller
handles both withdrawals and deposits?
Solution:
28
Operations research waiting lines (queuing theory)
hours or 12 minutes
Hours or 7 minutes.
If both tellers do service for withdrawers and depositors, then per hour and
S=2,
Thus P0=
And Wq=
= hours
5. A tax consulting firm has four service stations (counters) in its office to receive
people who have problems and complaints abut their income, wealth and sales taxes.
Arrivals average 80 persons in an 8 hour service day. Each tax adviser spends an
irregular amount of time servicing the arrivals which have been found to have an
exponential distribution. The average service time is 20 minutes. Calculate the
average number of customers in the system, average number of customers waiting to
be serviced, average time a customer spends in the system, and average waiting time
for a customer. Calculate how many hours each week does a tax adviser spend
29
Operations research waiting lines (queuing theory)
performing his job. What is the probability that a customer has to wait before he gets
service? What is the expected number of idle tax advisers at any specified time?
Solution:
P0=
L s=
Ws=Wq+ hours
hours
30
Operations research waiting lines (queuing theory)
viii) the expected number of idle advisers at any specified time can be obtained as
follows:
as the probability of no customers in the system is P 0, i.e., all the 4 counselors are
idle, therefore it is required to determine P 1, P2 and P3, i.e., the probability that 3
counselors are idle, 2 counselors are idle and 1 counselor is idle.
Now Pn=
Then P1=
P2=
P3=
Total cost = Cw + Cf
31
Operations research waiting lines (queuing theory)
32