Skip to content

ComNets-Bremen/OPS

Repository files navigation

OPS

The Opportunistic Protocol Simulator (OPS, pronounced as oops!!!) is a set of simulation models for OMNeT++ to simulate opportunistic networks. It has a modular architecture where different protocols relevant to opportunistic networks can be developed and plugged in. The details of prerequisites, installing OPS, configuring OPS, simulating with OPS and much more are given in the following sections.

Here are the most important links to get OPS running quickly.

  1. Install and build components required by OPS - Prerequisites

  2. Install and compile OPS - Install and Build OPS

  3. Run simulations - Running Simulations

Prerequisites

The models of OPS require OMNeT++, the INET framework, the KeetchiLib and some mobility models that are not part of the INET framework. Each of the sections below describe how these are installed and configured.

These prerequisites MUST be installed before proceeding to install OPS.

OMNeT++ (Version 5.6.2)

OPS requires OMNeT++. Install OMNeT++ version 5.6.2 using the following resources.

Once OMNeT++ is installed, run the OMNeT++ IDE. The IDE provides options to install all the additional components (OMNeT++ frameworks, libraries, etc.) required by OPS.

INET Framework (Version 4.1.0)

OPS requires the use of INET Framework, version 4.1.0, of OMNeT++ to simulate mobility. There are a number of ways of installing the INET Framework in the IDE. OPS require the exact version 4.1.0. So, do not install the default version prompted by the IDE when run for the first time.

There are many ways of installing INET 4.1.0. We recommend the following way.

  1. Run the OMNeT++ IDE

  2. Select File->Import->Git->Projects from Git->Clone URI-> and provide the following parameters and install INET

  • URI https://github.com/inet-framework/inet.git
  • Branch v4.1.x
  • Wizard for project import Import existing Eclipse projects
  1. Select the installed project in Project Explorer pane and set the active configuration to release using Project->Properties->C/C++ Build->Manage Configurations...

  2. Select the installed project in Project Explorer pane and build INET using Project->Build Project

Note: Project->Build Project should result in an error free build.

KeetchiLib

An external library called KeetchiLib is used by the KKeetchiLayer model to handle all the functionality related to the Organic Data Dissemination forwarding model. The code for this library is available at Github.

There are many ways of installing KeetchiLib. We recommend the following way.

  1. Run the OMNeT++ IDE

  2. Select File->Import->Git->Projects from Git->Clone URI-> and provide the following parameters and install KeetchiLib

  • URI https://github.com/ComNets-Bremen/KeetchiLib.git
  • Branch master
  • Wizard for project import Import existing Eclipse projects
  1. Select the installed project in Project Explorer pane and set the active configuration to release using Project->Properties->C/C++ Build->Manage Configurations...

  2. Select the installed project in Project Explorer pane and build KeetchiLib using Project->Build Project

Note: Project->Build Project should result in an error free build.

SWIM Mobility Model

Small Worlds in Motion (SWIM) is a mobility model developed by A. Mei and J. Stefa. The INET code for the SWIM mobility model was developed by our research group. SWIM is used by many of the OPS scenarios for mobility.

There are many ways of installing SWIM. We recommend the following way.

  1. Run the OMNeT++ IDE

  2. Select File->Import->Git->Projects from Git->Clone URI-> and provide the following parameters and install SWIMMobility

  • URI https://github.com/ComNets-Bremen/SWIMMobility.git
  • Branch master
  • Wizard for project import Import as general project
  1. Copy the following 3 files into the INET project folder src/inet/mobility/single
  • SWIMMobility.ned
  • SWIMMobility.h
  • SWIMMobility.cc
  1. Select the INET project in Project Explorer pane and rebuild INET using Project->Build Project

Install and Build OPS

Once the prerequisites are installed and built, to install and build OPS, follow the procedure below.

  1. Run the OMNeT++ IDE

  2. Select File->Import->Git->Projects from Git->Clone URI-> and provide the following parameters and install OPS

  • URI https://github.com/ComNets-Bremen/OPS.git
  • Branch master
  • Wizard for project import Import existing Eclipse projects
  1. Copy the following 2 files, located in res/inet-models/ExtendedSWIMMobility into the INET project folder src/inet/mobility/contract
  • IReactiveMobility.ned
  • IReactiveMobility.h
  1. Copy the following 3 files, located in res/inet-models/ExtendedSWIMMobility into the INET project folder src/inet/mobility/single
  • ExtendedSWIMMobility.ned
  • ExtendedSWIMMobility.h
  • ExtendedSWIMMobility.cc
  1. Select the installed project in Project Explorer pane and set the active configuration to release using Project->Properties->C/C++ Build->Manage Configurations...

  2. Select the INET project in Project Explorer pane and rebuild INET using Project->Build Project

  3. Select the OPS project in Project Explorer pane and select File->Properties->Project References

  4. Tick the installed INET and KeetchiLib, and click Apply and Close.

  5. Select the OPS project again in Project Explorer pane and build using Project->Build Project

Note: Project->Build Project should result in an error free build.

Running Simulations

