13
A QUICK OVERVIEW OF THE OMNeT++ IDE Introduction The OMNeT++ Integrated Development Environment is based on the Eclipse plat- form, and extends it with new editors, views, wizards, and additional functionality. OMNeT++ adds functionality for creating and configuring models (NED and ini files), performing batch executions, and analyzing simulation results, while Eclipse provides C++ editing, SVN/GIT integration, and other optional features (UML modeling, bug- tracker integration, database access, etc.) via various open-source and commercial plug-ins. The following screenshots introduce the main components of the OMNeT++ IDE. The OMNeT++ IDE, editing a NED file The NED Editor The NED Editor can edit NED files both graphically or in text mode, and the user can switch between the two modes at any time, using the tabs at the bottom of the editor window. 1

A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

Embed Size (px)

Citation preview

Page 1: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEWOF THE OMNeT++ IDE

Introduction

The OMNeT++ Integrated Development Environment is based on the Eclipse plat-form, and extends it with new editors, views, wizards, and additional functionality.OMNeT++ adds functionality for creating and configuring models (NED and ini files),performing batch executions, and analyzing simulation results, while Eclipse providesC++ editing, SVN/GIT integration, and other optional features (UML modeling, bug-tracker integration, database access, etc.) via various open-source and commercialplug-ins.

The following screenshots introduce the main components of the OMNeT++ IDE.

The OMNeT++ IDE, editing a NED file

The NED Editor

The NED Editor can edit NED files both graphically or in text mode, and the user canswitch between the two modes at any time, using the tabs at the bottom of the editorwindow.

1

Page 2: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEW OF THE OMNeT++ IDE

The NED Editor in graphical editing mode

In graphical mode, one can create compound modules, channels, and other componenttypes. Submodules can be created using the palette of available module types. Visualand non-visual properties can be modified in the Properties View, or by dialogs invokedfrom the context menu. The editor offers many features such as unlimited undo/redo,object cloning, constrained move and resize, alignment of objects, and zooming.

Submodules can be pinned (having a fixed position), or unpinned (auto-layout). Graph-ical features that can be edited are background image, background grid, default icons(via display string inheritance), icon sizing and coloring, transmission range, and manyothers.

Properties view

The Properties View lets the user edit graphical and non-graphical properties of objects.Special cell editors facilitate selecting colors, icons, etc. Undo and redo is supportedfor property changes too. The Properties View is also used with other editors like theResult Analysis editor, where it allows the user to customize charts and other objects.

2

Page 3: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEW OF THE OMNeT++ IDE

The NED Editor in source editing mode

Text mode lets the user work with the NED source directly. When hitting Ctrl+Space,the editor offers context-aware completion of keywords and module type, parameter,gate, and submodule names. Template proposals to insert full compound moduleskeletons, submodules, various connection structures, etc. are also available. Docu-mentation of referenced module types can be viewed by hovering over the NED typename. The NED source is continually parsed and validated as the user is typing, anderrors are displayed in real time on the left margin. Syntax highlighting, automaticindentation, and automatic conversion from the OMNeT++ 3.x NED syntax are alsoprovided.

Outline View

The Outline View shows the structure of NED files in both graphical and text editingmode, and allows navigation, as well.

Other Views. The Module Hierarchy View and the NED Parameters View can also beused with the NED Editor (they will display the submodule hierarchy and the parame-ters of the selected module or submodule) – these views will be described with the IniFile Editor. Further related views are the Problems View (which displays errors andwarnings in NED files and other files), and Tasks View (which shows a list of all FIXMEand TODO comments found in NED files and other source files.)

3

Page 4: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEW OF THE OMNeT++ IDE

The Ini File Editor

The Ini File Editor lets the user configure simulation models for execution. It featuresboth form-based and source editing.

Form-based ini file editing

The Ini File editor considers all supported configuration options and offers them inseveral forms, organized by topics. Descriptions and default values are displayed intooltips, which can be made persistent for easier reading. The structure of the ini file(sections and their inheritance tree) is also visualized and editable via drag&drop anddialogs. Validation and content assist (Ctrl+Space) are also provided where needed.The editor supports unlimited undo/redo and automatic conversion from OMNeT++3.x ini files.

The ini file source editor

The text editor lets the user work with the ini file directly, which is more efficientfor advanced users than forms. Unlimited undo/redo, syntax coloring, and completion

4

Page 5: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEW OF THE OMNeT++ IDE

of configuration keys, values, and module parameter patterns (on Ctrl+Space) areprovided. As the user types, the file is continually analyzed and errors/warnings aredisplayed in real time.

The editor considers all NED declarations (simple modules, compound modules, chan-nels, etc.) and can fully exploit this information to provide diagnostics and assistance tothe user. Looking at the network= configuration key, it knows the top-level compoundmodule NED type, and internally builds a static picture of the network by recursivelyenumerating the top-level module's submodules, sub-submodules, sub-sub-submod-ules, etc., and continually relates this information to the ini file contents. Thus, theeditor always knows which ini file keys match which module parameters, which are theini file keys that are unused (will not match anything), and which module parametersare still open (i.e. have no value assigned yet). It displays this information in tooltips,as warnings, and in various views.

