OMNeT++ order of iteration variables

This entry was posted by on Thursday, 10 March, 2011 at

Say you are running a set of (rather lengthy) experiments for several iteration
variables (numHosts and packetsPerSecond for instance) and want to have several
replications per scenario for statistical significance (which is usually a nice idea).

Now, you want to get a quick indication how the simulation is going, and have statistical significance increase as the number of runs increases. How to do this?

Standard, omnetpp runs a the iteration variables in the order in which they appear in omnetpp.ini:

numHosts = ${numHosts=2..100}
packetsPerSecon = ${pps = 5,50,500,5000J}

And runs each scenario a total of ‘repetitions’ times before going on to the next numHosts,
packetsPerSecond pair.

So you want to change this order, first visit all scenarios once, and then
repeat this for as many repetitions as we want. In effect, we will get
results quickly and they will improve as more repetitions are carried
out and statistical significance increases.

An excellent reply by Rudolf Hornig on the OMNeT++ Google group:

By default omnet uses the repetition counter as the inner most loop (as you
already know), but you can define your own repetition counter like:

seed-set= ${myrepetition=0..99}
**.numHosts = ${nh=0..5}
**.packetsPerSecond = ${pps=5,50,500,5000}

Note that you should NOT use the ‘repeat’ config key here (so omnet will
think you are doing only a single repetition) and the seed-set must be the
first key with variable def. This way you run each tuple with several
different seeds.

Take care during the analysis that you should average your values for
different myrepetition values.

ps: actually setting *repetition=10* is the same as placing *seed-set=
${repetition=0..9} *at the end of the config section.

Leave a Reply