next up previous contents index
Next: C++ Support Up: 20. Mathematical Support Previous: 20. Mathematical Support

20.1 Random Number Generation

The RNG class contains an implementation of the minimal standard multiplicative linear congruential generator of Park and Miller [#!Park88:Random!#].

Multiple instances of the RNG class can be created to allow a simulation to draw random numbers from independent random number streams. For instance, a user who wants to generate the same traffic (based on some random process) in 2 different simulation experiments that compare different dropping algorithms that are themselves based on random processes may choose to base the traffic generation on one random number stream and the dropping algorithms on another stream. However, when using multiple RNG objects in a simulation care should be taken to insure that they are seeded in such a way as to guarantee that they produce independent, high-quality streams of random numbers. We describe approaches to seed the RNG below.

Most users will be satisfied with a single instance of the RNG. Hence, a default RNG, created at simulator initialization time, is provided.