Skip to main content

Installing and running OMNeT++

Step 1. Install and run OMNeT++


Download the current OMNeT++ version and install it, following the instructions under:

OMNeT++ Downloads

Once completed, run OMNeT++, then skip the step "Install Samples and INET" (unless you have lots of time and you know you would need them later).

Download and import the code for this tutorial from here:
To import it into your IDE, go to File → Import... → General → Existing Projects into Workspace Use Select archive file: to import the downloaded code.

Your IDE should now look like this:
IDE.png
Note that I have many projects here, the one we just created is marked in green and needs to be expanded before you can see the files inside.

Now, right-click on the file omnetpp.ini and go to Run as -> OMNeT++ simulation. The simulation window will open and you can see a single box, like this:
simulation-window.png
OMNeT++ is organized into a kernel and modules. The kernel is completely independent from the modules. The modules are where your simulation is actually happening. There are three types of modules:

Simple modules are the lowest in the hierarchy. Their internal and external settings and structure are described in a NED file and the behavior is programmed in a H/CC file.

Compound modules consist of simple modules and/or other compound modules. They DO NOT have behavior, only structure/settings, which are again described in a NED file.

The network module is a special compound module, that builds the highest point in the hierarchy of modules. This is the module that OMNeT++ looks for and runs as a simulation. No network module, no simulation.

Marked dark blue in the figure above, you can see the network module and the single simple module we currently have, called node. Note that all modules (simple, compound and network) have an ID (see in the figure).

The next interesting thing here is the simulation timeline. It represents the time of the simulation (not real-time clock) and it visualizes how many events are currently scheduled. If you are familiar with how discrete event simulation copes with time and events, then you skip the next page, otherwise - let's discuss how that works.