CNCL provides a variety of random number generators, ranging from the very simple linear congruence generator to more sophisticated ones. Also included is a random number generator which reads random data from a file. The generator classes are:
Random numbers are a crucial base of every simulation; most of the pseudo random number generators included in CNCL have their faults and shortcomings. The base random number generators are used by the random distribution classes to generate random numbers with the desired distribution. For futher information refer to the description of the generator you are interested in. Here you can learn something about seed selection in general. The cited references, also the references of the generator-sections, are collected here.
Seed Selection
Due to Lewis and Orav [4] there are some aspects to consider when selecting the seeds for the generators: Ordinarily, the seed value used to initialize a random number generator should not affect the results of the simulation. However, a wrong combination of a seed and a random generator may lead to erroneous conclusions. If the generator has a full period and only one random variable is required, any seed value is as good as any other. However, considerable care is required in selecting seeds for simulations requiring random numbers for more than one variable. Such simulations are called multistream simulations. Some guidelines to follow:
Memory Requirements
For each instance of the generator (on 32bit machines)
Period Length
Evaluation
| Randomness | Period | Performance | Memory | | Length | | Requirements ------|------------|----------|-------------|--------------- LCG | + | + | +++++ | +++++ MLCG | ++ | ++ | + | ++++ ACG | +++ | 1) | ++ | + FiboG | +++++ | +++++ | +++ | ++ TausG | ++ | - | ++++ | +++ ------------------------------------------------------------ 1) depends on table size
Performance evaluation took place on Sun workstations, results for other processors may differ.
Implementation Details
If you are interested in implementation details of the random number generators Press, Vetterling, Teukolsky and Flannery [14], especially chapter 7, may be an interesting first reading. (e.g. Schrage's algorithm is described and a quick and dirty way to convert two longs into one double distributed between zero and 1).
References
[1] Knuth, D.E. Seminumerical Algorithms. 2nd ed., vol.2 of The Art of Computer Programming, Chapter 3, Addison-Wesley, Reading MA, 1981.
[2] Park, S.K., and Miller, K.W., Communications of the ACM, vol.31, pp. 1192-1201, 1988.
[3] Schrage, L., ACM Transactions on Mathematical Software, vol.5, pp. 132-138, 1979.
[4] Lewis, P.A.W, and Orav, E.J. Simulation Methodology forStatisticians, Operations Analysts, and Engineers. vol.1 pp. 88-97, Wadsworth & Brooks/Cole, 1989.
[5] Fishmann, G. and Moore, L. An Exhaustive Analysis of Multiplicative Congruential Random Number Generators with Modulus 2^31-1. SIAM Journal of Scientific and Statistical Computing, 7(1), pp. 24-45, 1985.
[6] L'Ecuyer, P. Efficient and Portable Combined Random Number Generators. Communications of the ACM, vol. 31 (6), pp. 742-774, 1988.
[7] Jain, R. The Art of Computer Systems Performance Analysis: Techniques for Experimental Design, Measurement, Simulation, and Modeling. Chapter 26, John Wiley & Sons, Inc., 1991.
[8] Lehmer, D.H.: Mathematical Methods in Large-Scale Computing Units. Ann. Comput. Lab. Harvard Univ., 26, pp. 141-146, 1951.
[9] Marsaglia, G., Zaman, A. and Tsang, W.-W., Stat. Prob. Lett. 9, 35, 1990.
[10] James, F. A review of pseudorandom number generators. Computer Physics Communication 60, pp. 329-344, North Holland, 1990.
[11] Richter, M. Ein Rauschgenerator zur Gewinnung von quasi-idealen Zufallszahlen fuer die stochastische Simulation. PhD thesis, Aachen University of Technology, 1992.
[12] Tausworthe, R. C. Random Numbers Generated by Linear Recurrence Modulo Two. Math. Comput. 19, pp. 201-209, 1965.
[13] Law, A.M., Kelton, W.D. Simulation Modeling & Analysis. Chapter 7, McGraw Hill, 1991.
[14] Press, W.H., Vetterling, W.T., Teukolsky, S.A., Flannery, B.P. Numerical Recipes in C - The Art of Scientific Computing. 2nd ed., Cambridge University Press, 1994.
Links to more information about random number generators:
Go to the first, previous, next, last section, table of contents.