next up previous contents index
Next: Miscellaneous Up: Structure of DEVS++ Previous: [e]xit   Contents   Index


Random Variable

DEVS++ modified the random number generator that was provided with the ADEVS engine [Nut00] in 2004. rv class defined in RNG.h is a random variable whose default constructor rv() sets its seed number as the current time. There are four probability density functions that can be used to select a random number: uniform, triangular, exponential, normal.
  1. uniform(a,b) returns a random number having a uniform PDF over the closed interval [a,b].

  2. triangular(a,b,c) returns a random number having a triangular PDF over the closed interval [a,b] with mode c, where c in [a,b].

  3. exp(m) returns a random number having an exponential PDF with mean m.

  4. normal(m,s) returns a random number having a normal PDF with mean m and standard deviation s.



MHHwang 2007-05-07