WK8 - Queuing System

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

QUEUING SYSTEMS

Examples:
 Queue up at the checkout counters, restaurants, post office
 Jobs wait to be processed on a machine
 Planes circle in a stack before given permission to land at
an airport.
 Cars stop at traffic lights

 The study of waiting lines, called queuing theory, is


one of the oldest and most widely used quantitative
analysis technique.
The pioneering work of queuing theory was done by
the Danish Mathematician, A.K. Erlang. His study,
published in 1913, involved an analysis of telephone
service delays due to varying demands.

 Waiting lines are an everyday occurrence, affecting


people

Why Study Queue?

 To measure the phenomenon of waiting in lines using


representative measures of performance such as queue
length, average waiting time in queue and average facility
utilization.

 These measures are used to design a service facility and


make better decisions concerning the operation of waiting
lines.

66
For example:
 Supermarkets must decide how many cash register
check-out positions should be opened
 Petrol station must decide how many pumps should
be opened and how many attendants should be on
duty.
 Manufacturing plants must determine the optimal
number of mechanics to have on duty each shift to
repair breakdown machines.

Example

McBurger is a fast-food restaurant with three service


counters. The manager has commissioned a study to
investigate complaints about slow service. The study reveals
the following relationship between the number of service
counters and the waiting time for service:

No. of 1 2 3 4 5 6 7
cashiers
Average 16.2 10.3 6.9 4.8 2.9 1.9 1.3
waiting
time (min)

The average waiting time for the present three-counter


situation – 7 minutes

The manager wants it reduced to about 3 minutes – 5 (or


more) counters.

67
 The results of queuing analysis can be used in the
context of a cost optimization model.

Figure 1 Cost –based queuing decision model

 May be difficult to obtain a reliable estimate of the


unit cost of waiting

 Balance desirable service levels against the cost of


providing the service.

Elements of A Queuing Model

68
 A queuing system is described by the following
components: arrivals, waiting lines or queue, queue
discipline, service facility and departures
System

Server

Customer
arrivals
Waiting line Order taking Customer
and order leaves after
filling order is
filled

Some queuing terminology

 Customer
 Server
 Source
 Facility
 Service
 Queue
 Idle

 Arrival Process (Input)


 Arrivals – customers : people, car, airplane, etc.
 Interarrival time – time between successive
customers
 Service time – described the service length per
customer

69
 Interarrival time and service time can be
probabilistic (operation of a post office) or
deterministic (arrival of applicants for job
interviews).

 Waiting lines – when arrivals occur in such a way that


they have to wait for service, waiting lines or queues
develop.

 Source from which customers are generated


 Finite – machines requesting the service of a repair
person
 Infinite – calls arriving at a telephone exchange

 Queue discipline – represents the order in which


customers are selected/served from a queue
 FCFS (First Come First Serve)
 LCFS (Last Come First Serve) – exiting from an
elevator
 SIRO (Service In Random Order) – callers to an airline
 Priority – emergency rooms, computer time-sharing
facilities

 Queuing behaviour
 Jockey from one queue to another – reduce waiting
time
 Balk from joining a queue – anticipate long delay

 Renege / revoke from the queue – have been waiting


too long

70
 Service facility
 Servers in parallel – all servers provide the same type
of service and a customer only pass through one server
to complete service, e.g. post office
 Servers in series – a customer must pass through
several servers before completing service, e.g.
assembly line
 Servers in network - routers in a computer network

 Service rate
 Constant – washing machine’s cycle (laundry shop)
 Vary –described according to a number of
probability distribution

 Departure
 Once arrivals are served, they become departures
 Departing customers are not usually allowed to re-enter
the system immediately because frequent re-entries by
departing entities may affect the arrival rate.

Variations in these elements give rise to a variety of queuing


models.

Basic Structure of Waiting Line (Queuing) Systems

Arrivals Service
facility
Queue
Departures

71
Single-server, single-phase system

Type 1 Type 2
Arrivals Service Service
facility facility
Queue
Departures
Single-server, multi-phase system

Arrivals Service facility 1

Queue
Service facility 2

Service facility 3
Departures

Multiple-server, single-phase system

