Sie sind auf Seite 1von 68

Chapter 3

Mathematical and Statistical


Models
1.
2.

Kleber Barcia V.

Statistical models in simulation


Queueing models

Chapter 3

Introduction

Systems and processes that the analyst sees in the real


world are probabilistic rather than deterministic.

Some statistical models can accurately describe the variations in a


system.

An appropriate model is the one that represents a


phenomenon of interest by taking a sample of the real
system:

Selecting a known distribution


Estimating the correct parameters
Trying to find the distribution that best fits (Test for goodness of fit)

In this chapter:

Review some probability distributions and statistical models


Presents some queue models
Kleber Barcia V.

Chapter 3

Review of terminology and concepts

In this section, we will review the following


concepts:
Discrete

Random Variables
Continuous Random Variables
Cumulative Distribution Functions
Expected Value

Kleber Barcia V.

Chapter 3

Discrete random variables

[Probability Review]

X is a discrete random variable if the number of possible


values of X is finite, or at most a countably infinite set.
Example: Consider jobs arriving at a job shop.

Let X be the number of jobs arriving each week at a job shop.

Rx = possible values of X (range space of X) = {0,1,2,}

p(xi) = probability the random variable is xi = P(X = xi)

p(xi), i = 1,2, must satisfy:


1. p( xi ) 0, for all i
2.

i 1

p( xi ) 1

The collection of pairs [xi, p(xi)], i = 1,2,, is called the probability mass
function (pmf) of X.
Kleber Barcia V.

4
Rev. 1

Chapter 3

Discrete random variables

[Probability Review]

Example:
Consider the roll of a dice. Consider X as the number of points for each
face of the die. Then:
Rx = {1,2,3,4,5,6}
Assume load is distributed proportionally to the number of points of
each face.
xi

p(xi)

1/21

2/21

3/21

4/21

5/21

6/21

Then:

1. p( xi ) 0, for all i
2.

i 1

p( xi ) 1 / 21 2 / 21 ... 6 / 21 1

So, x is a discrete random variable


Kleber Barcia V.

Chapter 3

Continuous random variables

[Probability Review]

X is a continuous random variable if its range space Rx is an interval or


a collection of intervals.
The probability that X lies in the interval [a,b] is given by:
b

P(a X b) f ( x)dx
a

f(x), denoted as the pdf of X, satisfies:


1. f ( x) 0 , for all x in R X
2.

f ( x)dx 1
RX

3. f ( x) 0, if x is not in RX

Properties
x0

1. P( X x0 ) 0, because f ( x)dx 0
x0

2. P(a X b) P(a X b) P(a X b) P(a X b)


Kleber Barcia V.

Chapter 3

Continuous random variables

[Probability Review]

Example: Life of an inspection device is given by X, a


continuous random variable with pdf:
1

e x / 2 , x 0
f ( x) 2

otherwise
0,

X has an exponential distribution with mean 2 years


Probability that the devices life is between 2 and 3 years is:

1 3 x / 2
P(2 x 3) e dx e 3 2 e 1 0.14
2 2
Kleber Barcia V.

Chapter 3

Cumulative Distributions Functions? [Probability Review]

Cumulative Distribution Function (cdf) is denoted by F(x), where F(x)


= P(X <= x)

If X is discrete, then

F ( x) p( xi )
all
xi x

If X is continuous, then

F ( x) f (t )dt

Properties
1. F is nondecreas ing function. If a b, then F (a) F (b)

2. lim x F ( x) 1
3. lim x F ( x) 0

All probability question about X can be answered in terms of the cdf,


e.g.:

P(a X b) F (b) F (a), for all a b


Kleber Barcia V.

Chapter 3

Cumulative Distributions Functions? [Probability Review]

Example: An inspection device has cdf:


1 x t / 2
F ( x) e dt 1 e x / 2
2 0

The probability that the device lasts for less than 2 years:

P(0 X 2) F (2) F (0) F (2) 1 e1 0.632

The probability that it lasts between 2 and 3 years:

P(2 X 3) F (3) F (2) (1 e(3 / 2) ) (1 e1 ) 0.145

Kleber Barcia V.

Chapter 3

Expected Value

[Probability Review]

The expected value of X is denoted by E(X)

If X is discrete

