OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000130OMNeT++simulation kernelpublic2010-01-11 16:492010-05-14 14:54
0000130: Request for the addition of new probability distributions in the next version of OMNeT++ release
The following two new distributions have been implemented in the attached zip file (i.e., patches for "include/distrib.h", "src/sim/", and "src/sim/"):
- Truncated log normal (trunc_lognormal)
- Truncated pareto (trunc_pareto)

Because these functions are critical for some of recently proposed HTTP traffic models (including [1]) and the addition of user-defined NED functions are not well documented in the current version of OMNeT++ manual/references, I would like to request the inclusion of them in the next release of OMNeT++.
[1] J. J. Lee and M. Gupta. A new traffic model for current user web browsing behavior. [email protected], Sept. 2007 ("" [^]).
No tags attached.
zip (2,769) 2010-01-11 16:49
Issue History
2010-01-11 16:49kyeongsooNew Issue
2010-01-11 16:49kyeongsooFile Added:
2010-05-10 11:24rhornigNote Added: 0000296
2010-05-10 11:24rhornigStatusnew => feedback
2010-05-14 14:54kyeongsooNote Added: 0000299

2010-05-10 11:24   
I've checked and tried the patch. Unfortunately they are not time limited, and it is very easy for a user to drive these functions into an (almost) endless loop with carelessly chosen parameters.

Is there perhaps runtime limited algorithms for the above distributions?

The other possible solution would be to limit the number of iterations (either globally, or as a parameter to the function (with a default value) and throw an error if the function required more iteration than that number.
2010-05-14 14:54   
As for the time limit in run time, trunc_lognormal() is not different from the existing truncnormal().

Alternative implementations for both the distributions are possible, of course; for example, it can be based on the inverse cumulative distributions as in some R functions ( [^]). However, the said approach needs numerical integration and as such well beyond the scope of this feature request: We may need to implement a separate module for advanced distributions with capabilties like integration/differentiation and resort to OMNeT++ facilities to define new NED functions which are not currently well documented.

The most practical solution in this regard would be what you suggested. In "", we can define a new global constant (e.g., MAX_ITER = 10000) which limits the maximum number of iterations for both truncnormal() and trunc_lognormal().