Type 1 Type 2
Arrivals Service Service
facility 1 Facility 1
Queue
Departures

Type 1 Type 2
Service Service
facility 2 Facility 2
Departures

Multiple-server, multi-phase system


Example 1
1. Suppose that further analysis of the McBurger restaurant
reveals the following additional results:
___________________________________________

72
No. of cashiers 1 2 3 4 5 6 7
_____________________________________________

Idleness (%) 0 8 12 18 29 36 42
______________________________________________

(a) What is the efficiency of the operation (expressed as


the percentage of time the employees are busy) when
the number of cashiers is five.

(b) The manager wants to keep the average waiting time


to around 3 minutes and, simultaneously, maintain the
efficiency of the facility at approximately 90%. Can
these goals be achieved? Explain.

Example 2

1. In each of the following situations, identify the customer and


the server:
(a) Planes arriving at an airport
(b) Taxi stand where cabs serve waiting passengers.
(c) Tools checked out from a crib in a machining shop.
(d) Letters processed in a post office.
(e) Registration for classes in a university.
(f)Legal court cases.
(g) Checkout operation in a supermarket.
(h) Parking lot operation.

73
2. For each of the situations in Problem 1, identify the
following:
(a) nature of the calling source (finite or infinite),
(b) nature of arriving customers (individually or in
bulk),
(c) type of the interarrival time (probabilistic or
deterministic),
(d) definition and type of service time,
(e) queue capacity (finite or infinite), and
(f) queue discipline.

Arrival and Departure Processes

 The arrival of customers and service times occur in a


totally random fashion – arrival of a customer or
completion of a service is not influenced by the length of
time that has elapsed since the occurrence of the last event
- there is no way to predict when someone will arrive.

 Random interarrival and service times are described


quantitatively in queuing models by the exponential
distribution

74
Negative Exponential (Exponential) Distribution

f t   e  t , t 0
1
Et 

1
vart 
2

Given  is the arrivals rate, Et is the average time interval


between successive arrivals.

Relationships Between The Exponential and The Poisson


Given an arrival rate,  arrivals per unit time, the strong
relationships between the exponential and the Poisson can be
summarized as follows:
Exponential Poisson
Random Time between Number of arrivals, n , during a specified
variable successive arrivals, t period T
Range t0 n  0,1,2,
Density
f t   et ,t  0  n e 
function px  n  ,n  0,1,2,
n!
Mean 1  arrivals during T
value time units

Cumulative
probability
Pt  A  1  eA px  N   px  0  px  1 
  px  N 

75
Generalized Poisson Queuing Model
Recall: Poisson assumptions - The interarrival and the service
times follow the exponential distribution.

The development of the generalized model is based on the


long-run or steady-state behaviour of the queuing situation.

Steady-state is achieved after the system has been in operation


for a sufficiently long time.

Assumption: The arrival and departure rates are state


dependent.

State-dependent – depends on the number of customers in the


service facility. For example, at a supermarket checkout,
cashiers tend to speed up during peek hours.

Define
n = Number of customers in the system (in-queue
plus in-service)

 n = Arrival rate given n customers in the system

 n = Departure rate given n customers in the


system
pn = Steady-state probability of n customers in the
system

76
pn is derived as a function of  n and  n .

These probabilities are then used to determine the system’s


measures of performance,
i. the average queue length,
ii. the average waiting time and
iii. the average utilization of the facility.

The probabilities pn are determined by using the transition-


rate diagram.

0 1 2 n 1 n n 1
 

Poisson queues transition diagram

 The queuing system is in state n when the number of


customers in the system is n .

 The probability of more than one event occurring during a


small interval h tends to zero as h  0 .

 For n  0 , state n can change only to states n  1 and


n 1

 For n  0 , can only change to state 1   0 is undefined

77
Under steady-state conditions, for n  0 , the expected rates
of flow into and out of state n must be equal.

 Expected rate of 
    n 1 pn 1   n 1 pn 1
 flow into state n 

 Expected rate of 
    n   n  pn
 flow out of state n 

Balance equation:

 n 1 pn 1  n 1 pn 1   n  n  pn , n  1,2,