E ( x) xi p( xi )
all i

If X is continuous

E ( x) xf ( x)dx

a.k.a. the mean, m, or the 1st moment of X


A measure of the central tendency

The variance of X is denoted by V(X) or var(X) or s2


Definition:
V(X) = E[(X E[X]2]
Also,
V(X) = E(X2) [E(x)]2
A measure of the spread or variation of the possible values of X around
the mean

The standard deviation of X is denoted by s

Definition: square root of V(X)


Expressed in the same units as the mean
Kleber Barcia V.

10

Chapter 3

Expected Value

[Probability Review]

Example: The mean of life of the previous inspection device


is:

1 x / 2
x / 2
E ( X ) xe dx xe
e x / 2 dx 2
0
2 0
0

To compute variance of X, we first compute E(X2):

1
x / 2
2 x / 2
2
E ( X ) x e dx x e
e x / 2 dx 8
0
2 0
0
2

Hence, the variance and standard deviation of the devices life


are:
2

V (X ) 8 2 4

s V (X ) 2
Kleber Barcia V.

11

Chapter 3

Queuing systems

[Useful Models]

In a queueing system, interarrival and service-time


patterns can be probabilistic.

Sample statistical models for interarrival or service time


distribution:

Exponential distribution: if service times are completely random

Normal distribution: fairly constant but with some random


variability (either positive or negative)

Truncated normal distribution: similar to normal distribution but


with restricted value.

Gamma and Weibull distribution: more general than


exponential (involving location of the modes of pdfs and the
shapes of tails.)

Kleber Barcia V.

12

Chapter 3

Inventory systems and supply chains [Useful Models]

In realistic inventory and supply-chain systems, there are


at least three random variables:

The number of units demanded per order or per time period

The time between demands

The lead time

Sample statistical models for lead time distribution:

Gamma

Sample statistical models for demand distribution:

Poisson: simple.

Negative binomial distribution: longer tail than Poisson (more


large demands).

Geometric: special case of negative binomial.

Kleber Barcia V.

13

Chapter 3

Reliability and Maintainability

[Useful models]

Time to failure (TTF)


Exponential:

failures are random

Gamma:

Excessive waiting for components, where


each component has an exponential distribution of
time to failure

Weibull:

failure is due to the most serious defects in a


system of components

Normal:

Kleber Barcia V.

failures are due to overuse


14
Rev. 1

Chapter 3

Other models

uniform
triangular
beta

discrete Distributions

[Useful Models]

Bernoulli

trials and Bernoulli distribution


Binomial distribution
Geometric distribution
Poisson distribution
Kleber Barcia V.

15

Chapter 3

Binomial Distribution

[Discrete Distribution]

The number of successes in n Bernoulli trials, X, has a


binomial distribution.
n x n x
p q , x 0,1,2,..., n
p( x) x
0,
otherwise

The number of
outcomes having the
required number of
successes and
failures

Probability that
there are
x successes and
(n-x) failures

x!nn! x!
n
x

The mean, E(x) = p + p + + p = n*p


The variance, V(X) = pq + pq + + pq = n*pq

Kleber Barcia V.

16

Chapter 3

Binomial Distribution

[Discrete Distribution]

Example: A production process assembles computer chips with an average of


2% of non-conformity. Every day we take a sample of 50 chips in the process.
If the sample contains more than 2 chips nonconforming, the process should
be stopped. Determine the probability that the process stops each day.

n = 50
50
(0.02) x (0.98)50 x , x 0,1,2,...,50
p( x) x
0,
otherwise

p = 0.02

It is easy to calculate: P (X> 2) = 1-P (X <= 2)


2

p( X 2)
x 0

(0.02) (0.98)
50
x

50 x

(0.98)50 50(0.02)(0.98) 49 1225(0.02) 2 (0.98) 48 0.92

The probability that the process stops is 0.08

E (x) = n * p = 50 (0.02) = 1

V (X) = n * pq = 50 (0.02) (0.98) = 0.98

Kleber Barcia V.

17

Chapter 3

Geometric distribution

[Discrete Distribution]

Geometric Distribution

The number of Bernoulli trials, X, to achieve the 1st success:

q x 1 p, x 0,1,2,..., n
p( x)
otherwise
0,

E(x) = 1/p, and V(X) = q/p2

Example: 40% of the assembled printers are rejected in the inspection


department. Find the probability that the 1st acceptable printer is the
3rd one inspected. Consider each inspection as a Bernoulli trial with
q = 0.4 and p = 0.6
P (3) = (0.4)(3-1) (0.6) = 0,096
In only about 10% of the cases, the 1st acceptable printed is the 3rd
one from any arbitrary starting point.
Kleber Barcia V.

18
Rev. 1

Chapter 3

Poisson distribution

[Discrete Distribution]

Poisson distribution describes many random processes


quite well and is mathematically quite simple.

where a > 0, pdf and cdf are:

e a a x

p( x) x! , x 0,1,...

otherwise
0,

e a a i
F ( x)
i!
i 0
x

E(X) = a = V(X)
a = np

pmf and cdf


graphics for
Kleber Barcia V.

a=2
19

Chapter 3

Poisson distribution

[Discrete Distribution]

Example: A computer repair person is beeped each


time there is a call for service. The number of beeps per
hour ~ Poisson(a = 2 per hour).

The probability of three beeps in the next hour:


p(3)
= e-223/3! = 0.18
also, p(3)
= F(3) F(2) = 0.857-0.677=0.18

The probability of two or more beeps in a 1-hour period:


p(2 or more)
= 1 p(0) p(1)
= 1 F(1)
= 0.594

Kleber Barcia V.

20

Chapter 3

Continuous distributions

Continuous random variables can be used to


describe random phenomena in which the
variable can take on any value in some interval.
In this section, the distributions studied are:
Uniform
Exponential
Normal
Weibull

Lognormal

Kleber Barcia V.

21

Chapter 3

Uniform Distribution

[Continuous Distribution]

A random variable X is uniformly distributed on the


interval (a,b), U(a,b), if its pdf and cdf are:
1

, a xb
f ( x) b a

otherwise
0,
xa
0,
x a
F ( x)
, a xb
b a
xb
1,

E(X) = (a+b)/2
V(X) = (b-a)2/12
U(0,1) provides the means to generate random numbers,
from which random variables can be generated.

Kleber Barcia V.

22

Chapter 3

Uniform Distribution

[Continuous Distribution]

Example: A bus arrives every 20 minutes at a specific stop beginning


from 6:40 am until 8:40 am A special passenger does not know the
schedule but arrives uniformly from 7:00 am until 7:30 am every morning.
What is the probability that the passenger waits more than 5 min. for a
bus?
The passenger has to wait more than 5 min. only if he arrives between
7:00 and 7:15 or between 7:20 to 7:30. So the probability is:
P (0 <X <15) + P (20 <X <30)
As X is uniformly distributed on (0, 30):

x a
F ( x)
, a xb
b a

F(15) + F(30) - F(20) = (15-0)/(30-0) + (30-0)/(30-0) - (20-0)/(30-0) = 5/6


Kleber Barcia V.

23

Chapter 3

Exponential Distribution

[Continuous Distribution]

A random variable X is exponentially distributed with


parameter l > 0 if its pdf and cdf are:
le lx , x 0
f ( x)
elsewhere
0,

x0

0,x
F ( x)
lt
lx
l
e
dt

e
, x0

E(X) = 1/l

Kleber Barcia V.

V(X) = 1/l2

24

Chapter 3

Exponential Distribution

[Continuous Distribution]

Memoryless property
For all s and t greater or equal to 0:
P(X > s+t / X > s) = P(X > t)
Example:

A lamp ~ exp(l = 1/3 per hour), hence, on


average, 1 failure per 3 hours.

The probability that the lamp lasts longer than its mean life is:
P(X > 3) = 1-(1-e-3/3) = e-1 = 0.368

The probability that the lamp lasts between 2 to 3 hours is:


P(2 <= X <= 3) = F(3) F(2) = 0.145

The probability that it lasts for another hour given it is


operating for 2.5 hours:
P(X > 3.5 | X > 2.5) = P(X > 1) = e-1/3 = 0.717

Kleber Barcia V.

25
Rev. 1

Chapter 3

Normal Distribution

[Continuous Distribution]

A random variable X is normally distributed if its pdf is:


1 x m 2
1
f ( x)
exp
, x
s 2
2 s

m
Mean:
2
s
0
Variance:
Represented as X ~ N (m,s2)

Kleber Barcia V.

26

Chapter 3

Normal Distribution

[Continuous Distribution]

Evaluating the distribution:

Use numerical methods (no closed form)


Independent of m and s, using the standard normal distribution:
Z ~ N(0,1)
Transformation of variables: let Z = (X - m) / s,

xm

F ( x ) P X x P Z

( xm ) /s
1 z2 / 2

e
dz

( xm ) /s

( z )dz (

xm

, where ( z )

1 t 2 / 2
e
dt
2

Tabla A.3.
Kleber Barcia V.

27

Chapter 3

Normal Distribution

[Continuous Distribution]

Example: The time required to load an oceangoing


vessel, X, is distributed as N(12,4)

The probability that the vessel is loaded in less than 10 hours:


10 12
F (10)
(1) 1 0.8413 0.1587
2

Kleber Barcia V.

Using the symmetry property, (1) is the complement of (-1)

28

Chapter 3

Weibull distribution

[Continuous Distribution]

A random variable X has a Weibull distribution if its pdf and cdf have
the form:
x 1
x

exp
, x
f ( x) a a
a
0,
otherwise

x
F ( x) 0,

1 exp a , x

When = 1,
X ~ exp(l = 1/a)

3 parameters:
Location parameter: , ( )
Scale parameter:
, ( > 0)
Shape parameter. a, (a > 0)

Example: = 0 and a = 1:

Kleber Barcia V.

29

Chapter 3

Weibull distribution

[Continuous Distribution]

Example: The time it takes for an aircraft to land and clear the runaway
at an international airport has a Weibull distribution with = 1.34 min.,
= 0.5 and = 0.04 min. Find the probability that an incoming plane will
take more than 1.5 min. to land and clear the runaway.

In this case P (x> 1.5), then compute P (x <= 1.5) = F (1.5)

F (1.5) = 1 - exp [- ((1.5 - 1.34) / 0.04) 0.5]

F (1.5) = 1 - e-2 = 1-0.135 = 0.865

Then the probability that an plane will require more than 1.5 min. to
land and clear the runaway is:

1-0865 = 0.135

Kleber Barcia V.

30
Rev. 1

Chapter 3

Queueing models. Introduction [Part 2]

Simulation is often used in the analysis of queueing models.

A simple but typical queueing model:

Some typical measurements yield queue systems are:

Server utilization, length of the queue and queued customers

Simple systems can be calculated with mathematical formulas.

Real complex systems must be calculated using simulation.

Kleber Barcia V.

31

Chapter 3

Characteristics of queuing systems

Key elements of queuing systems:

Customers:
It refers to anything or anyone that arrives at a workplace
and requires service. Example: people, machines, trucks,
e-mails.

Server:
Refers to any resource that provides the requested service.
Example: a repair technician, production machines, the
airport runway.
Kleber Barcia V.

32

Chapter 3

Population

[Characteristics of Queueing System]

Population:
They are potential customers, it can be assumed finite or infinite.

Finite Population Models


Infinite Population Models

System capacity:
It is a limit on the number of customers that may be in the waiting
line or system.

Limited capacity. Example: an automatic car washing only has


room for 10 cars to wait in line to enter the mechanism.

Unlimited capacity. Example: concert ticket sales without limit on


the number of people allowed to wait to purchase tickets

Kleber Barcia V.

33

Chapter 3

Process arrival

[Characteristics of Queueing System]

For infinite population models:

It is characterized in terms of interarrival times of


successive customers:

Random arrivals

Scheduled arrivals:

Interarrival times can be constant or constant plus or minus a


small random amount to represent early or late arrivals.

Example: patients to a physician or scheduled airline flight


arrivals to an airport.

Kleber Barcia V.

34

Chapter 3

Process arrival

[Characteristics of Queueing System]

For finite-population models:

Customer is pending when customer is waiting for a service, e.g.,


machine-repair problem: a machine is the customer and is
pending for a repair service when it is operating.

Let A1(i), A2(i), be the successive runtimes of customer i, and


S1(i), S2(i) be the corresponding successive service times. Then
the figure shows the arrival process model of the machine-repair
problem:

Kleber Barcia V.

35
Rev. 1

Chapter 3

Queue Behavior and Queue Discipline


[Characteristics of Queueing System]

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 it is 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).

Kleber Barcia V.

36
Rev. 1

Chapter 3

Service Time and Service Mechanism


[Characteristics of Queueing System]

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.

Kleber Barcia V.

37

Chapter 3

Service Time and Service Mechanism


[Characteristics of Queueing System]

Example: consider a discount warehouse where


customers may:

Serve themselves before paying at the cashier:

Wait for one of the three clerks:

Kleber Barcia V.

38

Chapter 3

Service Time and Service Mechanism


[Characteristics of Queueing System]

The service center 2 is represented below:

Service in batches with 3 dependents in parallel

Kleber Barcia V.

39

Chapter 3

Queueing Notation
[Characteristics of Queueing System]

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), Ek (Erlang of order k), G (general)

