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?
There are various ways to analyze results without relying on the IDE.
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
There is an excellent tutorial on how to analyze and plot OMNeT++ results using Python: https://docs.omnetpp.org/tutorials/pandas/
Essentially:
- Create a CSV file out of the OMNeT++ result files:
scavetool x *.vec -o measurements.csv
- Read the CSV files with pandas:
results = pd.read_csv('measurements.csv')
- Filter, edit, and plot the data using
pandas
,numpy
, andmatplotlib
as usual
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.
© 2022 - 2024 — McMap. All rights reserved.