在 Omnet++ 中记录非标量参数 [英] Record non-scalar parameter in Omnet++

查看:63
本文介绍了在 Omnet++ 中记录非标量参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在参数研究中使用了非标量参数:

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

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

然而,与其他标量参数相比,B 参数未显示在结果的 Browse Data 部分中,我一直使用它来导出我的参数研究结果:

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:

如何记录我正在使用的指数分布 (B) 的参数?

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

serviceTime.ned 中声明如下:

volatile double serviceTime @unit(s);

推荐答案

如果我没记错的话,您想记录指数分布的平均值.以下是 PureAlohaExperiment 示例如何执行此操作的示例:

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.

这篇关于在 Omnet++ 中记录非标量参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