The bm2adyton tool - npapanik/Adyton GitHub Wiki

####What is the "bm2adyton" tool?

The "bm2adyton" tool is a script that converts BonnMotion scenarios into trace files consisting of contacts in "ady" format which is readable by the Adyton simulator.

BonnMotion is a Java software which creates and analyzes mobility scenarios and is commonly used as a tool for the investigation of mobile ad hoc network characteristics.

####Requirements

To successfully use the "bm2adyton" tool you need the following:

####Processing a BonnMotion scenario

To process a particular BonnMotion scenario use the following commands in the linux terminal.

$ cd "path_to_Adyton"/utils/bm2adyton/
$ chmod +x bm2adyton.sh
$ ./bm2adyton.sh [-n scenario] [-p scen_path] [-b bm_path] [-r range] [-o outfile]

In the last command, the user should specify a list of options. These options are described in the following table.

option name description
scenario scenario name (without extension)
scen_path path to scenario data
bm_path path to BonnMotion executable
range the transmission range (defines when two nodes are in contact)
outfile output filename

####A step by step example Before we start, the following assumptions are made:

  • The path to the bm executable: "~/BonnMotion/bin/bm"
  • The path to Adyton source code: "~/Adyton/"

First, we create a new scenario using the BonnMotion software inside the bm2adyton directory:

$ cd ~/Adyton/utils/bm2adyton
$ ~/BonnMotion/bin/bm -f myscenario RandomWaypoint -n 500 -d 604800 -i 3600 -x 5000 -y 5000

Our scenario consists of 500 nodes moving in a square area of 5000x5000m according to the Random Waypoint mobility model. The duration of our scenario is 1 week (604800 seconds), while an initial phase of 3600 seconds is cut off. All these data are saved in two files named "myscenario.movements.gz" and "myscenario.params", respectively.

To transform the above scenario in "ady" format, we execute:

$ ./bm2adyton.sh -n myscenario -p . -b ~/BonnMotion/bin/bm -r 100 -o myscenario

The final contact trace file "myscenario.ady" is created inside the current directory (~/Adyton/utils/bm2adyton). Optionally, we can move the contact trace into Adyton's "/trc" directory and delete all unnecessary files .

$ mv myscenario.ady ~/Adyton/trc/.
$ rm -rf myscenario.movements.gz myscenario.params