Creating Maps in WKT format for DTN – ONE Simulator

We have to follow these steps to create map files in WKT format which has to be given as input for MapBasedMovement Models such as Shortest Path Map Based Movement , Working day Movement Model etc..

Click on images to see the zoomed version.

Step 1: Go to http://www.openstreetmap.org/ and select the coordinates of the area you want. Then choose export . It will give some file in .osm format like map.osm.

openstreetmap1

Step 2: Now we have to convert the map.osm file to map.wkt file. Use osm2wkt jar for that purpose. Download that jar file from http://www.tm.kit.edu/~mayer/osm2wkt/.

Step 3: Now use the following commands to convert .osm files to .wkt files.

java -jar osm2wkt.jar map.osm

osm2wkt

Step 4: We can extract the specific linesegments and points from the map we are  having. To generate that, we have to use another simulator “OPEN JUMP”.

Step 5: Download Openjump from the following link:  http://sourceforge.net/projects/jump-pilot/files/OpenJUMP/1.8.0/OpenJUMP-Installer-1.8.0-r4164-CORE.jar/download. Start the OPEN JUMP Simulator.

openjump_start

Step 6: Then open the map.osm file in Open Jump. Select the portion of the map from which you want to extract points.

opening_osm

Step 7: Go to Tools -> Edit Geometry -> Extract Points. After that it will extract all the points in the map and we can save the resultset as a WKT file.

extractpoints

Step 8: For Working Day Movement Model, we have to generate separate map files for Home Activity, Office Activity, Evening Activity Models and that map files should contain POINTS only. For MapBased Movement and Bus Movement, the WKT files should contain only LINESTRINGS.

References:

(1) http://www.tm.kit.edu/~mayer/osm2wkt/

(2) https://www.openstreetmap.org

(3)http://openjump.org/

NS-3 Based Named Data Networking Simulator – ndnSIM2.0 Installation in Ubuntu 14.04

Used Operating System : Ubuntu 14.04

Install Required Dependencies :

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:boost-latest/ppa
sudo apt-get update
sudo apt-get install libboost1.55-all-dev

If you want visualizer Module :
sudo apt-get install python-dev python-pygraphviz python-kiwi
sudo apt-get install python-pygoocanvas python-gnome2
sudo apt-get install python-rsvg ipython

Downloading ndnSIM:
mkdir ndnSIM
cd ndnSIM
git clone https://github.com/named-data/ndn-cxx.git ndn-cxx
git clone https://github.com/cawka/ns-3-dev-ndnSIM.git ns-3
git clone https://github.com/cawka/pybindgen.git pybindgen
git clone https://github.com/named-data/ndnSIM.git ns-3/src/ndnSIM

Compiling and running ndnSIM :

Compile and install ndn-cxx library:
cd ndnSIM/ndn-cxx
./waf configure –boost-libs=/usr/lib/x86_64-linux-gnu
After successful configuration you will see a window like this :

(click on the image to see the zoomed version)

ndnsim1

ndnsim2

During configuration, If you are facing a error like Cryptopp is not found, then do the following steps

Go to the link http://www.cryptopp.com/#download
Step 1 :Download the latest zip file . Current latest version is Crypto++ 5.6.2.

Step 2 :Go to the downloads folder,
mkidr cryptopp
cd cryptopp
unzip -a cryptopp562.zip

Step 3: Go to the path :/Downloads/cryptopp .There you will find a makefile named GNUmakefile.Open that file.
Uncomment the line “CXXFLAGS += -fPIC”.

Step 4: Make and Install: make static dynamic test PREFIX=/usr/local
If make is successful, you will see the following output:
> ls -al *.a
-rw-r–r– 1 user user 56069234 2010-09-07 01:14 libcryptopp.a
After the library successfully builds, run cryptest.exe v to validate the library.
> cryptest.exe v

Finally, install the library. By default, Crypto++ installs to /usr/include and /usr/lib. This must be done using root since files are written to /usr/bin, /usr/include, and /usr/lib. Note that make install does not copy the test vectors into /usr/bin. If your distribution does not support su, try issuing sudo make install.
> su –
Password:
cd …/cryptopp/
make install PREFIX=/usr/local

mkdir -p /usr/local/include/cryptopp /usr/local/lib /usr/local/bin
cp *.h /usr/local/include/cryptopp
cp *.a /usr/local/lib
cp *.so /usr/local/lib
cp *.exe /usr/local/bin

Compile NS-3 with ndnSIM module:
cd ns-3
./waf configure –disable-python –enable-examples
ndnsim3

./waf

ndnsim4

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

Simulating using ndnSIM:

To enable logging:
NS_LOG=ndn.Producer:ndn.Consumer ./waf –run=<scenario name>

To enable Visualizer:

If you have compiled with python bindings, then you can try to run these simulations with visualizer:

./waf –run=ndn-simple –vis

References :

(1) http://ndnsim.net/2.0/getting-started.html

(2) http://www.cryptopp.com/#download

(3) http://www.cryptopp.com/wiki/Linux