functionRNG_MRG

Multiple recursive generator implementing the equation i = mod( sum(a*i) + c, m)

Extends from Noise.Utilities.Interfaces.SampleBasedRNG (The interface for sample based random number generators).

Inputs

TypeNameDefaultDescription
Modelica.SIunits.Timeinstance (from InputOutput)The current time for an arithmetic random number generator
Integerstates_in (from InputOutput)The discrete states for a recursive random number generator
Integera{1071064, 0, 0, 0, 0, 0, 2113664}The multiplier for the linear congruential generator
Integerc0The increment for abstracting linear congruential generators
Integerm2147483629The modulus for the multiple recursive generator

Outputs

TypeNameDefaultDescription
Realrand (from InputOutput)The random number with a uniform distribution on the interval [1,0]
Integerstates_out (from InputOutput)The new states of a recursive random number generator

Revisions

Developed 2014 at the DLR Institute of System Dynamics and Control