Kleber Barcia V.

40

Chapter 3

Queueing Notation
[Characteristics of Queueing System]

Primary performance measures of queueing systems:

Pn:
Pn(t):
l:
le:
m:
r:
An:
Sn:
Wn:
WnQ:
L(t):
LQ(t):
L:
LQ:
w:
wQ:

Kleber Barcia V.

steady-state probability of having n customers in system,


probability of n customers in system at time t,
arrival rate,
effective arrival rate,
service rate of one server,
server utilization,
interarrival time between customers n-1 and n,
service time of the nth arriving customer,
total time spent in system by the nth arriving customer,
total time spent in the waiting line by customer n,
the number of customers in system at time t,
the number of customers in queue at time t,
long-run time-average number of customers in system,
long-run time-average number of customers in queue,
long-run average time spent in system per customer,
long-run average time spent in queue per customer.
41
Rev. 1

Time-Average Number of Customers in System L

Chapter 3

[Characteristics of Queueing System]

Consider a queueing system over a period of time T,

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

i 0

iTi

T
i i
T
i 0

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


1
L
T

1
iTi
T
i 0

L(t )dt
0

The long-run time-average # of customers in system, with


probability 1:
1 T

L
L(t )dt L as T
T 0

Kleber Barcia V.

42

Chapter 3