0 p0  1 p1 , n0

Solve recursively in terms of p0 :


 
p1   0  p0
 1 

  
p2   1 0  p0
  21 

By induction,

    0 
pn   n 1 n  2  p0 , n  1,2,
 
 n n 1  1 

p0   pn  1
n 0

78
Example 17.5-1

B & K Groceries operates with three checkout counters. The


manager uses the following schedule to determine the
number of counters in operation depending on the number of
customers in the store:

No. of customers in the store No. of counters in operation


1 to 3 1
4 to 6 2
More than 6 3

Customers arrive in the counter area according to a


Poisson distribution with a mean rate of 10 customers per
hour. The average checkout time per customer is exponential
with mean 12 minutes. Determine the steady-state
probability Pn of n customers in the checkout area.
From the information of the problem, we have

 n    10 customers per hour , n  0,1,...


 60
12  5 customers per hour, n  1,2 ,3

 n  2  5  10 customers per hour, n  4,5,6
3  5  15 customers per hour, n  7 ,8,...

79
Thus,

 10 
p1    p0  2 p0
5
2
 10 
p2    p0  4 p0
5
3
 10 
p3    p0  8 p0
5
3
 10   10 
p4      p0  8 p0
 5   10 
3 2
 10   10 
p5      p0  8 p0
 5   10 
3 3
 10   10 
p6      p0  8 p0
 5   10 
3 3 n6 n 6
 10   10   10   2
pn        p0  8  p0 ,n  7 ,8,...
5  10   15   3

The value of p0 is determined from the equation


  2  2
2
 2
3


p0  p0 2  4  8  8  8  8  8   8   8   ...  1

  3  3  3 

80
or, equivalently

   2   2 2 

p0 31  8 1        ...  1

   3  3 
  

Using the geometric sum series


 1
x  , x 1
i
i 0 1 x
We get
  
  1 
p0 31  8   1
 
1  
2

  3 
1
Thus, p0 
55
Given p0 , we can now determine any of the probabilities of
the problem. For example, the probability that only one counter
will be open is computed as the probability that there are
between 1 and 3 customers in the system-that is,

1
p1  p2  p3  2  4  8   .255
 55 
We can use pn to determine measures of performance for the
B & K situation. For example,

 Expected number 
   3 p0  2 p1      
p2  p3  1 p4  p5  p6  0 p7  p8  ...
 of idle counters 
 1 counter

81
Specialized Poisson Queues

System
Departure
Server 1 Rate 
Departure
Arrival Server 2 Rate 
Rate

 Departure
Queue Server c Rate 

Schematic representation of a specialized Poisson


queuing system with c parallel servers

Characteristics:
i. Customers are served by the first available
server
ii. Arrival rate  customers per unit time
iii. All parallel servers are identical  service rate
for any server is  customers per unit time
iv. Number of customers in the system  in
service + in queue.

A convenient notation:
a / b / c  : d / e / f 
(Kendall notation) : (Lee notation)

where
a  Arrivals distribution
b  Departures (service time) distribution

82
c  Number of parallel servers  1,2,,
d  Queue discipline
e  Maximum number (finite or infinite) allowed in
the system (in-queue plus in-service)
f  Size of the calling source (finite or infinite)

Standard notations for representing the arrivals and


departures distribution a and b  are

M  Markovian (or Poisson) arrivals or departures


distribution (or equivalently exponential interarrival
or service time distribution)

D  Constant (deterministic) time

Ek  Erlang or gamma distribution of time (or


equivalently the sum of independent exponential
distributions)

GI  General distribution of interarrival time

G  General distribution of service time

The queue discipline notation (symbol d ) includes

FCFS  First come, first served


LCFS  Last come, first served
SIRO  Service in random order
GD  General discipline (i.e. any type of discipline)

83
Example: The model M / D / 10 : GD / 20 / 

Characteristics:
i. Poisson arrivals (exponential interarrival time)
ii. Constant service time
iii. 10 parallel servers
iv. Queue discipline is GD
v. Only 20 customers in the system
vi. The size of the customer source is infinite.

Other examples:
1. M / M / 1 : SIRO,20,
2. M / G / 3 : FIFO,30,

