BitSimulator, a C++ wireless nanonetwork simulator for routing and transport levels

Introduction

BitSimulator is dedicated to wireless nanonetworks simulations. Nanonetwork's nodes are of micrometric dimensions. As such, they have drastic constraints on memory, energy and CPU. Those constrains along with the possibility of extremely high neighborhood densities call for specific network protocols.

BitSimulator has been designed to allow simulation of application or routing protocols while keeping a relatively detailed model for the MAC and physical levels. As such, it enables exploration and understanding of the effects of low level coding and channel access contention. For its Medium Access Control, BitSimilator uses the TS-OOK modulation proposed by Josep Jornet.

BitSimulator differs from other network simulators as it is completely dedicated to wireless and potentially very dense nanonetworks. It is more accurate than the Nano-Sim extension of Network Simulator 3 as it can be asked to simulate every bit of payload and their potential collisions. It is still less accurate than COMSOL Multiphysics as it does not delve into signal processing and complex physical environment interactions, but its speed is much greater. Due to fine memory management and clever optimizations, simulations of up to hundreds of thousands of nodes are possible on a laptop. Of course, running time greatly varies with the complexity of the simulated scenario and with neighborhood density.

We actively develop the simulator, feel free to use it and contact us for any remark.

Be sure to have also read the NanoCom conference paper describing it.

Examples of BitSimulator usage

We use the simulator to discover behaviours of communications in naonnetworks and to validate our algorithms and protocols. You might be interested by the following articles which use the simulator in the evaluation part:

Features

The manual below gives more information about features and limitations.

Tutorial / Get started with BitSimulator

First steps with the simulator

Create a directory, e.g. example. Then create inside an XML file named scenario.xml containing the following lines:

Then start the simulation with the above scenario with the following command line:
./bitsimulator -D example

The simulation generates several log files in the directory, the most important being events.log file, which traces all basic events in the network, such as packet receptions and emissions.

Note that a lot of parameters from the configuration file can be overwritten by options given in command line. This is especially useful when doing batch runs from shell scripts. For more information on the available options use:
./bitsimulator -h

BitSimulator has a built-in graphic mode which appears when started with the option -g. It opens an SDL window displaying the propagation of packets during the simulation. It is very useful when debugging your own protocols and applications to detect and prematurely end useless simulations.

First steps with VisualTracer

VisualTracer screenshot Once the simulation ended, the simulation progress from the beginning can be visualized step by step with VisualTracer using the following command (in visualtracer directory):
./visualtracer -D ../example

Documentation

The user's and developer's manual, with tutorials too.

The API documentation can be generated with doxygen.

Download

The simulator works on GNU/Linux and macOS.

We currently use a private git repository for the simulator. Until it gets public, the simulator can be downloaded as a tar.gz file (v0.9.4+, as of 8 May 2021). It is licensed as GPL. Note that this is the stable version, which might be outdated in some respects compared to the information in this web page.

Installation

This is done through the usual ./configure && make && make install triplet, and optionally make check.

configure checks for required dependencies: pkg-config, tinyxml2, sdl2, sdl2_gfx, sdl2_ttf, tclap. For macOS you could install these dependencies using homebrew for example (note that macports does not have tinyxml2 for example).

make install is optional, it just copies the two binary files bitsimulator and visualtracer to the installation directory, but you can execute them from the source directory directly if you prefer.

You might also execute make check, which executes a short simulation and tests its result.

Contact

Dominique Dhoutaut, associate professor at University of Franche-Comté, France.