By default, NS3 generates exactly same result when you run a simulation. If you want to collect statistical behavior by running the simulation multiple times, you need to avoid this default setting of NS3. One way to do this is using different seed for every simulation. Just add the following line before calling the run() method.
SeedManager::SetSeed(time(0));
Here the current system time is used as the seed which ensures that seed will be different for every simulation and hence the simulation result.
Showing posts with label ns3. Show all posts
Showing posts with label ns3. Show all posts
Monday, May 23, 2011
Saturday, May 14, 2011
NS3: Apply a Patch to Source
Sometimes it is necessary to apply patch to update NS3 source. Use the following steps to apply patch.
- Download desired patchFile
- Open shell
- Goto ns3 root directory (cd /...path to .../ns-3***)
- run the command 'patch -p1 < /...path to ../patchFile'
Monday, May 9, 2011
NS3: Wireless Jamming Model
The basic implementation of NS3 does not include anything for wireless jamming but wireless jamming is interesting research topic for wireless network security. Good news is Network Security Lab, University of Washington is working on a jamming model for NS3. Use the following link for more information.
http://www.nsnam.org/wiki/index.php/NS-3_wireless_jamming_model
http://www.nsnam.org/wiki/index.php/NS-3_wireless_jamming_model
Wednesday, May 4, 2011
NS3: Constant Speed Mobility
NS3 does not support constant speed mobility but it has a very good class RandomWalk2dMobilityModel which supports random speed and direction based on defined time or distance. If you need to simulation constant speed mobility, use the following steps:
- Open file '..../ns-3-dev/src/mobility/random-direction-2d-mobility-model.cc'
- In function DoStartPrivate()
- comment the line 'double speed = m_speed.GetValue ();'
- add a line 'double speed = your_constant_speed_value'
- Recompile ns-3 and you are done.
Subscribe to:
Posts (Atom)