Sunteți pe pagina 1din 16

CHAPTER 5

QUEUEING MODELS
Simulation is often used in the analysis of queueing models. A simple but typical queueing
model:

Queueing models provide the analyst with a powerful tool for designing and evaluating the
performance of queueing systems.
Typical measures of system performance:
Server utilization, length of waiting lines, and delays of customers
For relatively simple systems, compute mathematically
For models of complex systems realistic systems, simulation is usually required.

Characteristics of Queueing Systems

Key elements of queueing systems:
Customer: refers to anything that arrives at a facility and requires service, e.g., people,
machines, trucks, emails.
Server: refers to any resource that provides the requested service, e.g., repairpersons,
retrieval machines, runways at airport.

Calling Population
Calling population: the population of potential customers may be assumed to be finite or
infinite.
- Finite population model: if arrival rate depends on the number of customers
being served and waiting, e.g., model of one corporate jet, if it is being repaired,
the repair arrival rate becomes zero.
- Infinite population model: if arrival rate is not affected by the number of
customers being served and waiting, e.g., systems with large population of
potential customers.

System Capacity
It refers to a limit on the number of customers that may be in the waiting line or system.
- Limited capacity, e.g., an automatic car wash only has room for 10 cars to wait
in line to enter the mechanism.
- Unlimited capacity, e.g., concert ticket sales with no limit on the number of
people allowed waiting to purchase tickets.

Arrival Process
- For infinite-population models:
It is characterized in terms of interarrival times of successive customers.
Random arrivals: interarrival times usually characterized by a probability distribution.
Most important model: Poisson arrival process (with rate ), where A
n
represents the
interarrival time between customer n-1 and customer n, and is exponentially distributed
(with mean 1/).

Scheduled arrivals: interarrival times can be constant or constant plus or minus a small
random amount to represent early or late arrivals.
e.g., patients to a physician or scheduled airline flight arrivals to an airport.

The third situation is at least one customer is assumed to always be present, so the
server is never idle
e.g., sufficient raw material for the product

- For finite-population models:
Customer is pending when the customer is outside the queueing system, e.g., machine-
repair problem: a machine is pending when it is operating, it becomes not pending
the instant it demands service form the repairman.
Runtime of a customer is the length of time from departure from the queueing system
until that customers next arrival to the queue, e.g., machine-repair problem, machines
are customers and a runtime is time to failure.

Queue Behavior and Queue Discipline

Queue behavior: the actions of customers while in a queue waiting for service to begin,
for example:
Balk: leave when they see that the line is too long,
Renege: leave after being in the line when its moving too slowly,
Jockey: move from one line to a shorter line.

Queue discipline: the logical ordering of customers in a queue that determines which
customer is chosen for service when a server becomes free, for example:
First-in-first-out (FIFO)
Last-in-first-out (LIFO)
Service in random order (SIRO)
Shortest processing time first (SPT)
Service according to priority (PR).

Service Times and Service Mechanism

Service times of successive arrivals are denoted by S1,S2, S3.
- May be constant or random.
- {S1, S2, S3, } is usually characterized as a sequence of independent and identically
distributed random variables, e.g., exponential, Weibull, gamma, lognormal, and
truncated normal distribution.
- A queueing system consists of a number of service centers and interconnected queues.
- Each service center consists of some number of servers, c, working in parallel, upon
getting to the head of the line, a customer takes the 1st available server.
- Example: consider a discount warehouse where customers may serve themselves before
paying at the cashier:


- Wait for one of the three clerks:

- Batch service (a server serving several customers simultaneously) customer requires
several server simultaneously), or customer requires several servers simultaneously.

Queueing Notation
A notation system for parallel server queues: A/B/c/N/K
A represents the interarrival-time distribution,
B represents the service-time distribution,
c represents the number of parallel servers,
N represents the system capacity,
K represents the size of the calling population.

