Simulation 2
Simulation 2
Simulation 2
• Introduction
Introduction
• Simulation:
A simulation is the imitation of the
operation of a real process or system
over time.
Continue
• Simulation involves:
1/ The generation of an artificial history of
a system.
2/ The observation of that history.
3/ The Drawing of inferences concerning
the operating characteristics of the real
system.
Continue
• Characteristics and
Advantages of Simulation
Characteristics and Advantages
of Simulation
a/ New Policies.
b/ New Procedures.
c/ New Decision rules.
d/ New information flow scenarios.
Continue
• Disadvantages of Simulation
Disadvantages of Simulation
• Models
Discrete and Continuous Systems
• Simulation Steps
Simulation Steps
.
Simulation Steps
• 1/ Problem Formulation:
The analyst must ensure that the problem
being described is clearly understood.
Continue
• 4/ Data Collection:
There is a strong relation between the
construction of the model and the
collection of the needed input data.
Continue
• 5/ Model Translation:
The model must be entered into a computer
recognizable format using some
programming language or special-purpose
simulation software.
Continue
• 6/ Verification:
In verification step we answer the
following question:
Is the computer program performing
properly?
Continue
• 7/ Validation:
Validation is the determination that a
model is an accurate representation of
the real system.
Continue
• 8/ Experimental Design:
In experimental design, the following
points should be determined:
- Alternatives to be simulated.
- Initialization period length.
- NO. of run replications.
Continue
• 12/ Implementation:
The success of implementation phase
depends on how well the previous 11
steps have been performed.
Unit 7
• Simulation Example
Poisson Distribution
n! e
n=0,1,2,..
Continue
• The average number of arrivals within an
interval of length is (According to the
calculated mean in a Poisson distributed
system). Hence, can be considered as
arrival rate (average number of arriving
customers per unit time).
Continue
P n S 1
S
e 0
s
Continue
• The probability density function is
P n e
n
respectively.
Continue
• 2- For every t 0 and 0
n!
Continue
Hint:
Assume that, two disjoint time intervals are
independent and Poisson distributed with
parameters , 1 2
Continue
• , then the probability that the total number
of arrivals is N=N1+N2 is given by
N
PN1 N 2 N PN1 k PN 2 N k
k 0
Exponential Distribution
• A given process (e.g. customers service
times ) is said to have an exponential
distribution with parameter . I.e., if S n is
the service time for the nth customer, then
Continue
P S n S 1 e S
S 0
PD0 e
PD1 1 e
Continue
P00 1 0
Pi ,i 1 0
Pi ,i 1 0
Continue
• These probabilities add up to 1. . This
implies that, the probability of ( I
customers arrive and I customers
depart), for i,1 equals 0. That is to
say, Pi ,i 0 for i 1
Continue
• The figure below shows the transition
diagram based on Markov chains. It is
clear that, the total number of transitions
from state n to state n+1 must differ from
the total number of transitions from state
n+1 to state n by at most 1.
Markov Chain for the M/M/1 System
.
Continue
• Accordingly, the transition frequency from
n to n+1 is equal to that from n+1 to n.
Pi ,i 1 0
Pi ,i 1 0
Continue
• So
Pn Pn 1
Pn 1 Pn
/
n 1
Pn 1 P0
Continue