Anda di halaman 1dari 13

Queueing Model: A Brief Introduction

Let us think about a queue (waiting line) most of us have seen, the line at Orins place
caf in Paccar hall. Let us consider the simplest case, one line in front of a single cashier.
For now, ignore the role of second cashier (occasionally open) and the barista. We will
discuss in class the wide applicability (not just cafes) of the insights we draw from this
model.
Inputs
Customers arrive at the caf and join the line. The time between any two customer
arrivals is variable and uncertain but we can say, for example, on average two customers
join the line every minute. The rate at which customers join the line is what we call
arrival rate (symbol lambda

). This is the same as workload arrival in chapter 1. In this

case, arrival rate lambda is 2 per minute. This also means that the average time
between two arrivals is minute; we call this interarrival time.
The time cashier takes to serve one customer is called service time. This too changes
from customer to customer and is, therefore, variable and uncertain. Let us say, on
average, service time for a customer is 15 seconds = minute. This also means that the
one cashier can serve customers at the rate of 1/(1/4) = 4 customers per minute; this is

what we call service rate (symbol mu ).


Since there is only one cashier, number of cashiers is 1. We use symbol m for this. In case
cafe opens another cashier and if a single line is used to feed both servers, we will say
number of servers m is 2. In case there are two different lines in front of two cashiers then
we will say that these are two different queues, each with m=1. For now, let us go with
our original scenario of single queue with single server.
To summarize, at least three inputs are needed to define a queue: arrival rate (lambda),
service rate (mu) and number of servers (m). Note that we are interested in expressing our
inputs in terms of rates (per minute, for example) and not in time (minutes, for example).
Depending on the situation, we may need other inputs describing the extent of variability
in arrivals and service. For this basic model, we assume certain type of variability
(Poisson distribution for number of arrivals and Exponential distribution for service
times) and not worry about it for now.
Outputs
First output we can get is the utilization of our resource, the cashier. We use the symbol

rho for the utilization. This is equal to the ratio of the rate at which work arrives and
the capacity of the station. The idea is exactly the same as utilization computation in
chapter 1.We know that the rate at which work arrives is arrival rate lambda

. One

cashier can service the work at the rate of service rate . If there are more than one
servers (that is, if number of servers m is more than 1) then total rate at which work can

be served, station capacity, will be m multiplied by . Therefore, utilization rho can be

calculated as lambda divided by (m multiplied by ).


. Make sure arrival rate
and service rate are expressed in same unit of time; for example, both should be per

minute or per hour. In the case of Orin caf,

2
0.5
1* 4

the times. For our calculations to work, utilization rho

. Our cashier is busy 50% of

must be less than 1.

Second output is number of customers waiting. We use the symbol Lq for this. Note that
this excludes the person who is actually getting serviced by the cashier. We have a simple
table to find this value. The table is attached. To look at the table we need two things:
/
first, (arrival rate/service rate, that is lambda/mu
) and second, number of servers m.
/
In Orin cafs case
is 2/4=0.5 and m is 1. You will find one row in the table that
corresponds to these two values. In this row, read the number in column titled Lq. You
will see that the number is 0.5. This means that, on an average, the number of people
waiting in line Lq is 0.5.
Only in the special case when there is only one server, m=1, we can also use a simple
formula to compute the number of customers waiting Lq. (The table works for all values
2
2
0.5
Lq
Lq
1
1 0.5
of m, including m=1). For m=1:
. For example, in this case
=0.5,
same as that we got from table.
Third output is the time an average customer waits in line to receive service. We use the
symbol Wq for this. We have a simple formula to convert number-of-customers-waiting
Lq into time-a-customer-waits Wq. To get Wq, divide Lq by arrival rate lambda
Wq

law) In Orin cafe, the time-a-customer-waits

Lq

0.5
0.25
2