Common symbols for A and B include M (exponential or Markov), D (constant or deterministic),
E
k
(Erlang of order k), PH (phase-type), H (hyperexponential), G (arbitrary or general), and GI
(genral independent).
Examples:
M/M/1 (also M/M/1//) indicates a single-server that has unlimited queue
capacity and an infinite population model. The interarrivals and service times are
exponentially distributed.
When N and K are infinite, they are often dropped from the notation
G/G/1/5/5 represents a queueing system with general (or arbitrary) inter-arrival
and service distribution with single server, with a queue capacity of 5 and finite
population model of size 5
General models are used to solve the queue system with no particular
distribution in mind
Very useful as the final results can be obtained by plugging in the values
of specific distributions

Queueing Notations for Parallel Server Systems
P
n
: steady-state probability of having n customers in system,
P
n
(t): probability of n customers in system at time t,
: arrival rate,

e
: effective arrival rate,
: service rate of one server,
: server utilization,
A
n
: interarrival time between customers n-1 and n,
S
n
: service time of the nth arriving customer,
W
n
: total time spent in system by the nth arriving customer,
W
n
Q
: total time spent in the waiting line by customer n,
L(t): the number of customers in system at time t,
L
Q
(t): the number of customers in queue at time t,
L: long-run time-average number of customers in system,
L
Q
: long-run time-average number of customers in queue,
w: long-run average time spent in system per customer,
w
Q
: long-run average time spent in queue per customer.


LONG RUN PERFOMANCE MEASURES OF QUEUEING SYSTEMS

1. Time-Average Number in System L

Consider a queueing system over a period of time T, and let L(t) denote the number of customers
in the system at time t.

Let T
i
denote the total time during [0,T] in which the system contained exactly i customers, the
time-weighted-average number in a system is defined by:


For the figure above:
T
0
= 3, T
1
= 12, T
2
= 4, and T
3
= 1

Consider the total area under the function is L(t), then,


The long-run time-average number in system, with probability 1:


If L
Q
(t) denotes the number of customers waiting in line , and

denotes the total time during


[0,T] in which exactly i customers are waiting in line then, the time-weighted-average number in
queue is:



From the figure above



Area under T
3
is 1 i.e.


Area under T
2
is 4 i.e.


Hence Area under T
1
is 20 (1 +4) =15 i.e.



Therefore,



2. Average Time Spent in System Per Customer w

If we simulate the queueing system for a period, say T and then record the time each customer
spends in the system during [0,T], say W
1
, W
2
, ., W
N
where N is the number of arrivals in
[0,T].

The average time spent in system per customer, called the average system time, is:




For stable systems: with probability 1, where w is called the long-run
average system time.
If the system under consideration is the queue alone (with W
i
Q
time customer I spend in the
queue):


G/G/1/N/K example: consider the results from the queueing system (N > 4, K > 3).

=
=
N
i
i
W
N
w
1
1

N w w as
1
1
as
N
Q
Q i Q
i
w W w N
N
=
=


The average system time is:

Assumptions are single server, FIFO queue discipline.
Time spent in waiting line is:


3. Conservation Equation or Littles Law
Conservation equation (a.k.a. Littles law) is given by:

Holds for almost all queueing systems or subsystems (regardless of the number of
servers, the queue discipline, or other special circumstances).
Derivation:
Total system time for all customers is given by the total area under the number in system
function L(t).

Multiplying both sides by (1/T)


Multiplying and Dividing by N on L.H.S. and then interchanging sides

units time 6 . 4
5
) 16 20 ( ... ) 3 8 ( 2
5
...

5 2 1
=
+ + +
=
+ + +
=
W W W
w
units time 2 . 1
5
0 3 3 0 0
5
...

5 2 1
=
+ + + +
=
+ + +
=
Q Q Q
Q
W W W
w
w L


=
}

=
=
T
N
i
i
dt t L W
0
1
) (
}

=
=
T
N
i
i
dt t L
T
W
T
0
1
) (
1 1
T N
w W
N
N
T
dt t L
T
L
N
i
i
T
=
= = =

}
=

where

