OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000130OMNeT++simulation kernelpublic2010-01-11 16:492010-05-14 14:54
kyeongsoo 
 
normalfeaturealways
feedbackopen 
4.0 
 
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/distrib.cc", and "src/sim/nedfunctions.cc"):
- 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 ("http://blogs.intel.com/research/2007/09/a_new_traffic_model_for_curren.php" [^]).
No tags attached.
zip new_distributions.zip (2,769) 2010-01-11 16:49
https://dev.omnetpp.org/bugs/file_download.php?file_id=27&type=bug
Issue History
2010-01-11 16:49kyeongsooNew Issue
2010-01-11 16:49kyeongsooFile Added: new_distributions.zip
2010-05-10 11:24rhornigNote Added: 0000296
2010-05-10 11:24rhornigStatusnew => feedback
2010-05-14 14:54kyeongsooNote Added: 0000299

Notes
(0000296)
rhornig   
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.
(0000299)
kyeongsoo   
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 (http://www.jstatsoft.org/v16/c02/paper [^]). 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 "distrib.cc", 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().