Sandia National Laboratories

# rng

Selection of a random number generator

Specification

- Alias: None

- Arguments: None

- Default: Mersenne twister ( mt19937 )

Child Keywords:

Required/Optional | Description of Group | Dakota Keyword | Dakota Keyword Description
--- | --- | --- | ---
Required (Choose One) | RNG Algorithm | mt19937 | Generates random numbers using the Mersenne twister
rnum2 | Generates pseudo-random numbers using the Pecos package

Description

The `rng` keyword is used to indicate a choice of random number generator.

Default Behavior

If specified, the `rng` keyword must be accompanied by either `rnum2` (pseudo-random numbers) or `mt19937` (random numbers generated by the Mersenne twister). Otherwise, `mt19937`, the Mersenne twister is used by default.

Usage Tips

The default is recommended, as the Mersenne twister is a higher quality random number generator.

Examples

    method
      sampling
        sample_type lhs
        samples = 10
        seed = 98765
        rng rnum2

## Exceptional service in the national interest

© 2023 National Technology and Engineering Solutions of Sandia, LLC. | Questions & Comments | Privacy & Security

Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA-0003525.