1
) (
1

1
0
4. Server Utilization
Definition: the proportion of time that a server is busy.
Observed server utilization,, is defined over a specified time interval [0,T].
Long-run server utilization is .
For systems with long-run stability:



As per the above picture, the server utilization is




For G/G/1// queues:
Any single-server queueing system with average arrival rate customers per time
unit, where average service time E(S) = 1/ time units or is the average service
rate, infinite queue capacity and calling population.
Conservation equation, L = w, can be applied.
For a stable system, the average arrival rate to the server,
s
, must be identical to
.
The average number of customers in the server is:

For a single-server case, the average number of customers being served at any arbitrary
point in time is equal to server utilization!!

In general, for a single-server queue:


T as
( ) ( )
time idle total the is
20 / 17 / busy time) (total
0
0
1
T
T T T T T T
i
i
= = = =

( )
T
T T
dt t L t L
T
L
T
Q s
0
0
) ( ) (
1


= =
}



= = =
= =
) ( system, sub server for the , into this combining and
as

s E w L
T L L
s s
- For a single-server stable queue:
The arrival rate must be less than the service rate ; (< )

- For an unstable queue ( > )
The server is always busy
Waiting line tend to grow in length at an average rate of ( -) customers per
time unit and long run average queue length is
Long-run server utilization is 1.
For G/G/c// queues:
A system with c identical servers in parallel. Arrivals occur at a rate and each
server works at a rate customers per time unit.
If an arriving customer finds more than one server idle, the customer chooses a
server without favoring any particular server.
For systems in statistical equilibrium, the average number of busy servers, L
s
, is:
L
s
, = E(s) = /.
The long-run average server utilization is:


Numerical 1:
Customers arrive at random to the passport center at a rate of 40 customers per hour. Currently,
there are 20 clerks, each serving 4 customers per hour on the average. Estimate the average
utilization of a server and the average number of busy servers. Can we decrease the number of
servers?
Solution:
Given: =50 customers per hour, =5 customers per hour
The long-run or steady state average utilization of a server is
The average number of busy servers is:



1 < =

systems stable for where ,

c
c c
L
s
< = =
5 . 0
20(4)
40
= = =

c
10
4
40
= = =

s
L
A typical clerk is busy only 50% of the time!!

For system to be stable, the number of servers must be




For D/D/1 queues:
Consider the queuing system with single server and deterministic arrival and service time.
Here, the interarrival times {A1,A2, .}are equal to E(A) = 1/.
Also, the service times {S1, S2, .}are equal to E(S) = 1/.
Assume that a customer arrives to an empty system at time 0.
The evolution of the system is completely predictable as shown in the figure below:


Here, L = =/, w = E(S) =1/, L
Q
= W
Q
= 0

By varying and , server utilization can assume any value between 0 and 1.
Yet there is never any line.
In general, variability of inter-arrival and service times (small inter-arrival times and
large service times which increases existing waiting line whereas large inter-arrival times
and small service times which reduces the existing waiting line) causes lines to fluctuate
in length.

Numerical 2:

A physician schedules patients every 10 minutes and spends S
i
minutes with the i
th
patient
which is given by:
10
4
40
= = >

{



Find the steady state average utilization of the server.

Solution:
Given that patients are arriving after every 10 minutes; hence the arrivals are deterministics.
Therefore, arrival rate = (1/10) per minute.
The services are probabilistic.
Therefore, the mean service time = E(S) = 9(0.9) + 12(0.1) = 9.3 minutes
Therefore, service rate = (1/9.3) per minute.

Average sever utilization =


From this we can say that, a physician will be busy for 93%.

5. Costs in Queueing System

Costs can be associated with various aspects of the waiting line or servers:
System incurs a cost for each customer in the queue, say at a rate of $10 per
hour per customer.
The average cost per customer is:



If

customers per hour arrive (on average), the average cost per hour is:



Server may also impose costs on the system, if a group of c parallel servers
(1 c ) have utilization , each server imposes a cost of $5 per hour while
busy.
The total server cost is: $5*c.












Q
N
j
Q
j
w
N
W
* 10 $
* 10 $
1
=

=
W
j
Q
is the time
customer j spends in
queue

hour /

* 10 $

* 10 $
customer
* 10 $
hour
customer

Q Q
Q
L w
w
= =
|
|
.
|

\
|
|
.
|

\
|

M/G/1 Queue
M/G/1 queue has a single server with unlimited capacity and interarrival time which is
exponentially / Poisson distributed whereas the service time is general having mean 1/
with variance .
If = / < 1, the steady-state parameters of M/G/1 queue:








Numerical 3:
Widget-making machines malfunction apparently at random and then require a mechanics
attention. It is assumed that malfunctions occur according to a Poisson process, at the rate of 1.5
per hour. Observations over several months has found that repair times by a single mechanic take
an average time of 30 minutes, with the standard deviation of 20 minutes. Compute:
a) The utilization of mechanic
b) The time-average number of machines in the system
c) The average time an arrival spends in the system
d) The average time machine spends in the queue
e) The time-average number in the queue
f) The probability of zero machines with the mechanic.
Solution:
Given, =1.5 per hour
The mean service time = 1/ = 30/60 = hour
Therefore, = 2 per hour
= (20) minutes =1/9 hour

