本文介绍了如何在OMNeT ++模拟过程中更改网络配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在模拟运行期间修改OMNeT ++中元素的 .ini 文件的一些参数,比如节点的传输速率。当节点接收到一些控制消息时。

I want to modify some parameters of element's .ini file in OMNeT++, say a node's transmission rate, during the simulation run, e.g. when a node receives some control message.

我发现有可能以某种方式循环配置,如下所示: some_variable = $ { },但在 .ini 文件中没有条件语句,并且没有办法将这些文件传递给C ++函数的任何数据(就我而言)。

I found information saying that it's possible to somehow loop the configuration stated as: some_variable = ${several values}, but there are no conditional clauses in .ini files and no way to pass to those files any data from C++ functions (as far as I'm concerned).

我使用INET,但也许其他一些模型的用户已经困扰着这样的问题。

I use INET, but maybe some other models' users already bothered with such a problem.

推荐答案

虽然您当然可以手动更改,OMNeT ++(据我所知)在运行时不提供自动更改参数的集成支持。

While you can certainly manually change volatile parameters, OMNeT++ (as far as I am aware) offers no integrated support for automatic changing of parameters at runtime.

但是,您可以编写一些模型代码。

You can, however, write some model code that changes volatile parameters programatically.

这篇关于如何在OMNeT ++模拟过程中更改网络配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-24 21:33