Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > Functions > Random Functions

NOISE SEED

Scroll Prev Top Next More

 

When the Stream ID passed to the RANDOM functions is zero, they will use the default noise seed.  You can control this by creating a variable in the model (usually a constant) called NOISE SEED.  

If it is not included in a model it is the same as if it had a value of  4487556.

When this variable exists in the model its value is used to initialize the random number stream for any random function using Stream ID 0.  Changing NOISE SEED will then generate alternative noise streams in different simulations. Use an integer between 0 and 2^31 (about 2 billion), or less than 2^24 (about 16 million) in single precision.

Examples

driving error1 = RANDOM NORMAL(0,20,12,5,0)

driving error2 = RANDOM NORMAL(0,20,12,5,0)

Will generate two distinct noise streams with the same statistical characteristics.  Adding

driving error3 = RANDOM TRIANGULAR(0,20,0,5,15,0)

to the same model will change the specific realization of driving error1 and driving error2, because driving error3 will make interleaved draws from the same random number stream. However, the statistical characteristics of each stream will remain the same.

In contrast adding

driving error3 = RANDOM TRIANGULAR(0,20,0,5,15,77)

to the first two equations will leave the first two noise streams unchanged, because it will draw from stream 77 rather than stream 0.

 

See Also:

NOISE SEED in Special Variables