CS 252 project simulation scripts

We used the NS-2 network simulator, version 2.1b7a, to run our simulations. Below is a list of our scripts, together with explanations as needed.

4-4-4-benes-topology.tcl This file defines the network topology for the example with N = 4. It is loaded as an auxilliary file by 4-4-4-benes.tcl.
4-4-4-benes.tcl This is the main execution file for the example with N = 4. The first argument specifies the value of epsilon, and the second the desired running time in seconds.
4-8-4-benes-topology.tcl This file is the same as 4-4-4-benes-topology.tcl, but for the example with N = 8.
4-8-4-benes.tcl Again, this is the same as 4-4-4-benes.tcl, but for the example with N = 8.
helper-procs.tcl
calculate-reorder-amount.pl This is a Perl script that calculates the amount of reordering encountered by a queue. The first argument is the trace file name for that queue (output by the tcl scripts above), the second is 'y' if the user wants to output misorder amounts, the third is an output file for the misorder statistics, and the fourth is an output file for queue length statistics.

All of our charts were calculated in Excel by importing the files output by the Perl scripts.