The Add Missing Keys dialog

To speed up the process of creating ini files from scratch, the editor offers an AddMissing Keys dialog. After clicking OK, the editor will insert ini file keys for all openNED parameters. The user will only need to supply the values.

Module Hierarchy View

5

Page 6: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEW OF THE OMNeT++ IDE

The Module Hierarchy View displays the submodule hierarchy of the current configu-ration's network, together with the module's parameters. It shows how module para-meters obtain their values (from NED, by applying a NED default value, or from theini file). It is able to resolve simple cases where a submodule type comes from a stringparameter (NED's like keyword). By using the context menu, the user can go to theNED declaration of a module, submodule, parameter, gate, or to the place where aparameter gets its value (in NED or in the ini file).

The View can be pinned to a particular editor to prevent its contents from changingwhen the user switches across NED and ini file editors.

The NED Parameters View

By default, the NED Parameters View displays the table of all unassigned NED para-meters in the current configuration's network and it can be switched over to show allparameters, assigned or unassigned. For assigned parameters, it shows how they ob-tain their values (from NED, by applying a NED default value, or from the ini file). Theuser can open the relevant places in the NED files or the ini file. This View can alsobe pinned.

The Problems View

The Problems View presents errors, warnings, and info messages in NED files, inifiles, and other source files in a unified manner. Double-clicking on an item opens thecorresponding file and goes to the error's location. The view's contents can be filteredin various ways (current file, current project, all projects, by severity, etc).

Other Views. The Outline View displays the list of sections in the current ini file andcan be used for navigation as well.

Simulation Launcher

The OMNeT++ IDE makes it possible to run simulations directly from the integratedenvironment. It is possible to run a simulation as a normal C/C++ application andperform C++ source-level debugging on it. The user can also run it as a standaloneapplication (under Tkenv or Cmdenv) or run batches of simulations where runs dif-fer in module parameter settings or random number seeds (NOTE: an Eclipse-basedruntime environment [“IDEEnv”] does not exist yet; it is planned for future releases).

6

Page 7: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEW OF THE OMNeT++ IDE

The Run dialog showing a simulation launch configuration

In the Eclipse IDE, the various ways of launching a program under development isdescribed by launch configurations. There are various launch configuration types (C/C++ Application, Java Application, etc.). To launch a program for the first time, theuser creates an instance of a launch configuration, fills in a form (program name, com-mand-line arguments, etc.), and hits the Run button. OMNeT++ provides launch con-figuration types for simulations: one extends the normal “C/C++ Local Application”launch type with a Simulation tab (for convenient editing of simulation-related com-mand-line options), and a standalone launch type for launching a simulation or run-ning simulation batches. The former can be used for C++ debugging, as well.

The dialog shows a standalone launch type for the QueueNet example simulation mod-el. Batch simulations can be launched by specifying more than one run number inthe dialog. Ini files allow the user to define various scenarios iterating over a list ofvalues for certain NED parameters, and/or do multiple runs with different seeds. Thelaunch dialog helps the user select the desired run numbers by showing which runscorrespond to which parameters and seed settings.

Multi-processor or multi-core computers can be exploited by specifying that more thanone process may be launched (i.e. may be running) at a time.

Progress View

7

Page 8: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEW OF THE OMNeT++ IDE

The Progress View reports the status of simulation execution when you have a long-running simulation, or you are executing several runs in a batch. It is possible to cancelthe whole batch operation with a single click, if necessary. Simulations run in separateprocesses that do not block the IDE, so users can keep working while their simulationsrun in the background. In the above screenshot, the number of processes to run inparallel was set to 2; run #1 has already terminated (and is no longer shown), run #3has already launched, and run #2 is still running.

Console View

Each running process sends its output to a separate console buffer within the ConsoleView, so the user can review the output after a simulation has finished. One can switchbetween console buffers using the Console View's menu or toolbar, or by double-click-ing on a process in the Debug View.

The Debug View showing three runs in a simulation batch

The Debug View is another one of Eclipse's standard Views, but it is not only usefulfor debugging. While the Progress View only shows currently executing processes, theDebug View displays the ones already terminated, as well, together with their exit codes.Processes are marked with run numbers and launch times for easier identification.Double-clicking an item reveals the process output in the Console View.

Sequence Chart

The OMNeT++ simulation kernel is capable of logging various events during simu-lation: scheduling and canceling self-messages, sending messages, display changes,module and connection creation and deletion, user log messages, etc. The result isan event log file which contains detailed information of the simulation, and later canbe used for various purposes, such as visualizing message exchanges among moduleson a sequence chart. The file format is line-based text to facilitate processing by thirdparty tools.

8

Page 9: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEW OF THE OMNeT++ IDE

A Sequence Chart showing ARP on a wireless network

An event log can be visualized with the Sequence Chart in the IDE. On the SequenceChart, events are represented as nodes, and message send/schedule/reuse operationsas arrows. The chart can be filtered according to modules, message types, and variousother criteria. The chart can also be filtered according to the causes/consequences ofa particular event (this works by following message arrows backward and forward insimulation time). The chart timeline can be displayed in various modes, such as linear(simulation time), compact (non-linear), and event number-based. Other features in-clude sorting of module axes, displaying state vector data on axes (using output vectorfiles), zooming, and special navigation options (bookmarks, zoom to message send,follow message send), and exporting the chart in SVG format.

Both the Event Log Table and the Sequence Chart are capable of efficiently displayingevent log files of several gigabytes without requiring large amounts of memory.

The Event Log View

The Event Log Table displays the content of an event log file recorded during a simula-tion. It supports raw and descriptive notations, line-based filtering for event log entrytypes and various parameters, search for free text, bookmarks, and special navigation

9

Page 10: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEW OF THE OMNeT++ IDE

options such as "go to simulation time" or message arrival. The Event Log Table sup-ports the same filtering as the Sequence Chart.

Scave (Result Analysis)

Scave is the result analysis tool of OMNeT++ and its task is to help the user processand visualize simulation results saved into vector and scalar files. Scave is designedso that the user can work equally well on the output of a single simulation run (oneor two files) and the result of simulation batches (which may be several hundred files,possibly in multiple directories). Ad-hoc browsing of the data is supported in additionto systematic and repeatable processing. With the latter, all processing and charts arestored as “recipes”. For example, if simulations need to be re-run due to a model bugor misconfiguration, existing charts do not need to be drawn all over again. Simplyreplacing the old result files with the new ones will result in the charts being automat-ically displayed with the new data.

Scave is implemented as a multi-page editor. What the editor edits is the “recipe,” whichincludes what files to take as inputs, what data to select from them, what (optional)processing to apply, and what kind of charts to create from them. The pages (tabs) ofthe editor roughly correspond to these steps. You will see that Scave is much morethan just a union of the OMNeT++ 3.x Scalars and Plove tools.

Specifying input files for data analysis

The first page displays the result files that serve as input for the analysis. The upperhalf specifies what files to select, by explicit filenames or by wildcards. The lower halfshows what files actually matched the input specification and what runs they contain.Note that OMNeT++ result files contain a unique run ID and several metadata anno-tations in addition to the actual recorded data.  The third tree organizes simulationruns according to their experiment—measurement—replication labels.

The underlying assumption is that users will organize their simulation-based researchinto various “experiments”. An experiment will consist of several “measurements”,which are typically (but not necessarily) simulations done with the same model butwith different parameter settings; that is, the user will explore the parameter spacewith several simulation runs. To gain statistical confidence in the results, each mea-surement will be possibly repeated several times with different random number seeds.It is easy to set up such scenarios with the improved ini files of OMNeT++. Then, the

10

Page 11: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEW OF THE OMNeT++ IDE

experiment-measurement-replication labels will be assigned more-or-less automatical-ly – please refer to the Inifile document (“Configuring Simulations in OMNeT++”) formore discussion.

Browsing vector and scalar data generated by the simulation

The second page displays results (vectors, scalars, and histograms) from all files intables and lets the user browse them. Results can be sorted and filtered. Simple filter-ing is possible with combo boxes, or when that is not enough, the user can write arbi-trarily complex filters using a generic pattern matching expression language. Selectedor filtered data can be immediately plotted, or remembered in named datasets forfurther processing.

Defining datasets to be analyzed

It is possible to define reusable datasets that are basically recipes on how to select andprocess data received from the simulation. You can add selection and data processingnodes to a dataset. Chart drawing is possible at any point in the processing tree.

11

Page 12: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEW OF THE OMNeT++ IDE

A Line Chart

Line charts are typically drawn from time-series data stored in vector files. Pre-pro-cessing of the data is possible in the dataset. The line chart component can be config-ured freely to display the vector data according to your needs.

A Bar Chart

Bar charts are created from scalar results and histograms. Relevant data can begrouped and displayed via the Bar chart component. Colors, chart type, and otherdisplay attributes can be set on the component.

12

Page 13: A QUICK OVERVIEW OF THE OMNeT++ IDE - omnetpp.org · A QUICK OVERVIEW OF THE OMNeT++ IDE The Run dialog showing a simulation launch configuration In the Eclipse IDE, the various ways

A QUICK OVERVIEW OF THE OMNeT++ IDE

Output Vector View

The Output Vector View can be used to inspect the raw numerical data when required.It can show the original data read from the vector file, or the result of a computation.The user can select a point on the line chart or a vector in the Dataset View and itscontent will be displayed.

Dataset View

The Dataset View is used to show the result items contained in the dataset. The contentof the view corresponds to the state of the dataset after the selected processing isperformed.

13