In order to reproduce the stochastic processes in the system (e.g., arrival
processes, service processes) using events it is necessary to generate random
variables for time stamps according to a pre-defined distribution function,
possibly taking the system state into consideration. The simulation library
offers a number of distributions.
Generating Random Numbers
The generation of random variables from a
distribution function is based on the generation of pseudo-random number
sequences with a large period following a uniform distribution between 0 and
Some classes have been derived from
that serve as random number
generators. In most cases they override the index operator
and return a random number between 0 and 1:
is a relatively simple but
generally sufficient generator . A global instance
this type is generated that is used as the default random number generator
for the system.
Random variables needed for the simulation are generated based on these
random numbers and a specific distribution function (e.g., for random service
times or arrival intervals). The distribution function must be inverted (Fig.
1), which in some cases can be done exactly, in other cases only
approximately . The task of inversion is executed by the distribution
Creating a random number according to a certain distribution
Structure and Interface of Distribution Classes
classes are derived from the class
, which has the following
a final reference
to the its random number generator, which will
by default be initialized with a reference to the system default random
number generator (see
Basically, discrete and continuous distributions are treated differently.
They are represented by the classes
have been derived from
 S. K. PARK, K. W. MILLER:
"Random number generators: good ones are hard to find." Communications of the
ACM, pp. 1192-1201, Oct. 1988.
 A. M. LAW, W. D. KELTON: Simulation Modeling & Analysis, 2nd edition,
McGraw- Hill, 1991