CS 795/895 - Vehicular Networks
Fall 2010: Thurs 3-5:30pm, E&CS 2120

Print - Admin

Announcements

Staff

Schedule

Syllabus

Useful Links

ns-3

Setup

Login to the netsim research machine.

Create a copy of the ns-3.9 source in a directory named ns-3.9:

 hg clone /home/mweigle/shared/ns-3.9

(Note: This command will create the ns-3.9 directory.)

In the ns-3.9 directory, compile ns-3.9: ./waf

Test the install: ./test.py -c core
Expected output:

 76 of 76 tests passed (76 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors)

Run your first ns-3 program: ./waf --run hello-simulator
Expected output: Hello Simulator

Intro to ns3

VANET Additions

Hadi's Original Code

Download Hadi's patch from http://ns-3-highway-mobility.googlecode.com/files/vanet-highway-aug-15.patch

From your ns-3.9 directory, apply patch to add vanet-highway code:

 patch -p1 <vanet-highway-aug-15.patch

Edit the ns-3.9/wscript file and add the following line under bld.add_subdirs('utils'):

  bld.add_subdirs('vanet-highway')

Edit vanet-highway/Highway.cc and replace wifia-6mbs with OfdmRate6MbpsBW10MHz.

To test, from your ns-3.9 directory:

 ./waf --run "vanet-highway-test -fp=test"

This should create a file named test-Parameters containing:

 time = 1 run number = 1
 number of lanes = 3 two directional = 0 lane change = 1
 flow distribution = 0
 flow1 = 0.5 vel1 = 29
 flow2 = 0.5 vel2 = 29
 transmission power = 21.5
 injection gap = 5 injection mix = 80 penetration rate = 100
 speed limit = 29 speed std = 1
 file prefix = ./test

Controller is user-written to setup a particular scenario/topology. It is used to create a Highway, initialize vehicles (InitVehicle()), take control of a vehicle at each time step (ControlVehicle()), send data, and receive data (ReceiveData).

vanet-highway-test.cc is the driver/script for a particular experiment. It creates the Controller, sets parameters, sets up callbacks between Highway and Controller, sets up tracing, and schedules the experiment.

ODU-only additions