0
votes

I am using a non-scalar parameter for my parameter study:

*.server.serviceTime = ${B=exponential(20ms), exponential(35ms)}

However, compared to the other scalar parameters, the B parameter is not shown in the Browse Data section of the results, which I was using until now to export the results of my parameter study:

enter image description here

How can I record the parameter of the exponential distribution (B) that I'm using?

The serviceTime is declared in the .ned as follows:

volatile double serviceTime @unit(s);
3

3 Answers

1
votes

If I'm not mistaken you would like to record the mean value of the exponential distribution. Here is an example how the PureAlohaExperiment sample does this:

[Config PureAlohaExperiment]
...
Aloha.numHosts = ${numHosts=10,15,20}
Aloha.host[*].iaTime = exponential(${mean=1,2,3,4,5..9 step 2}s)

i.e. put the interation variable inside the exponential function.

0
votes

You may put in a NED module a parameter called B. Then, you do the following in the omnetpp.ini:

**.B = ${B=exponential(20ms), exponential(35ms)}

Finally, you record the B NED parameter in the finish() function:

recordScalar("B", par("B"));
0
votes

There is an option param-record-as-scalar for saving parameter as a scalar. An example of using it:

*.server.serviceTime.param-record-as-scalar = true

However, it doesn't work for volatile parameters (there is an error during finishing simulation). It seems that it is intentionally behaviour to avoid registering "meaningless" random values.

If you really need current random value of volatile parameter, you should record it as a new scalar just after reading it, for example:

double serviceTime = par("serviceTime").doubleValue();
recordScalar("serviceTime 1", serviceTime);
// ... later
serviceTime = par("serviceTime").doubleValue();
recordScalar("serviceTime 2", serviceTime);