OMNeT++ Simulation Library 5.0
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 flavours: 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]:
|Random variate generators for continuous distributions. |
|Random variate generators for discrete distributions. |
|Abstract interface for random variate generator classes. More...|
|Abstract interface for random number generator classes. More...|