Time-Average Number of Customers in Queue LQ


[Characteristics of Queueing System]

The time-weighted-average number of customers in queue is:

1
1 T
Q

LQ
iTi
LQ (t )dt LQ as T
T i 0
T 0

G/G/1/N/K example: consider the results from the queueing


system (N > 4, K > 3).
L [0(3) 1(12) 2(4) 3(1)] / 20
23 / 20 1.15 cusomters

if L(t) 0
0,
LQ (t )
L(t ) 1, if L(t) 1
0(15) 1(4) 2(1)
LQ
0.3 customers
20

Kleber Barcia V.

43

Chapter 3

Average Time Spent in System Per Customer w


[Characteristics of Queueing System]

The average time spent in system per customer, called


the average system time, is:
1
w
N

i 1

where W1, W2, , WN are the individual times that each of the N
customers spend in the system during [0,T].

w as N
w

For stable systems:

If the system under consideration is the queue alone:

1 N Q
w Q Wi wQ
N i 1

Kleber Barcia V.

as

44

Chapter 3

Average Time Spent in System Per Customer w


[Characteristics of Queueing System]

G/G/1/N/K example (cont.): The average system time is:


assume FIFO
1
w
N

i 1

W1 W2 ... W5
5
2 (8 3) (10 5) (14 7) (20 16)

