Random
SourcesGenerates pseudo-random numbers using a deterministic PRNG (xorshift64). Supports uniform and gaussian distributions. Same seed produces identical sequences.
Mathematical Model
Implemented via xorshift64 pseudorandom number generator with configurable seed. Identical seeds always produce identical sequences.
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| ← Out | out |
Out | number | Output |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
distribution |
Distribution | select | uniform |
|
minimum |
Minimum | number | 0 |
|
maximum |
Maximum | number | 1 |
|
mean |
Mean | number | 0 |
|
stdDev |
Std Dev | number | 1 |
|
seed |
Seed | number | 12345 |
Usage Examples
- Zie de ingebouwde voorbeelden in de handleiding voor een demonstratie van dit blok.
Remarks & Best Practices
- Deterministic: The same seed always produces the identical sequence — useful for reproducible simulations
- Seed 0: Uses system entropy for initialization (truly non-deterministic start)
- Gaussian distribution: Use for sensor noise, measurement uncertainty, and Monte Carlo analysis
- Uniform distribution: Use for dithering, initial conditions, and stochastic rounding
- Performance: xorshift64 is extremely fast; thousands of independent RNG blocks can run in parallel
Related Components
- SignalGenerator: Deterministic periodic signals (sine, square, etc.)
- Constant: Fixed constant value