0

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?

user4786271
  • 1,555
  • 13
  • 18
sgk
  • 19
  • 8
  • 1
    what do you refer to by "input files", what is you final goal? you want to change dynamically the models you have designed with OMNeT++, or you want to change the simulation parameters? – user4786271 Jul 15 '15 at 08:20
  • As a input files, I mean to say that the .ini and .ned files. Actually I am trying to update the positions of the nodes(every after 100ms) and this change should be done when the simulation is running and generate the result file after particular time interval. I don't want to generate or delete the models, I just want to change the position(edit the .ned and .ini file and use it in current simulation) of those model during run time. – sgk Jul 15 '15 at 19:35
  • what type of simulation are you trying to run? something related to vehicular networking where nodes are mobile. *I don't want to generate or delete the models*: I think you are mixing **models** and **modules** – user4786271 Jul 16 '15 at 12:58

1 Answers1

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.

Community
  • 1
  • 1
Christoph Sommer
  • 6,893
  • 1
  • 17
  • 35