Steady-State Measures of Performance

The most commonly used measures of performance in a


queuing situation are

Ls = Expected number of customers in system


Lq = Expected number of customers in queue
Ws = Expected waiting time in system
Wq = Expected waiting time in queue
c = Expected number of busy servers

Recall: System = in-queue + in-service

84

Ls   npn
n 1

Lq   n  c pn
n  c 1

From Little’s formula:


Ls   eff Ws
Lq   eff Wq
where  eff is the effective arrival rate at the system
  eff   when all arriving customers can join the system
  eff   if some customers cannot join because the
system is full (e.g. parking lot)

By definition,
 Expected waiting   Expected waiting   Expected service 
   
 time in system   time in queue   time 

1
Ws  Wq 

 eff
Therefore, Ls  Lq 

 eff
Average number of busy server, c  Ls  Lq 

Hence,
 Facility  c
 
 utilizatio n  c

85
Example

Visitors’ parking at KTF is limited to 4 spaces only. Cars


making use of this space arrive according to a Poisson
distribution at the rate of six cars per hour. Parking time is
exponentially distributed with a mean of 30 minutes. Visitors
who cannot find an empty space immediately on arrival may
temporarily wait inside the lot until a parked car leaves. That
temporary space can hold only two cars. Other cars that cannot
park or find a temporary waiting space must go elsewhere.

Determine the following:


a) The probability, pn , of having n cars in the system
b) The effective arrival rate for cars that actually use the lot
c) The average number of cars in the lot
d) The average time a car waits for a parking space inside the
lot
e) The average number of occupied parking spaces
f) The average utilization of the parking lot.

86
Single-Server Models

Assumptions:
1) Infinite-capacity source
2) Arrivals occur at the rate of  customers per unit time
3) Service rate is  customers per unit time

First Case - M / M / 1 : GD /  / 

 No limit on the maximum number in the system

n  
,n  0,1,2,
 n  

 eff   and lost  0


Let   ,

   0
pn  n 1 n  2 p0 , n  0,1,2,
 n n 1 1
pn  n p0 , n  0,1,2,



 pn  p0 1        1
n 0
2

1
Assuming   1, 1    2   
1 

87
Thus, p0  1  

Therefore, pn  n 1  , n  0,1,2,   1


Since   1, therefore    . If not the steady-state
probabilities pn will not exist – queue length will increase
indefinitely.

 
Ls   npn   nn 1  
n 0 n0
 
 1    nn  1    nn 1
n 0 n0

d  n d  1 
 1      1     
d n  0 d  1   
 1  
 1 -  
2

 1    1  

Ls L 1
Ws   s 
 eff  
1 
Wq  Ws  
 1   
2
Lq  Wq 
1 
c  Ls  Lq  

88
Example

Automata car wash facility operates with only one bay. Cars
arrive according to a Poisson distribution with a mean of 4 cars
per hour and may wait in the facility’s parking lot if the bay is
busy. The time for washing and cleaning a car is exponential
with a mean of 10 minutes. Cars that cannot park in the lot can
wait in the street bordering the wash facility. This means that
for all practical purposes, there is no limit on the size of the
system. The manager of the facility wants to determine the size
of the parking lot.

Solution

= ,  = ,  =

Therefore, the system can operate under steady-state


conditions.

2
Lq   1.33 cars.
1 

The design should reflect the maximum possible length of the


queue:
Design the parking lot such that an arriving car will find a
parking space at least 90% of the time.

Let K be the number of parking spaces - K  1 spaces in the


system (in queue + in service).

89
An arriving car will find a space 90% of the time if there are at
most K cars in the system,

p0  p1   pK  0.9

Given that the cumulative values of pn for n  4 is 0.86831


and for n  5 is 0.91221.

This means that the condition is satisfied for K  5 parking


spaces.

The number of spaces K can also be determined by using the


mathematical definition of pn

pn   n 1    , n  0,1, 2,    1

= 1    1     2  
  K  0.9

 
= 1   K 1  0.9

 K 1  0.1

ln  0.1
K 1  5
4
ln  
6
Thus, K  5 parking spaces

90
For the same example, do the following:

