Analysing and Plotting OMNET++ results
Asked Answered
E

4

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?

Erose answered 20/1, 2016 at 18:59 Comment(0)
R
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.
Ruisdael answered 21/1, 2016 at 8:52 Comment(0)
B
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

Badgett answered 21/1, 2016 at 10:56 Comment(0)
T
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
Techy answered 3/8, 2018 at 8:53 Comment(0)
D
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.

Danelaw answered 3/7, 2022 at 18:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.