The OMNeT++ IDE can help you to analyze your results. It supports filtering, processing and displaying vector and scalar data, and can display histograms, too. The following diagrams have been created with the Result Analysis tool of the IDE.
results directory in the project folder contains .vec and .sca files, which are the files that store the results in vector and scalar form, respectively. Vectors record data values as a function of time, while scalars typically record aggregate values at the end of the simulation. To open the Result Analysis tool, double click on either the .vec or the .sca files in the OMNeT++ IDE. Both files will be loaded by the Result Analysis tool. You can find the
Browse Data tab at the bottom of the Result Analysis tool panel. Here you can browse results by type by switching the various tabs at the top of the tool panel, ie. Scalars, Vectors, or Histograms. By default, all results of a result type are displayed. You can filter them by the module filter to view all or some of the individual modules, or the statistic name filter to display different types of statistics, ie. mean, max, min, standard deviation, etc. You can select some or all of the individual results by highlighting them. If you select multiple results, they will be plotted on one chart. Right click and select Plot to display the figures.
docdirectory of the OMNeT++ installation).
Our last model records the
hopCount of a message each time the message reaches its destination. The following plot shows these vectors for nodes 0 and 1.
If we apply a
mean operation we can see how the
hopCount in the different nodes converge to an average:
The next chart displays the mean and the maximum of the
hopCount of the messages for each destination node, based on the scalar data recorded at the end of the simulation.
The following diagram shows the histogram of
The OMNeT++ simulation kernel can record the message exchanges during the simulation into an event log file. To enable recording the event log, you must specify record-eventlog = true in omnetpp.ini. Alternatively, you can click on the
Record button in the graphical runtime environment. This log file can be analyzed later with the Sequence Chart tool. The
results directory in the project folder contains the
.elog file. Double clicking on this in the OMNeT++ IDE opens the Sequence Chart tool, and the event log tab at the bottom of the screen.
The following figure has been created with the Sequence Chart tool, and shows how the message is routed between the different nodes in the network. In this instance the chart is very simple, but when you have a complex model, sequence charts can be very valuable in debugging, exploring or documenting the model's behaviour.
Hope you have found this tutorial a useful introduction into OMNeT++. Comments and suggestions will be appreciated.