a)Determine the percent utilization of the wash bay


b)Determine the probability that an arriving car must wait in
the parking lot prior to entering the wash bay
c)If there are seven parking spaces, determine the probability
that an arriving car will find an empty parking space
d)How many parking spaces should be provided so that an
arriving car may find a parking space 99% of the time?

91
Second Case - M / M / 1 : GD / N / 
 There is a limit N on the number in the system

 When the number of customers in the system reaches N ,


no more arrivals are allowed.

 , n  0,1, , N  1
n  
0, n  N , N  1,.
 n   , n  0,1,2,


Using   ,

n p0 , n  N
pn  
 0, nN


p0 1    2     N  1 
 1 
 1   N 1 ,   1
p0  
 1 ,  1
N 1

92
Thus,
 n 1   
 1   N 1 ,   1 
pn   ,n  0,1, , N
 1 ,  1 
 N 1 

 need not be less than 1, because arrivals at the


system are controlled by the system limit N  there
will be lost .

lost  pN , eff    lost  1  pN 

N
Ls   npn 

 1   N  1 N  N N 1 
,  1
n 0 1    
1   N 1

N
Ls  ,  1
2

93
Example

The probabilities pn of n customers in the system for an


M / M / 1 : GD / 5 /  are given in the following table:
n 0 1 2 3 4 5
pn 0.399 0.249 0.156 0.097 0.061 0.038

The arrival rate  is 5 customers per hour. The service


rate  is 8 customers per hour. Compute the following:
a) Probability that an arriving customer will be
able to enter the system.
b) Rate at which the arriving customers will not
be able to enter the system.
c) Expected number of customers in the system
d) Average waiting time in the queue

94
Example

A cafeteria can seat a maximum of 50 persons. Customers


arrive in a Poisson stream at the rate of 10 per hour and are
served (one at a time) at the rate of 12 per hour.
a) What is the probability that an arriving customer will
not eat in the cafeteria because it is full?
b) Suppose that three customers (with random arrival
times) would like to be seated together. What is the
probability that their wish can be fulfilled? (Assume
that arrangements can be made to seat them together
as long as three seats are available.)

95
Multiple-Server Models

First case - M / M / c  : GD /  / 

 c parallel servers
  arrival rate
  service rate per server
  eff 
 The arrivals wait in a single waiting line and then move to
the first open channel for service
Effect of using c parallel servers is a proportionate
increase in the facility service rate.

n  , n  0 ,1,2, ,

n , n  c
n  
c , n  c

Thus,

 n n n
 p0  p  p0 , nc
 2 n3 n 
n 0
n!  n!
pn    n n
 c  p0  p 
n c n 0
p ,
nc 0
nc
  i c 
n c c! c  c! c
 i 1 

96
 
Let   and assuming  1,
 c

1
 c 1 n c     n  c 
p0       
n  0 n! c! n c  c  
1
  
 c 1  
n c  1  
    , 1

n  0 n! c!  1   c
  c 

 c 1
Lq   n  c pn  p
n c c  1! c  p 2 0

The other values for the operating characteristics of the


queuing model:

Lq
Wq 

1 1
Ws  Wq   Wq  Ws 
 

Ls  Ws

97
Example Final 2004/05
Consider a two-channel queuing system with Poisson
arrivals and exponential service times. The mean arrival
rate is 14 units per hour, and the mean service rate is 10
units per hour for each channel.
a) What is the probability that no units are in the system?
b) What is the average number of units in the system?
c) What is the average time a unit waits for service?
d) What is the average time a unit is in the system?

Example Final 2004/05


XInterior Company provides office decorating assistance
to its customers. In normal operation, an average of 2.5
customers arrive each hour. XInterior’s management
would like to evaluate two alternatives:
i)Use one consultant with an average service time of 8
minutes per customer
ii)Expand to two consultants, each of whom has an
average of 10 minutes per customer.
Calculate the operating characteristics ( p0 , Ls ,Ws , Lq ,Wq )
of both queuing systems.
If the consultants are paid RM16 per hour and the
customer waiting time is valued at RM25 per hour for the
waiting time prior to service, should XInterior expand to
two-consultant system? Explain.

