Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


IMSL_RANDOMOPT

IMSL_RANDOMOPT

IMSL_RANDOMOPT

The IMSL_RANDOMOPT procedure uses keywords to set or retrieve the random number seed or to select the form of the IMSL random number generator.

The IMSL_RANDOMOPT procedure is designed to allow a user to set certain key elements of the random-number generator functions.

The uniform pseudorandom-number generators use a multiplicative congruential method, or a generalized feedback shift register. The choice of generator is determined by keyword GEN_OPTION. The chapter introduction and the description of IMSL_RANDOM may provide some guidance in the choice of the form of the generator. If no selection is made explicitly, the generators use the multiplier 16807 without shuffling. This form of the generator has been in use for some time (Lewis et al. 1969).

Keyword SET is used to initialize the seed used in the IDL Advanced Math and Stats random-number generators. See the chapter introduction for details of the various generator options. The seed can be reinitialized to a clock-dependent value by calling IMSL_RANDOMOPT with SET set to zero.

A common use of keyword Set is in conjunction with the keyword Get to restart a simulation. Keyword Get retrieves the current value of the “seed” used in the random-number generators.

If keyword SUBSTREAM_SEED is set, IMSL_RANDOMOP determines another seed, such that if one of the IMSL multiplicative congruential generators, using no shuffling, went through 100,000 generations starting with SUBSTREAM_SEED, the next number in that sequence would be the first number in the sequence that begins with the returned seed.

Note that SUBSTREAM_SEED works only when a multiplicative congruential generator without shuffling is used. This means that either the routine IMSL_RANDOMOPT has not been called at all or that it has been last called with Gen_Option having a value of 1, 3, or 5.

For many IMSL generators for nonuniform distributions that do not use the inverse CDF method, the distance between sequences generated starting with SUBSTREAM_SEED and starting with returned seed may be less than 100,000. This is because nonuniform generators that use other techniques may require more than one uniform deviate for each output deviate.

The reason that one may want two seeds that generate sequences a known distance apart is for blocking Monte Carlo experiments or for running parallel streams.



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us