5

I have run a VEINS/OMNET++ simulation using Cmdenv. Usually I used OMNET++ IDE to run simulation and would analyze the results within IDE. But now the results are on a server, is there any easier(convenient) way to analyze the results without importing it into OMNET++ IDE?

aaa
  • 435
  • 8
  • 22

4 Answers4

6

There are various ways to analyze results without relying on the IDE.

  • One example would be to use R and the omnetpp Package. There is also an extensive tutorial explaining how to install and use the package.
  • Another way could be to write a parser for .scaand .vecfiles in Python and then analyze the files using SciPy.
floxyz
  • 686
  • 4
  • 9
2

The best solution is to write an R script using omnetpp package, this is what i am currently doing, for the same purpose.

Under your server you can install R, then run the script with Rscript command

HanniBaL90
  • 535
  • 6
  • 18
1

There is an excellent tutorial on how to analyze and plot OMNeT++ results using Python: https://docs.omnetpp.org/tutorials/pandas/

Essentially:

  1. Create a CSV file out of the OMNeT++ result files: scavetool x *.vec -o measurements.csv
  2. Read the CSV files with pandas: results = pd.read_csv('measurements.csv')
  3. Filter, edit, and plot the data using pandas, numpy, and matplotlib as usual
stefanbschneider
  • 5,460
  • 8
  • 50
  • 88
0

There is another option if you are familiar with SQL query: Change the setting in the config file omnetpp.ini to export the result vector file to .sqlite format instead of the normal .vec extension. This can be done following the instruction from Omnet++'s guide.

The database schema is quite straightforward, which can be seen from any Sqlite Db Browser tool or from the Apendix section of the same Omnet++ guide.

With the output .sqlite file, you can use any language supportting sqlite of your choice to query and analyze on that data file. Python also has a built in sqlite3 module that worked quite well.

Hugo Tran
  • 11
  • 3