Solution

A suitable measure to compare the two models is the


average time a customer waits for service - Wq

98
Second case - M / M / c  : GD / N / , c  N

 Maximum queue size is N  c


  eff

, 0  n  N
n  
0, nN

n , 0  n  N
n  
 c , cnN

 n
 p0 , 0  n  c
pn   nn !
  p , cnN
 c! c n  c 0

where

1
  N  c 1 

  
 c 1   
 c 1   c 
 ,  1
n
 
  
 n  0 n!    c
p0   c!  1  
  c 
 
 1
  c1     N  c  1 ,   1
n c

  n  0 n! c! 
 c

99

For  1,
c

 N  c 1 N c 
N c 1        
Lq   n  c  pn  1      N  c  1 1     p0
n c c  1! c     
2 c  c  
c 


For  1,
c

c  N  c  N  c  1
Lq  p0
2c!

lost  pN

 eff     lost  1  p N 

Lq
Wq 

1 1
Ws  Wq   Wq  Ws 
 

Ls  Ws

100
Example

At UTM, newly enrolled first year students are notorious for


wanting to drive their cars to class (even though most of them
are required to live on campus and can conveniently make use
of the university bus). During the first couple of weeks of the
first semester, traffic havoc prevails on campus as first year
students try desperately to find parking spaces. With unusual
dedication, the students wait patiently in the lanes of the
parking lot for someone to leave so they can park their cars.
Let us consider the following specific scenario. The parking lot
has 30 parking spaces but can also accommodate 10 more cars
in the lanes. These additional 10 cars cannot park in the lanes
permanently and must await the availability of one of the 30
parking spaces. First year students arrive at the parking lot
according to a Poisson distribution, with a mean of 20 cars per
hour. The parking time per car averages about 60 minutes but
actually follows an exponential distribution.

a) What is the percentage of first year students who are


turned away because they cannot enter the lot?
b) What is the probability that an arriving car will wait in the
lanes?
c) What is the probability that an arriving car will occupy
the only remaining parking space on the lot?
d) Determine the average number of occupied parking
spaces.
e) Determine the average number of spaces that are
occupied in the lanes.

101
Machine Servicing Model -
 M / M / R  :  GD / K / K  , R  K
 K machines
 R available repair persons
  breakdowns per unit time per machine
 service rate -  machines per unit time
 All breakdowns and services are assumed to follow the
Poisson distribution.
 Finite calling source

Rate of breakdown for the entire shop is

n   K  n   , 0  n  K

 Only machines in working order can break down and


hence have the potential to generate calls for service.

In terms of the generalized model:

 K  n   , 0  n  K
n  
0, nK

 n , 0nR
n  
 R , RnK

102
From the generalized model:

 CnK  n p0 , 0  n  R

pn  
K n! 
n
Cn p , RnK
n R 0
 R!R
1
 R K n K
K n! 
n

p0    Cn    Cn n R 
 n  0 n  R 1 R ! R 

K
Ls   npn
n 0

eff  E   K  n     K  Ls 

103
Example

The Skudai Police Department has 5 patrol cars. A patrol car


breaks down and requires service once every 30 days. The
police department has two repair workers, each of whom takes
an average of 3 days to repair a car. Breakdown times and
repair times are exponential.

a) Determine the average number of police cars in good


condition.

b) Find average down time for a police car that needs repairs

c) Find the fraction of the time a particular repair worker is


idle.

104
Queues in Series

 Also known as Tandem Queue or Series Queue

We consider Poisson Queues with service stations


arranged in series so that customer must pass through
all stations before completing service.

Consider a simplified one-channel queuing system


consisting of two series station as in Figure 1.

Arrival Station 1 Station 2 Departure

System

Figure 1

Theorem

If (1) interarrival times for a series queuing system are


exponential with rate  , (2) service times for each stage i
server are exponential, and (3) each stage has an infinite-
capacity waiting room, then interarrival times for arrivals to
each stage of the queuing system are exponential with rate  .

105
Example