a) The utilization of the mechanic
/ = = 1.5/2 = 0.75

b) The time-average number of machines in the system
) 1 ( 2
) / 1 (

) 1 ( 2
) / 1 ( 1
) 1 ( 2
) 1 (

) 1 ( 2
) 1 (
) 1 ( 2
) 1 (
customers) (no idle is server y probabilit the is ) 1 ( , /
2 2
2 2
2 2 2
2 2 2 2 2 2
0

o

o

o

o

+
=

+
+ =

+
=

+
+ =

+
+ =
= =
Q
Q
w
w
L
L
P

25 . 0 ) 75 . 0 1 ( ) 1 (
mechanic. with the machines zero of y probabilit The f)
625 . 1
) 75 . 0 1 ( 2
)
9
4
1 ( ) 75 . 0 (
) 1 ( 2
) 1 (
queue in the number average - time The e)
083 . 1
) 75 . 0 1 ( 2
)
9
1
4
1
( 5 . 1
) 1 ( 2
) / 1 (
queue in the spends machine time average The d)
583 . 1
) 75 . 0 1 ( 2
)
9
1
4
1
( 5 . 1
2
1
) 1 ( 2
) / 1 ( 1
system in the spends arrival an time average The c)
machines 2.375
) 75 . 0 1 ( 2
) 9 / 4 1 ( (0.75)
0.75
) 1 ( 2
) 1 (
) 1 ( 2
) 1 (
0
2
2 2 2
2 2
2 2
2 2 2 2 2 2 2
= = =
=

+
=

+
=
=

+
=

+
=
=

+
+ =

+
+ =
=

+
+ =

+
+ =

+
+ =

P
machines L
hour w
hour w
L
Q
Q


M/M/1 Queue
M/M/1 queue has a single server with unlimited capacity and interarrival time which is
exponentially distributed whereas the service time is exponentially distributed having
mean 1/ with variance = 1/.
This model is useful when service times have standard deviations approximately equal to
their means.
The steady state parameters may be computed by substituting = 1/ into the equation
of M/G/1 queue.



( )
( )
( ) ) 1 (
,
) 1 (
1 1
1
,
1
1 ), - (1 , /
2 2
0




=
= = =
Q
Q
n
n
w w
L L
P P
Numerical 4:
Suppose that the interarrival times and service times at a single chair unisex hair-styling shop
have been shown to be exponentially distributed with values 2 per hour and 3 per hour
respectively. Compute
a) The utilization of server
b) The time-average number of customers in the system
c) The time-average number of customers in the queue
d) The average time customer spends in the system
e) The average time customer spends in the queue
f) The probability of zero, one, two, three, and four or more customers in the shop.
Solution:
Given: = 2 per hour, = 3 per hour
a) The utilization of server


b) The time-average number of customers in the system



c) The time-average number of customers in the queue



d) The average time customer spends in the system


e) The average time customer spends in the queue


f) The probability of zero, one, two, three, and four or more customers in the shop.




Network of Queues:

S-ar putea să vă placă și