Repeating a simulation many times. Does omnrt++ have any features automate it?

1,762 views
Skip to first unread message

Niv Asp

unread,
Jul 11, 2012, 3:39:03 PM7/11/12
to omn...@googlegroups.com
For my simulation experiment I want to repeat my simulation around 100 times. Is there any method to make these 100 simulations run one after the other automatically? Also, I want to collect the results of each simulation run. Does omnet++ support such automated simulation (with data collection for each run)?

Mani Amoozadeh

unread,
Jul 11, 2012, 5:56:53 PM7/11/12
to omn...@googlegroups.com
You can use the command-line environment of omnet, to run your simulation several times, one after another.
you should use the following configuration in your ini file. This specifies, how many times the simulation should be repeated.

repeat = 100

Note that you should have a good reason to repeat your simulation for several times. for example you are changing a parameter or change the initial Seed in each run.
check this section in omnet++ manual:


and for the result recording, you can write your own code in C++ to write the results in a file or use the built-in features of omnet++.

12 Result Recording and Analysis

taylorliu

unread,
Aug 1, 2012, 7:58:47 AM8/1/12
to omn...@googlegroups.com
Hello, I also want to repeat my simulation many times. I set 'repeat =10' ,but the simulation only runs one times. Have you repeated successffully? If yes, can you tell me? Thank you very much.

Rudolf Hornig

unread,
Aug 1, 2012, 9:08:53 AM8/1/12
to omn...@googlegroups.com
from command line you MUST run your simulation withe the opp_runall command. From the IDE, you must select Cmdenv in the launch dialog. As usual, you should read the manual and user guide...

i.e. in addition to the above mentioned topics, read also UserGuide:6.4 Btach Execution

Márcio Brito Barbosa

unread,
Aug 2, 2012, 9:59:44 AM8/2/12
to omn...@googlegroups.com
Hello Niv,
To run the one simulation after another automatically in the IDE you have to do the steps that I put in these pictures... The first picture shows how to change some parameter in each simulation, using the key ${parameter1, parameter2, ...}. The second one shows how to run the simulation in a specific number of times.

1- Click on the arrow next to the "green player"
2- Choice "Run configurations"
3- Set the "User interface" as "Command line"
4- Put in the box "Run number" the number of simulations that you want to do
(clue: if you want to do 100 simulations, you don't need to put 1, 2, 3, ..., until 100... just put 1..100)

For each simulation, will be created a ".vec" and a ".sca".

[]'s
forum1.png
forum2.png
forum3.png

N.omar

unread,
Jun 5, 2013, 5:31:43 PM6/5/13
to omn...@googlegroups.com
Thank you , you are helpful 
 But I applied your steps and i get an error said : the run number(1..4) is greater than the 
run number (1) of this configration 
 what i should do ???! 
Reply all
Reply to author
Forward
0 new messages