randExp

Works with VSimBase, VSimEM, VSimPD, VSimPA, and VSimVE licenses.

Creates a random sequence distributed according to the exponential probability density function:

\[\begin{split}f(x) = \left\{ \begin{array}{lr} \frac{1}{\mu} \exp\left(- \frac{x}{\mu}\right) & , \ x \ge 0 \\ 0 & , \ x < 0 \end{array} \right.\end{split}\]

where \(\mu > 0\) is the mean.

randExp Parameters

mean (float)

The mean.

seed (integer)

Random number seed.

numberSequence (code block, optional)

An NAFunc code block, <NAFunc numberSequence> generates a random number; if not specified, Vorpal’s default random number generator (uniform in [0,1)) will be used to generate the initial random number.

Example randExp Block

<NAFunc velocitySequence_0>
  kind = randExp
  mean = 1.0
</NAFunc>