4.6 time units


5

1 N Q
w Q Wi wQ
N i 1
w Q
Kleber Barcia V.

as

0 033 0
1.2 time units
5
45

Chapter 3

The Conservation Equation


[Characteristics of Queueing System]

Conservation equation (a.k.a. Littles law)


Average # in system

L lw

Average System time

Arrival rate

L lw as T and N l N / T

Holds for almost all queueing systems or subsystems (regardless


of the number of servers, the queue discipline, or other special
circumstances).

G/G/1/N/K example (cont.): On average, one arrival every 4 time


units and each arrival spends 4.6 time units in the system.

Hence, at an arbitrary point in time, there is (1/4)(4.6) = 1.15


customers present on average.

Kleber Barcia V.

46

Chapter 3

Server Utilization

[Characteristics of Queueing System]

Definition: the proportion of time that a server is busy.

Observed server utilization, r , is defined over a specified time


interval [0,T].

Long-run server utilization is r.

For systems with long-run stability:

r r as T
Kleber Barcia V.

47

Chapter 3

Server Utilization

[Characteristics of Queueing System]

For G/G/1// queues:

Any single-server queueing system with average arrival


rate l customers per time unit, where average service time
E(S) = 1/m time units, infinite queue capacity and calling
population.
Conservation equation, L = lw, can be applied.
For a stable system, the average arrival rate to the server,
ls, must be identical to l.
The average number of customers in the server is:

