Monday, May 23, 2011

NS3: Generate Statistical Result

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.

0 comments:

Post a Comment