To run simulations, an OMNeT++ .ini file has to be created. A sample .ini file with a number of different scenarios (configurations) is provided in simulations folder. To run a simulation, follow the procedure given below.

  1. Run the OMNeT++ IDE

  2. Select the sample ops-omnetpp.ini file from the folder simulations/

  3. Select Run->Run As->OMNeT++ Simulation. After clicking through other popups, the following window should appear. Select the sample configuration using the pull-down.

  1. Based on the selected configuration, the following window should appear.

  1. Start simulating the network by clicking on the simulation controls shown below.

As indicated, there are many sample configurations in ops-omnetpp.ini file. Details of these configurations are given in the SAMPLEINI File.

Creating Graphs of Results

Based on the standard configuration, the raw results (vector and scalar) collected after a simulation run are located in the simulation/results folder. There are 2 ways of creating charts and tables of results. Using the OMNeT++ IDE or using external tools/scripts. Here are examples of the 2 ways.

Using the OMNeT++ IDE

Below is a brief (high-level) procedure to create your charts using the OMNeT++ IDE.

  1. Run the OMNeT++ IDE

  2. In the simulation/results folder, create an Analysis File by selecting New -> Analysis File (anf)

  3. Add the created results files (*.vec or *.sca) to the created file

  4. Create datasets with the data you want plotted in every graph

  5. Plot them using an appropriate chart type (Line, Bar, etc.)

For more information, check Chapter 10 of the IDE User Guide

An example results chart generated using 2 simulations (Epidemic and RRS) is shown below.

Using Python Scripts (with Matplotlib, NumPy and SciPy)

Another way is to create tables and graphs using the Python scripting laguage and the libraries Matplotlib, NumPy and SciPy of Python. Have a look and adapt the following files (in res/python-results folder) to plot graphs and show tables of the results.

  1. plot-sca-results.py - Plots bar charts for selected scalar results
  2. show-sca-results.py - Shows a single table of all the selected scalar results
  3. plot-vec-results.py - Plots line charts of the selected vector results
  4. plot-vec-boxplots.py - Plots boxplots of the selected vector results
  5. plot-vec-histograms.py - Plots histograms of the selected vector results
  6. show-confidence-intervals.py - Shows a table of confidence intervals of the selected scalar results

Each of the above Python scripts require the following 2 files as input.

  • datalist.csv - Details of the .vec and .sca files of all simulation runs including the names, and other details
  • statlist.csv - Details of all the statistics which are to be extracted from the files of the simulation runs

An example of running a scipt is as follows.

  ./show-confidence-intervals.py -d datalist.csv -s statlist.csv

Available Statistics

There are a set of network-level as well as node-level statistics collected by OPS in every simulation run. Check the STATS file to know about all the available statistics.

Creating New Scenarios

To run simulations for different scenarios, duplicate an existing .ini file and modify the model parameters as required. To know about all the model parameters, check the .ned files in the src/ folder.

Node and Network Architectures

OPS has a network model, a node model and a number of protocol layer models to simulate opportunistic networks. A description of all the models is given in the MODELINFO File.

Model Parameters

Many model parameters are configurable using the .ini file used to run simulations. Some of these parameters have default values but all can be reconfigured in the .ini file. Here are some examples.

Network-level Parameters

Following are examples from OPSNetwork.ned

  1. numNodes - The total number of nodes in the network
  2. num-rngs - Number of random number generators

Application Layer Parameters

Following are examples from 'KHeraldApp.ned`

  1. dataGenerationInterval - How often are data messages injected into the network
  2. dataSizeInBytes - Payload size of a data message

Forwarding Layer Parameters

Following are examples from KEpidemicRoutingLayer.ned

  1. maximumCacheSize - The size of the cache maintained by each node in bytes
  2. maximumHopCount - The maximum hops that a data packet is allowed to travel (be forwarded) before being discarded

Link Layer Parameters

Following are examples from KWirelessLayer.ned

  1. wirelessRange - The wireless range of each node's wireless interface
  2. bandwidthBitRate - Communication bit rate of the wireless interface

Please check the respective model's .ned file to see all the parameters. Details about models are found in MODELINFO File. Details of the sample .ini file with multiple sample configurations is provided in SAMPLEINI File.

Help

If you have any question or clarifications related to OMNeT++, please check the documentation provided at the OMNeT++ site and INET sites. Here are the important documents.

  1. OMNeT++ - Install Guide, Simulation Manual, IDE User Guide

  2. INET - Documentation

  3. Results processing in OMNeT++ IDE - Chapter 10 of the IDE User Guide

  4. INET Mobility Models - Node Mobility

Frequently Asked Questions and Known Problems

We have compiled a list of frequently asked questions and solutions to some known problems. Check the FAQ file for these questions and answers.

Questions or Comments

Firstly, if you have any questions, please check the FAQ file and if you cannot find answers there, then write to us. Secondly, if you have any comments or suggestions, we will be very glad to hear them. In both cases, please write to anyone of us listed blow using ops@comnets.uni-bremen.de.

  • Asanga Udugama
  • Jens Dede
  • Anna Förster
  • Vishnupriya Parimalam

Model Contributors

There are many individuals who have used and extended OPS, either by extending existing models or by introducing new models. This section lists the individuals who have done such contributions.

  • Anas bin Muslim
  • Jibin P. John
  • Karima Khandaker
  • Kirishanth Chethuraja
  • Zeynep Vatandas
  • Thenuka Karunathilake