T T0
1 T

Ls
L(t ) LQ (t ) dt
T 0
T
T = total time
T0 = server idle time
Kleber Barcia V.

48

Chapter 3

Server Utilization

[Characteristics of Queueing System]

In general, for a single-server queue:

L s r Ls r as T
and

l
r lE ( s )
m

For a single-server stable queue (l m):

l
r 1
m

Kleber Barcia V.

For an unstable queue (l m), long-run server utilization is 1.

49

Chapter 3

Server Utilization

[Characteristics of Queueing System]

For G/G/c// queues:

A system with c identical servers in parallel.

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, Ls, is: Ls, = lE(s) = l/m.

The long-run average server utilization is:

Ls
l
r

,
c
cm
Kleber Barcia V.

where l cm for stable systems


50

Chapter 3

Server Utilization and System Performance


[Characteristics of Queueing System]

Example: A physician who schedules patients every 10 minutes and


spends Si minutes with the ith patient:
9 minutes with probability 0.9

Si
12 minutes with probability 0.1
Arrivals are deterministic, A1 = A2 = = l-1 = 10.
Services are stochastic, E(Si) = 9.3 min and V(S0) = 0.81 min2.
On average, the physician's utilization = r l/m = 0.93 < 1.
Consider the system is simulated with service times: S1 = 9, S2 =
12, S3 = 9, S4 = 9, S5 = 9, . The system becomes:

The occurrence of a relatively long service time causes the formation


of a temporary queue.
51

Kleber Barcia V.

Chapter 3

Costs in Queueing Problems


