● RANDOM - accepts an integer argument i and returns random real value distributed uniformly between 0 and 1. If the passed argument is not zero, then a new sequence of random values, whose seed is the parameteri
, is initialized.
Syntax: random(i)
Since the Simulation tool always initiates a session with the same seed for random functions, two consecutive executions behave identically. The advantage is that you can reconstruct a particular execution scenario. New scenarios are produced by providing different seeds.
● RAND_EXPONENTIAL - accepts a real argument and returns random real values distributed exponentially by the valuet
. Using the syntaxx:=rand_exponential(t)
makex
equal to a randomly generated number. The syntaxx:=random_exponential(t)
is accepted, but it makes x=the first value in an array calledrandom_exponential
.
Function: X ~ exp(t)
Syntax: random_exponential(t)
● RAND_BINOMIAL - accepts two arguments n and p, wheren>0
and0<p<1
. The returned random values are real number distributed according to a binomial distribution.
Function: X ~ B(n,p)
Syntax: rand_binomial(n,p)
● RAND_POISSON - accepts a real argument r. The returned random values are integers distributed according to a poisson distribution.
Function: X ~ P(r)
Syntax: rand_poisson(r)
● RAND_UNIFORM - accepts two real argumentsa
andb.
The returned random values are real values distributed according to a uniform distribution in the interval[a,b
].
Function: X ~ U[a,b]
Syntax: rand_uniform(a,b)
● RAND_IUNIFORM - same as rand_uniform except thata
andb
are integers and the value returned is an integer in the interval [a,b].
Function: X ~ U[a,b]
Syntax: rand_iuniform(a,b)
● RAND_NORMAL - accepts two real argumentsa
andb
. The returned random values are real values distributed according to a normal distribution.
Function: X ~ N[a,b]
Syntax: rand_normal(a,b)