Search code examples
omnet++

How can I send packets with intervals in lognormal distribution in OMNeT++?


I want to generate packets in lognormal distribution in OMNeT++. I tried:

**.node_1.AppSource[0].sendInterval =  lognormal(0.5,0.7)

However, it gave the error:

Cannot evaluate parameter 'sendInterval': Cannot convert unit none to 's' (second)

I see that only uniform, exponential, normal and truncnormal distributions have SimTime version. The other distributions like lognormal are in SIM_API double, so they don't have a unit.

How can I send packets with intervals in lognormal distribution in OMNeT++?


Solution

  • Yes, it is true that lognormal does not accept a unit in arguments.
    However, one may use the following workaround to obtain random value with the unit:

    **.node_1.AppSource[0].sendInterval = lognormal(0.5, 0.7)*1s