How to edit the source code of Omnet++?

大城市里の小女人 提交于 2019-12-08 09:47:49

问题


When I run Omnet++, it loads .ini and .ned files, and performs a simulation and writes the results in .sca and .vec file.

However I want to modify the source code such that while Omnet++ is running, it loads the input files like every 100 msec and also writes the results after that interval.

How should we modify the code? Is there any other way to update .ini and .ned file while the simulation is in progress without changing the source code?


回答1:


Both modifying a running simulation and accessing a simulation's results while it is still running are possible by writing additional model code. This code would be responsible for changing module parameters, instantiating modules on the fly, and collecting results (all in reaction to external stimuli). See this question for how to change parameters and the User Manual's Section 4.13 ("Dynamic Module Creation") and Section 4.15.6 ("Writing Result Filters and Recorders") for the latter.



来源:https://stackoverflow.com/questions/31418184/how-to-edit-the-source-code-of-omnet

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!