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
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.SIunits.Time | instance (from InputOutput) | The current time for an arithmetic random number generator | |
| Integer | states_in (from InputOutput) | The discrete states for a recursive random number generator | |
| Integer | a | {1071064, 0, 0, 0, 0, 0, 2113664} | The multiplier for the linear congruential generator |
| Integer | c | 0 | The increment for abstracting linear congruential generators |
| Integer | m | 2147483629 | The modulus for the multiple recursive generator |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | rand (from InputOutput) | The random number with a uniform distribution on the interval [1,0] | |
| Integer | states_out (from InputOutput) | The new states of a recursive random number generator |
Revisions
Developed 2014 at the DLR Institute of System Dynamics and Control