Professional Documents
Culture Documents
Most systems of interest in a simulation study contain processes in which there is a demand for
service that causes congestion.
The combination of all entities in the system those being served and those waiting for service will
be called a queue.
Congestion may be described in terms of three main characteristics:
1. The arrival pattern:- describes the statistical properties of arrivals.
2. The service process:- describes how entities are served.
3. The queueing discipline:- describes how the next entity to be served is selected.
The service process can be described by three factors:
o Service time: required time to serve an entity.
o Service capacity: the number of entities can be served simultaneously.
o Service availability: it is available for 24 hours.
Arrival pattern
It is expressed in terms of inter arrival time.
Inter arrival time:- interval between two successive arrival events.
It can be constant or random.
1
Two or more arrivals may be simultaneous λ= where λ = arrival rate
Ta
Ta = interval time
Some commonly used arrival patterns are:
1. Poisson arrival pattern
2. Exponential arrival pattern
3. Erlang arrival pattern
4. Hyper exponential arrival pattern
Example:
Data packet arrives at a server randomly every 2 minutes on the average. Determine the probability
that the inter arrival time of packet
Solution:
λ=?
e.g. data packets arrived at a server randomly every 2 minutes in the average. Assume that a packet
has 10 bytes of data. Determine the probability that inter arrival time packet
b. exceed 1 minute
Solution:
Ta= 2 min
k= 10 bytes
9
( 0.5∗10∗1) n
=e −0.5∗10∗1
[∑ ]
n=0 n!
52 5 3 5 4 59
= e−5 (1+5+ + + + …+ )
2 3! 4! 9!
T Queue
1-s 2s
T Stages
2(1−s)
Suppose there are two parallel stages of processing. The stages will be processed with a
T T T T
mean of and probability of being is s and is 1-s.
2s 2(1−s) 2s 2(1−s)
= e− λt exponential distribution.
Queuing Theory
There is an input and output process example
Queuing Discipline
Describes the method used to determine the order in which customers are served. It can be:
1. FIFO (First in first out):- it is used when the arriving entities are assembled in the time order in
which they arrive.
2. LIFO (Last in First out):- service is offered next to the entity that arrives most recently.
3. Random:- service offered next to the random entity in the queue have an equal opportunity of being
selected for service.
Example 1
ρ= server utilization
Formula
λ 1 ρ
ρ= Wq= Ws - =
μ μ μ (1−ρ)
ρ ρ2
Ls = Lq= λWq =
1−ρ 1−ρ
Ls 1 ρ = Ls – Lq
Ws= =
λ μ−λ
Stability= the system is stable if ρ<1.
Exm Example: In a network gateway measurement shows that the packet arrive at mean rate of 125
pps (process per second) and the gateway takes 2 msec to forward them. If the arrival and the
departure follow exponential distribution and only one server used in the gateway analyze the
gateway.
Solution:
λ= 125 pps 1
Wq= Ws - = 2.64 msec – 2 msec = 0.64 msec
μ
Ts = 2 msec
ρ 0.25
1 1 Or Wq = = = 0.66 msec
μ= = = 500 pps μ (1−ρ) 500(1−0.25)
Ts 2msec
Lq = λWq = 125 pps * 0.64 msec = 0.0833 packet
Model = M/M/1
ρ = Ls – Lq = 0.33 – 0.0833 = 0.2467
λ 125
ρ= = = 0.25
μ 500 The system is stable becauseρ<1.
ρ 0.25 0.25
Ls = = = = 0.33 packet
1−ρ 1−0.25 0.75
Ls 0.33
Ws= = = 2.64 msec
λ 125 pps