gams:random_number_generator_in_gams

GAMS has these random number generator functions:

`num = uniform(low,high)`

: Uniform random number between`Uniform(low,high)`

`num = uniformint(low,high)`

: Uniform integer random number between`UniformInt(low,high)`

`num = normal(mean,std)`

: Random number from a normal distribution with a mean of mean and a standard deviation of std

The random numbers in GAMS are not truly random, they are pseudo-random, generated using a deterministic algorithm (called a generator) inside GAMS. If you want different random numbers on each run, you must reseed the generator.

You may use something like: `execseed = 1 + gmillisec(jnow); `

IMPRESSUM / LEGAL NOTICE
PRIVACY POLICY
gams/random_number_generator_in_gams.txt · Last modified: 2013/01/16 16:13 by support