[Characteristics of 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.
The average cost per customer is:
N

j 1

$10 *W jQ
N

$10 * w Q

W Q is the time customer j


j spends in queue

If l customers per hour arrive (on average), the average cost


per hour is:
customer $10 * w Q
$10 * lw Q $10 * LQ / hour
l

hour customer

Server may also impose costs on the system, if a group of c


parallel servers (1 c ) have utilization r, each server imposes
a cost of $5 per hour while busy.
The total server cost is: $5*cr.

Kleber Barcia V.

52

Rev. 1

Chapter 3

Steady-State Behavior of Infinite-Population


Markovian Models

For this model, stable parameter, L, number of customers


in the system in an average time is:

Pn: probability of n customers in the system


n: number of clients

nPn

n 0

Applying Little's equation to the system, we have:


w

Applying Little's equation to the queue:


If : wQ w

Kleber Barcia V.

Then : LQ lwQ
53

Chapter 3

M/G/1 queues

[Steady-State of Markovian Model]

Single-server queues with Poisson arrivals & unlimited


capacity.
Suppose service times have mean 1/m and variance s2 and
r = l/m < 1, the steady-state parameters of M/G/1 queue:
r l / m , P0 1 r , r 1 P0
r 2 (1 s 2 m 2 )
r 2 (1 s 2 m 2 )
Lr
, LQ
2(1 r )
2(1 r )

r2

l2s 2
LQ

2(1 r ) 2(1 r )

l (1 / m 2 s 2 )
l (1 / m 2 s 2 )
w
, wQ
m
2(1 r )
2(1 r )
1

Kleber Barcia V.

54

Chapter 3

M/G/1 queues

[Steady-State of Markovian Model]

Example: Two workers competing for a job, Able claims to be faster


than Baker on average, but Baker claims to be more consistent,

Both, Poisson arrivals at rate l = 2 per hour (1/30 per minute).


Able: 1/m = 24 minutes and s2 = 202 = 400 minutes2:
(1 / 30) 2 [24 2 400]
LQ
2.711 customers
2(1 4 / 5)

The proportion of arrivals who find Able idle and thus experience no delay is P0
= 1-r = 1/5 = 20%.

Baker: 1/m = 25 minutes and s2 = 22 = 4 minutes2:


(1 / 30) 2 [252 4]
LQ
2.097 customers
2(1 5 / 6)

The proportion of arrivals who find Baker idle and thus experience no delay is
P0 = 1-r = 1/6 = 16.7%.

Although working faster on average, Ables greater service variability


results in an average queue length about 30% greater than Bakers.

Kleber Barcia V.

55

Chapter 3

M/M/1 queues

[Steady-State of Markovian Model]

Suppose the service times in an M/G/1 queue are


exponentially distributed with mean 1/m, then the variance
is s2 = 1/m2.

M/M/1 queue is a useful approximate model when service


times have standard deviation approximately equal to their
means.
The steady-state parameters:
r l / m,
l

Pn 1 r r n

l2
r2
L

, LQ

m l 1 r
m m l 1 r
1
1
l
r
w

, wQ

m l m (1 r )
m m l m (1 r )
Kleber Barcia V.

56

Chapter 3

M/M/1 queues

[Steady-State of Markovian Model]

Example: M/M/1 queue with service rate m10 customers


per hour.

Consider how L and w increase as arrival rate, l, increases from 5


to 8.64 by increments of 20%:
l
r

5.0

6.0

7.2

8.64

10.0

0.500

0.600

0.720

0.864

1.000

1.00

1.50

2.57

6.35

0.20

0.25

0.36

0.73

If l/m 1, waiting lines tend to continually grow in length.

Increase in average system time (w) and average number in


system (L) is highly nonlinear as a function of r.

Kleber Barcia V.

57

Chapter 3

Effect of Utilization and Service Variability


[Steady-State of Markovian Model]

A measure of the variability of the distribution is the coefficient of


variation (cv):
V (X )
s2
2
2 2
(cv )

s
m
E ( X )2 1 m 2
The larger cv, the more variable is the distribution relative to its
expected value.

Consider LQ for any M/G/1 queue:


r 2 (1 s 2 m 2 ) r 2 1 (cv ) 2

LQ

2(1 r )
2
1 r

LQ for M/M/1
queue
Kleber Barcia V.

Corrects the M/M/1 formula to


account for a non-exponential
service time distribution
58

Chapter 3

Multiserver queues

[Steady-State of Markovian Model]

M/M/c// queue: c channels operating in parallel.

Each channel has an independent and identical exponential


service-time distribution, with mean 1/m.
To achieve statistical equilibrium, the offered load (l/m) must
satisfy l/m < c, where l/(cm) = r is the server utilization.
Some of the steady-state probabilities:
r l / cm

c 1 (l / m ) n l c 1 cm


P0

n! m c! cm l
n 0

r P L ( ) c
L cr
cr
2
1 r
c(c!)(1 r )
(cr ) c 1 P0

w
Kleber Barcia V.

Table 6.12, chap. 6 p. 254

59

Chapter 3

Multiserver queues

[Steady-State of Markovian Model]

Other common multiserver queueing models:

M/G/c/: general service times and c parallel server. The


parameters can be approximated from those of the M/M/c//
model.

M/G/: general service times and infinite number of servers, e.g.,


customer is its own system, service capacity far exceeds service
demand.

M/M/C/N/: service times are exponentially distributed at rate m


and c servers where the total system capacity is N c customer
(when an arrival occurs and the system is full, that arrival is turned
away).

Kleber Barcia V.

60

Chapter 3

Steady-State Behavior of Finite-Population Models

When the calling population is small, the presence of one or


more customers in the system has a strong effect on the
distribution of future arrivals.

Consider a finite-calling population


model with K customers (M/M/c/K/K):

The time between the end of one


service visit and the next call for
service is exponentially distributed,
(mean = 1/l).
Service times are also exponentially
distributed.
c parallel servers and system capacity
is K.

Kleber Barcia V.

61

Chapter 3

Steady-State Behavior of Finite-Population Models

Some of the steady-state probabilities are:


c 1 K l n K
K!
P0
n c
n 0 n m n c ( K n)!c!c
K l n
P0 ,
n m
Pn
K!

( K n)!c!c n c

L nPn ,

n 0,1,..., c 1
n

l
P0 ,
m

w L / le ,

n 0

l

m

n c, c 1,...K

wQ LQ le ,

r le / cm ,

LQ

n c Pn

n c 1

where le is the long run effective arrival rate of customers to queue (or entering/e xiting service)

le

( K n )l P

n 0

Kleber Barcia V.

62

Chapter 3

Steady-State Behavior of Finite-Population Models

Example: two workers who are responsible for10 milling


machines.

Machines run on the average for 20 minutes, then require an


average 5-minute service period, both times exponentially
distributed: l = 1/20 and m = 1/5.
All of the performance measures depend on P0:
n
n
2 1
10

10!
5
10 5

P0

n2
n
20
20
(
10

n
)!
2
!
2

n2
n 0

Then, we can obtain the other Pn.

Expected number of machines in system:

0.065

10

nP

3.17 machines

n 0

Kleber Barcia V.

The average number of running machines:


K L 10 3.17 6.83 machines

63

Chapter 3

Networks of Queues

Many systems are naturally modeled as networks of single


queues: customers departing from one queue may be routed
to another.

The following results assume a stable system with infinite


calling population and no limit on system capacity:

Provided that no customers are created or destroyed in the


queue, then the departure rate out of a queue is the same as the
arrival rate into the queue (over the long run).

If customers arrive to queue i at rate li, and a fraction 0 pij 1 of


them are routed to queue j upon departure, then the arrival rate
form queue i to queue j is lipij (over the long run).

Kleber Barcia V.

64

Chapter 3

Networks of Queues

Discount store example:

Suppose customers arrive at the rate 80 per hour and 40%


choose self-service. Hence:

Arrival rate to service center 1 is l1 = 80(0.4) = 32 per hour

Arrival rate to service center 2 is l2 = 80(0.6) = 48 per hour.

c2 = 3 clerks and m2 = 20 customers per hour.

The long-run utilization of the clerks is:

r2 = 48/(3*20) = 0.8

All customers must see the cashier at service center 3, the


overall rate to service center 3 is l3 = l1 + l2 = 80 per hour.

If m3 = 90 per hour, then the utilization of the cashier is:

r3 = 80/90 = 0.89
Kleber Barcia V.

65

Chapter 3

Networks of Queues

The overall arrival rate into queue j:

lj aj

l p
i

ij

all i
Arrival rate from
outside the network

Sum of arrival rates from other


queues in network

If queue j has cj < parallel servers, each working at rate mj, then
the long-run utilization of each server is rj=lj/(cmj) (where rj < 1
for stable queue).
If arrivals from outside the network form a Poisson process with
rate aj for each queue j, and if there are cj identical servers
delivering exponentially distributed service times with mean 1/mj,
then, in steady state, queue j behaves likes an M/M/cj queue with
arrival rate l j a j li pij

all i

Kleber Barcia V.

66

Chapter 3

Networks of Queues
Example of a driver's license office:

Drivers arriving at a rate of 50 per hr. Everyone should go check to a


Center with two servers with an average checking time of two
minutes.

After checking, 15% of drivers need to take the written exam takes
about 20 minutes.

Everyone should wait for the photo of your license. This station
processes an average of 60 licenses per hr.

The head office want to know the arrival rate for each of the queues.

Service center, queue 1 (c1 = 2, m1=30 drivers per hr.)

Written Exam center, queue 2 (c2= , m1=3 drivers per hr.)

Photo center, queue 3 (c3= 1, m1=60 drivers per hr.)

Kleber Barcia V.

67

Chapter 3

Networks of Queues

The arrival rate for each queue is:


3

l1 a1 pi1li 50 0 50 drivers per hr.


i 1

l2 a2 pi 2li 0 (0.15)50 7.5 drivers per hr.


i 1
3

l3 a3 pi 3li 0 (0.85)50 (1)7.5 50 drivers per hr.


i 1

Approaching the service center to model M/M/c1


Approximating written exam center to model M/M/
Approaching photo center to model M/M/c2
------

Kleber Barcia V.

HOMEWORK 5 at SIDWEB

------

68

Das könnte Ihnen auch gefallen