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.
-
Install and build components required by OPS - Prerequisites
-
Install and compile OPS - Install and Build OPS
-
Run simulations - Running Simulations
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.
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.
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.
-
Run the OMNeT++ IDE
-
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
-
Select the installed project in
Project Explorer
pane and set the active configuration torelease
usingProject->Properties->C/C++ Build->Manage Configurations...
-
Select the installed project in
Project Explorer
pane and build INET usingProject->Build Project
Note: Project->Build Project
should result in an error free build.
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.
-
Run the OMNeT++ IDE
-
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
-
Select the installed project in
Project Explorer
pane and set the active configuration torelease
usingProject->Properties->C/C++ Build->Manage Configurations...
-
Select the installed project in
Project Explorer
pane and build KeetchiLib usingProject->Build Project
Note: Project->Build Project
should result in an error free build.
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.
-
Run the OMNeT++ IDE
-
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
- Copy the following 3 files into the INET project folder
src/inet/mobility/single
SWIMMobility.ned
SWIMMobility.h
SWIMMobility.cc
- Select the INET project in
Project Explorer
pane and rebuild INET usingProject->Build Project
Once the prerequisites are installed and built, to install and build OPS, follow the procedure below.
-
Run the OMNeT++ IDE
-
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
- Copy the following 2 files, located in
res/inet-models/ExtendedSWIMMobility
into the INET project foldersrc/inet/mobility/contract
IReactiveMobility.ned
IReactiveMobility.h
- Copy the following 3 files, located in
res/inet-models/ExtendedSWIMMobility
into the INET project foldersrc/inet/mobility/single
ExtendedSWIMMobility.ned
ExtendedSWIMMobility.h
ExtendedSWIMMobility.cc
-
Select the installed project in
Project Explorer
pane and set the active configuration torelease
usingProject->Properties->C/C++ Build->Manage Configurations...
-
Select the INET project in
Project Explorer
pane and rebuild INET usingProject->Build Project
-
Select the OPS project in
Project Explorer
pane and selectFile->Properties->Project References
-
Tick the installed INET and KeetchiLib, and click
Apply and Close
. -
Select the OPS project again in
Project Explorer
pane and build usingProject->Build Project
Note: Project->Build Project
should result in an error free build.
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.
-
Run the OMNeT++ IDE
-
Select the sample
ops-omnetpp.ini
file from the foldersimulations/
-
Select
Run->Run As->OMNeT++ Simulation
. After clicking through other popups, the following window should appear. Select the sample configuration using the pull-down.
- Based on the selected configuration, the following window should appear.
- 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.
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.
Below is a brief (high-level) procedure to create your charts using the OMNeT++ IDE.
-
Run the OMNeT++ IDE
-
In the
simulation/results
folder, create anAnalysis File
by selectingNew -> Analysis File (anf)
-
Add the created results files (
*.vec
or*.sca
) to the created file -
Create datasets with the data you want plotted in every graph
-
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.
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.
plot-sca-results.py
- Plots bar charts for selected scalar resultsshow-sca-results.py
- Shows a single table of all the selected scalar resultsplot-vec-results.py
- Plots line charts of the selected vector resultsplot-vec-boxplots.py
- Plots boxplots of the selected vector resultsplot-vec-histograms.py
- Plots histograms of the selected vector resultsshow-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 detailsstatlist.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
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.
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.
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.
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.
Following are examples from OPSNetwork.ned
numNodes
- The total number of nodes in the networknum-rngs
- Number of random number generators
Following are examples from 'KHeraldApp.ned`
dataGenerationInterval
- How often are data messages injected into the networkdataSizeInBytes
- Payload size of a data message
Following are examples from KEpidemicRoutingLayer.ned
maximumCacheSize
- The size of the cache maintained by each node in bytesmaximumHopCount
- The maximum hops that a data packet is allowed to travel (be forwarded) before being discarded
Following are examples from KWirelessLayer.ned
wirelessRange
- The wireless range of each node's wireless interfacebandwidthBitRate
- 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.
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.
-
OMNeT++ - Install Guide, Simulation Manual, IDE User Guide
-
INET - Documentation
-
Results processing in OMNeT++ IDE - Chapter 10 of the IDE User Guide
-
INET Mobility Models - Node Mobility
We have compiled a list of frequently asked questions and solutions to some known problems. Check the FAQ file for these questions and answers.
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 [email protected].
- Asanga Udugama
- Jens Dede
- Anna Förster
- Vishnupriya Parimalam
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