nsX for Network Simulation

nsX is a toolchain developed by Jiazi Yi  @ the Network Research Group of ´Ecole Polytechnique to automatize network simulation. It is written in Python 3. It has following features:

  • automatically generate and run batch simulations with defined simulation attributes in multiple threads.
  • parse the simulation traces in multiple threads.
  • generate statistic of multiple traces.
  • automatically plot figures.

It is mainly designed for NS3, but it is also general enough that can be easily extended to other network simulators with simple modifications.

ns3 is a discrete-event network simulator, targeted primarily for research and educational use. By using ns3, it is easy to run simulations with existing modules. On the other hand, in the network research, large number of simulations with different attributes and random runs are required to get statistical results and figures. This Toolchain is developed to automatize such procedures.

After the simulation scripts are defined (some examples can be found under the ns3 folder /examples; or for LoRa-related examples, under src/lora/examples folder), a typical flow has following steps:

  1. Define the network attributes of the simulations (such as number of nodes, data rates, etc.).
  2. Run simulations with combinations of the network attributes using batch runner. The output is .tr traces and is located under the /trace folder of the simulation scenario folder. Each .tr file correspond to a single simulation.
  3. Parse all the .tr traces to generate statistics of .tr file using the trace parser. The results exist as .csv files under the /csv single folder. Each .csv file correspond to a .tr file with the same file name.
  4. Cluster the simulations with same attributes (but different random runs) using the cluster. The output files XXX cluster.csv are located under the folder csv cluster.
  5. Plot the figures with the /figures