(Littles

min = 15 seconds.

Sometimes we want to think about the whole system, that is, not just waiting but both
waiting and getting service. We would like to know the time-a-customer-spends-in-thesystem (we use symbol Ws for this) including both time for waiting and time for service.

Clearly, this is equal to time-a-customer-waits Wq plus service time. In Orin cafs case,
Ws is just equal to the sum of waiting time (15 sec.) and service time (15 sec.). Ws=30sec
= 0.5 min.
There is also the question of the number-of-customers-in-system (symbol Ls), including
both, customers who are waiting and who are getting service. Another application of
Littles law shows that to get number-of-customers-in-system symbol Ls, multiply timein-system Ws by arrival rate lambda

Ls Ws 2 * 0.5 1

. In Orin cafs case,

Finally, to compute the chance that system is idle, that is, there is no customer in the
system, we can read the column titled P0 from the table, just the way we read Lq. For Orin
caf, P0=0.5, that is 50% chance that cashier is free.
Other Performance Measures
For single-server case, some other performance measures can be computed as following:
Pn (1 ) n

Probability that there are n customers in system


e (1 )t
Probability that wait is greater than t =
e (1 )t

Probability that time-in-system is greater than t =


For more than one server, spreadsheets are available to compute these measures.
Determining Capacity

If we increase capacity (by increasing m or by increasing ), we expect that the cost of


providing that capacity will increase. We also expect, however, that the customers will
wait less and that the cost of customer waiting will decrease. This suggests that we should
look at the total cost = (cost of providing service + cost of customer waiting) in order to
make decision about how much capacity to provide.

For example, if Orin caf pays $15 per hour to a cashier then adding one more cashier
increases the cost of providing capacity by $15 per hour. But it also reduces the number
Ls 1
Ls 0.533 Lq 0.033
of customer in system from
(see above) to
(
from table for
Ls
m=2 and then repeat the above steps to get ). If we assume that a customers time is
worth $20 per hour then system saves (1-0.533)*$20 per hour = $9.34. Therefore, in this
example, from total system cost perspective, we should not add another server.
Other Extensions
Without making much fuss about it, we have made two significant assumptions about the
pattern of variability in arrivals and service: Poisson distribution for number of arrivals

and Exponential distribution for service times. These assumptions mean the following:
Ca 1
coefficient of variation =(standard deviation / mean) for interarrival times
and
Cs 1
coefficient of variation =(standard deviation / mean) for service times
. But what if
based on measurement of real data, they are not 1? We call this the case of general
arrivals and service.
It is easy to compute Lq in this more general case as follows:
Lq in case Ca 1 and / or Cs 1
Ca2 Cs2
( Lq as computed from table )

Lq

Starting from
earlier.

, other performance measures can be computed in the same way as

Summary

Arrival rate lambda = 1 / (interarrival time, that is time between two arrivals)

Service rate mu
= 1 / service time
Number of servers m
/ ( m )
Utilization rho
Assume arrivals Poisson distribution and service time are exponentially distributed.
/
Average number in waiting line Lq can be obtained from table (given
and m)
Lq 2 /(1 )
In case number of servers m=1, we can also use
Wq Lq /
Average waiting time
from Littles Law
Ws Wq (1 / )
Average time-in-system (waiting time +service time)
Ls Ws
Average number-in-system (waiting+getting served)
Probability that there is nobody in the system P0 is available in table.
For single-server case, m=1, we have following three formulas:
Pn (1 ) n

Probability that there are n customers in system


e (1 )t
Probability that wait is greater than t =
e (1 )t

Probability that time-in-system is greater than t =


Determination of capacity is a trade-off between cost of service capacity and cost of
customer waiting.
Coefficient of variation of interarrival times Ca = (Std.dev./mean of interarrival times)
Coefficient of variation of service times Cs = (Std.dev./mean of service times)
Ca 1 and / or C s 1
(Ca2 Cs2 ) / 2
If
, modify Lq from above by multiplying it with

Queueing
Model: Practice Problems
1. A small town with one hospital has two ambulances to supply ambulance service. Requests for
ambulances during non-holiday weekend averages 0.8 per hour and tend to be Poisson
distributed. Travel and assistance time averages one hour per call and follows an exponential
distribution. What is the utilization of ambulances? On an average, how many requests are
waiting for ambulances? How long will a request have to wait for ambulances? What is the
probability that both ambulances are sitting idle at a given point in time?
2. At a banks ATM location with a single machine, customers arrive at the rate of one every
other minute. This can be modeled using a Poisson distribution. Each customer spends an
average of 90 seconds completing his/her transactions. Transaction time is exponentially
distributed. Determine (1) the average time customers spend from arriving to leaving, (2) the
chance that the customer will not have to wait, (3) the average number waiting to use the
machine.
3. The last two things that are done before a car is completed are engine marriage (station 1) and
tire installation (station 2). On average 54 cars per hour arrive at the beginning of these two
stations. Three servers are available for engine marriage. Engine marriage requires 3 minutes.
The next stage is a single server tire installation. Tire installation requires 1 minute. Arrivals are
Poisson and service times are exponentially distributed.
(1) What is the queue length at each station?
(2) How long does a car spend waiting at the final two stations?

4. A machine shop leases grinders for sharpening their machine cutting tools. A decision must be
made as to how many grinders to lease. The cost to lease a grinder is $50 per day. The grinding
time required by a machine operator to sharpen his cutting tool has an exponential distribution,
with an average of one minute. The machine operators arrive to sharpen their tools according to a
Poisson process at a mean rate of one every 20 seconds. The estimated cost of an operator being
away from his machine to the grinder is 10 per minute. The machine shop is open 8 hours per
day. How many grinders should the machine shop lease?
5. (a) Consider a queue with a single server, arrival rate of 5 per hour and service rate of 10 per
hour. Assuming Poisson arrivals and exponential service time, what is the waiting time in queue?
(b) Actual measurements show that interarrival time standard deviation is 24 minutes and service
time standard deviation is 3 minutes. What is the waiting time in queue?

Queueing Model Practice problems: Solutions


1. A small town with one hospital has two ambulances to supply ambulance service. Requests for
ambulances during non-holiday weekend averages 0.8 per hour and tend to be Poisson
distributed. Travel and assistance time averages one hour per call and follows an exponential
distribution. What is the utilization of ambulances? On an average, how many requests are
waiting for ambulances? How long will a request have to wait for ambulances? What is the
probability that both ambulances are sitting idle at a given point in time?
Ambulances are resources or servers servicing the requests that are coming in (customers). Two
ambulances mean m=2. Requests arrival rate

rate = (1/service time) = 1 per hour.

=0.8 per hour. Service time = one hour. Service

0.8

0.4
m 2 *1

Utilization
/

=0.8 and m=2.

Lq 0.152 P0 0.429

From table:

Lq 0.152

On an average, how many requests are waiting for ambulances =


Wq

Lq

How long will a request have to wait for ambulances

0.152
0.19 hr
0.8
P0 0.429

What is the probability that both ambulances are sitting idle at a given point in time..
Ws , Ls

Other Performance measures include


Time spent by a call in system

Ws Wq service time 0.19 1 1.19hr

Ls Ws 0.8*1.19 0.952

Number of requests in system =


2. At a banks ATM location with a single machine, customers arrive at the rate of one every
other minute. This can be modeled using a Poisson distribution. Each customer spends an
average of 90 seconds completing his/her transactions. Transaction time is exponentially
distributed. Determine (1) the average time customers spend from arriving to leaving, (2) the
chance that the customer will not have to wait, (3) the average number waiting to use the
machine.

Solution:

0.5 / min
One every other minute means arrival rate
1/ 90sec 0.667 / min m 1
Service rate

0.5

0.75
m 1*0.667

Lq

2
0.752

2.25
(1 ) 1 0.75

(we an use the formula because m=1; table should give the same
result)
Wq

Lq

2.25
4.5min
0.5

Ws
(1) the average time customers spend from arriving to leaving
= waiting + service time = Wq+
90 sec = 4.5min+1.5min= 6 minutes
(2) the chance that the customer will not have to wait that is the chance that there are 0
P0 1
customers in system =
=0.25 (the formula is for m=1 case) (3) the average number
Lq
waiting to use the machine =2.25
3. The last two things that are done before a car is completed are engine marriage (station 1) and
tire installation (station 2). On average 54 cars per hour arrive at the beginning of these two
stations. Three servers are available for engine marriage. Engine marriage requires 3 minutes.
The next stage is a single server tire installation. Tire installation requires 1 minute. Arrivals are
Poisson and service times are exponentially distributed.
(a) What is the queue length at each station?
(b) How long does a car spend waiting at the final two stations?
(a) We can analyze these two stations as independent queues. One queue at station 1 followed by
another queue at station 2.
Station 1: Engine Marriage
m=3
= 54 per hour
= 20 per hour
/
=54/20=2.7,
(1) From the table we know that Lq=7.354

Lq

Waiting time at station 1 Wq= =7.354/54=0.1362 hours.


Station 2: Tire assembly
The arrival rate at station 2 is the rate of departure from station 1. If 54 cars per hour
arrive at station 1 then, just for the system to be stable, on an average 54 cars must depart from
station 1. Thus, arrival rate at station 2:
= 54 per hour
= 60 per hour
/
= 54/(60) = 0.90
(1) From table, Lq =8.1.
Lq

Waiting time at station 2 Wq= =8.1/54=0.15 hour


(b) Total wait time is therefore 0.1362 hr + 0.15 hr = 0.2862 hr
4. A machine shop leases grinders for sharpening their machine cutting tools. A decision must be
made as to how many grinders to lease. The cost to lease a grinder is $50 per day. The grinding
time required by a machine operator to sharpen his cutting tool has an exponential distribution,
with an average of one minute. The machine operators arrive to sharpen their tools according to a
Poisson process at a mean rate of one every 20 seconds. The estimated cost of an operator being
away from his machine to the grinder is 10 per minute. The machine shop is open 8 hours per
day. How many grinders should the machine shop lease?
Solution:
The data for this problem are as follows:
1 customer per 20 seconds = 3 per minute
= 1 per minute
Lease cost = $50 per grinder per day = $6.25 per grinder per hour
Waiting cost = 10 per minute = $6.00 per operator per hour
The trade-off is between costs of providing service (lease cost) and the cost of customer waiting
(waiting cost). Note that customers are our own employees and therefore it is possible to have a
good estimate of waiting cost as above. We will focus on minimizing the sum of these two costs
so that the trade-off can be resolved optimally. Let us call the sum total cost per hour. Let us try
three options for leasing: 4 grinders, 5 grinders and 6 grinders.
M=4:

Lq 1.528 (from Table , / =3 , M=4),


Ls WS (Wq (1 / )) 1.528 3 4.528
Total Cost/Hour=($6.25)(4)+($6)(4.528)=$52.17.

Note that 4 grinders result in a cost of providing service equal to $6.25*4 per hour. Since, on
average, there are 4.528 operators away from their machines, the cost of customer waiting (being
away from machine) is $6*4.528 per hour. The operator being services is also away from his
machine
M=5:
Lq 0.354 (from Table , / =3 , M=5),

Ls WS (Wq (1 / )) 0.354 3 3.354,


Total Cost/Hour=($6.25)(5)+($6)(3.354)=$51.37.
M=6:

Lq 0.099 (from Table , / =3 , M=6),


Ls WS (Wq (1 / )) 0.099 3 3.099,
Total Cost/Hour=($6.25)(6)+($6)(3.099)=$56.09.

5 grinders should be leased, since this yields the lowest total cost per hour ($51.37).
5. (a) Consider a queue with a single server, arrival rate of 5 per hour and service rate of 10 per
hour. Assuming Poisson arrivals and exponential service time, what is the waiting time in queue?
(b) Actual measurements show that interarrival time standard deviation is 24 minutes and service
time standard deviation is 3 minutes. What is the waiting time in queue?
(a) Arrivals follow Poisson distribution. This means that interarrival time standard deviation is
equal to interarrival time mean and that coefficient of variation (=standard deviation/mean) of
interarrival time Ca=1. Service time follows exponential distribution. This means that service
time standard deviation is equal to service time mean and that coefficient of variation (=standard
deviation/mean) of service time Cs=1. This means that for part (a) we can use standard table or
formulas to compute performance.
5 / hr; 10 / hr; / 0.5
; m=1
/ m 0.5
Lq 2 / (1 ) 0.25 / (1 0.5) 0.5 Wq Lq / 0.5 / 5 0.1hr 6 min

;
(b) Now that standard deviations are not equal to mean, we have neither Ca=1, nor Cs=1. We need
to modify above results to incorporate new values of Ca and Cs.
Since arrival rate is 5 per hour, average interarrival time is (1/5) hr = 12 minutes.
Standard deviation of interarrival time is 24 minutes.
Coefficient of variation of interarrival time Ca= standard deviation/mean=24/12=2.
Since service rate is 10 per hour, average service time is (1/10) hr = 6 minutes.

Standard deviation of service time is 3 minutes.


Coefficient of variation of service time Cs= standard deviation/mean=3/6=0.5.
C 2 Cs2
Lq in case Ca 1 and / or Cs 1 ( Lq as computed from table ) a

Lq 0.5*(

22 0.52
) 1.0625
2

Wq Lq / 1.0625 / 5 0.2125hr 12.75min

Anda mungkin juga menyukai