The last two things that are done to a car before its
manufacture is complete are installing the engine and putting
on the tires. An average of 54 cars per hour arrive requiring
these two tasks. One worker is available to install the engine
and can service an average of 60 cars per hour. After the
engine is installed, the car goes to the tire station and waits for
its tires to be attached. Three workers serve at the tire station.
Each works on one car at a time and can put tires on a car in an
average of 3 minutes. Both interarrival times and service times
are exponential.
a) Determine the mean queue length at each work station
b) Determine the total expected time that a car spends
waiting for service.

Solution

Series queuing system with



c1  1 

c2  2 

106
For stage 1 (engine),  

2
Lq  
1 

Lq
Wq  

For stage 2 (tires),  

Lq 

Lq
Wq  

Thus, the total expected time a car spends waiting for engine
installation and tires is

107
Queues With Priorities

In many organizations, the order in which customers are served


depends on the customer’s “type” not the time they have been
waiting.
 Hospital emergency rooms usually serve seriously ill
patients before they serve non-emergency patients.
 Jobs with earlier deadline are performed first.

Assumptions:

1. There is more than 1 category of customers (several


parallel queues).

Each category is assigned a priority order. Queue 1


has the highest priority for service. Rates of arrival
and service may vary for the different priority
queues.

2. The customers within each queue are served on


FCFS basis (based on the time already spent waiting
in the queuing system).

108
Priority service may follow one of two rules:

1. Preemptive rule – service of a lower-priority


customer may be interrupted in favour of an arriving
customer with higher priority.

2. Nonpreemptive rule –A customer, once in service,


will leave the facility only after the service is
completed and regardless of the priority of newly
arriving customers (without interruption).

Only single-server with nonpreemptive rule will be


discussed in this course.

M i / Gi / 1 : NPRP /  / 
 Poisson arrivals (interarrival times are
exponential)

 Arbitrary service time distribution ( need not be


exponential)

Let

Fi t  be the CDF of the arbitrary service time


distribution for the i th queue i  1,2,,m

109
1
Ei t   be the mean and vari t   2 be the

variance.

 For the case where service time is approximately


constant, vart  0

 i be the arrival rate at the i th queue per unit time

i be the service rate at the i th queue per unit time

The following formulas are obtained:

k 
m

  i  Ei t  vari t
i 1
2

Wq 
21  S k 1 1  S k 

Lqk    kWqk 

Wsk   Wqk   Ek t

Lsk   Lqk   k

110
where
k   k Ek t
k
S k   i  1, k  1,2 , ,m
i 1
S0  0

Note that Wq , the expected waiting time in the queue


for any customer regardless of priority, is given by

m  k k 
Wq   Wq
k 1 
k
is the relative weight of Wqk  .
m
where     i and
i 1 
Also applies to Ws .

Example

Jobs arrive at a production facility in three categories: rush


order, regular order, and low-priority order. Although rush jobs
are processed prior to any other job and regular jobs take
precedence over low-priority orders, any job, once started,
must be completed before a new job is taken in. Arrival of
orders from the three categories are Poisson with means 4, 3,
and 1 per day. The respective service rates are constant and
equal to 10, 9 and 5 per day. Calculate
Wqk  , Lqk  ,Wsk  , Lsk  and Wq .

111
Solution

 Three nonpreemptive priority queues m  3


 Assume that queues 1, 2 and 3 represent the three job
categories in the order given in the description of the
problem.

We thus have

1 

2 

3 

We also have

S1 

S2 

S3 

Since S3  1, the system can reach steady-state conditions.

m
 
 i Ei t  vari t 
i 1
2

112
Example

Job orders arriving at a production facility are divided into


three groups. Group 1 will take the highest priority for
processing; group 3 will be processed only if there are no
waiting orders from groups 1 and 2. It is assumed that a job
once admitted to the facility must be completed before any
new job is taken in. Orders from groups 1, 2 and 3 occur
according to Poisson distributions with means 4, 3 and 2 per
day, respectively. The service times for the three groups are
exponential with service rates 10, 9 and 10 per day
respectively. Find the following:

a) The expected waiting time in the system for each of the


three queues
b) The expected waiting time in the system for any customer
c) The expected number of waiting jobs in each of the three
groups
d) The expected number waiting in the system

113

You might also like