OMNeT++ Simulation Library  6.0.3
Random Number Generation

Description

Distributions

The simulation library provides support for generating random variates from various continuous and discrete distributions: uniform, exponential, normal, truncated normal, gamma, beta, Erlang, Weibull, Bernoulli, binomial, geometric, Poisson, and more.

Generators come in two flavors: as plain functions (taking an RNG and the parameters of the distribution as arguments), and as classes that subclass cRandom and encapsulate both the RNG and the parameters of the distribution.

Random number generators

OMNeT++ provides several random number generators (streams) and several random number generator algorithms (default is cMersenneTwister). RNGs can be configured in omnetpp.ini. RNGs are made available via the cRNG interface, and the cModule::getRNG() method. All functions returning random variates, etc. internally call cModule::getRNG() and cRNG::intRand(), cRNG::doubleRand().

Note: The documentation of individual functions may refer to the following publications as [LawKelton] or [Banks]:

Modules

 Utility functions
 Utility functions.
 
 Continuous Distributions
 Random variate generators for continuous distributions.
 
 Discrete Distributions
 Random variate generators for discrete distributions.
 

Classes

class  cRandom
 Abstract interface for random variate generator classes. More...
 
class  cRNG
 Abstract interface for random number generator classes. More...