Lectures 4+5
Lectures 4+5
Modeling
Lecture #4
• Verification
is concerned with determining whether the “assumptions document” has
been
correctly translated into a computer “program,” i.e., debugging the
simulation computer program.
• Validation
is the process of determining whether a simulation model is an accurate
representation
of the system
• Credibility
if the manager and other key project personnel accept them as
“correct.” ,so,
a simulation model and its results have credibility
INTRODUCTION (Continued)
• Do not have more detail in the model than is necessary to address the issues of
interest.
• The level of model detail should be consistent with the type of data available
• In virtually all simulation studies, time and money constraints are a major factor
in
determining the amount of model detail.
• If the number of factors (aspects of interest) for the study is large, then use a
“coarse” simulation model or an analytic model.
VERIFICATION OF SIMULATION COMPUTER PROGRAMS
• we will discuss eight techniques that can be used to debug the computer
program of a simulation model
• Technique 1
The simulation model’s main program and a few of the key subprograms
should be written and debugged first,
Next, additional subprograms or levels of detail should be added and debugged successively.
This will lead to developing a model that satisfactorily represents the system under study
VERIFICATION OF SIMULATION COMPUTER PROGRAMS
(Continued)
• Technique 2
The subprograms’ developer goes through the programs but does not
proceed
from one statement to another until everyone in the modeling team is
convinced that a statement is correct.
VERIFICATION OF SIMULATION COMPUTER PROGRAMS
(Continue..)
• Technique 3
One of the most powerful techniques that can be used to debug a DES
program is a “trace.”
In a trace, the state of the simulated system (the contents of the event list, the
state variables, certain statistical counters, etc.,) are
displayed just after each event occurs and are compared with hand
calculations to see if the program is operating as intended.
• Technique 5
• Technique 6
With some types of simulation models, it may be helpful to
observe an animation of the simulation output
• Technique 7
Compute the sample mean and sample variance for each
simulation input probability distribution, and compare them
with the desired (e.g., historical) mean and variance.
This suggests that values are being correctly generated from
these
distributions (gamma and Weibull distributions)
VERIFICATION OF SIMULATION COMPUTER PROGRAMS
(Continue..)
• Technique 8
Detailed descriptions of each subsystem in bullet format and how these subsystems
interact.
Then numerical statistics or graphical plots for the model that is currently of interest can be
informally compared with the comparable statistics or graphical plots from the other
model.
• the modulus
• , the multiplier
• , the increment
• the seed
• Therefore, 0 ≤ Zi ≤ m - 1, and to obtain the desired random numbers Ui (for i = 1, 2, . .
. ) on [0, 1], we let Ui = Zi/m.
• It’s worth mentioning that the above is pseudo random as long as m is finite (and it
surely is). One way to approach true randomness is to take m to be at the largest
possible value.
Maximizing the span of U[0,1]
• THEOREM 7.1. The LCG defined above has full period if and only if the following three
conditions hold:
• (a) The only positive integer that (exactly) divides both m and c is 1. (relatively prime)
• (b) If q is a prime number that divides m, then q divides a - 1.
• (c) If 4 divides m, then 4 divides a - 1.
• For a 64-bit processor, m could be as large as .
prime modulus multiplicative LCGs (PMMLCGs)
• Multiplicative LCGs are advantageous in that the addition of c is not
needed; i.e., c=0.
• Instead of letting m = , it was proposed that m be the largest prime
number that is less than .
• For example, in the case of b = 31, the largest prime that is less than
is, very agreeably, - 1 = 2,147,483,647.
• Please do a search for the largest prime number * that is less than .
• Now for m prime, it can be shown that the period is m - 1 if a is a
primitive element modulo m; that is, the smallest integer l for which - 1
is divisible by m is l = m – 1.
• Two particular values of a that have been widely used for the modulus
m* = - 1 are = = 16,807 and = 630,360,016, both of which are
primitive elements modulo m*.
• Please do a search for appropriate values of the multiplier that are
primitive elements modulo **.