WDMSim v0.1.0 (beta)

Mini How To

WDMSim is a discrete event simulator for optical networks research.

It requires JRE 6 (Java Virtual Machine).

Depending on the amount of simulated events it will require a lot of memory (>= 2GB).

  1. How to compile it
  2. How to run it
  3. Sample usage
  4. Simulator output
  5. Sample output (single load)
  6. Sample output (load range = 50 51 1)
  7. Sample trace output
  8. Simulation XML File
  9. Adding algorithms to the Control Plane

1- How to compile it
2- How to run it
you@computer:~$ java -jar WDMSim.jar
Usage: WDMSim simulation_file seed [-trace] [-verbose] [minload maxload step]
The required parameters are: The optional parameters are:
3- Sample usage
you@computer:~$ java -jar WDMSim.jar simulation-nsf.xml 1 > results

In this example the simulation described in “simulation-nsf.xml” will be executed using a seed of 1.

you@computer:~$ java -jar WDMSim.jar simulation-nsf.xml 1 10 50 10 > results

In this example the simulation described in “simulation-nsf.xml” will be executed 5 times one for each load described in the range (10, 20, 30, 40 and 50) using a seed of 1.

All the results will be written in the file named “results”.


4- Simulator output

If you run a simple simulation, at the end, it will write to the standard output some statistics. Among the outputted results (you may add some more) there are some basic result which are:

Besides the MBP and MBBR for the whole calls, it also outputs the MBP and MBBR for each source-destination pair in the form “S-D A:? BP:? BBR:?”, where:

After this it finally outputs:

By adding code to the simulator you can add other statistics and make them be outputted together with the others.

If you want, you can also generate a trace file (adding the -trace flag) containing a log of all the events of the simulation. The types of events that can be generated are described below:


5- Sample output (single load)


6- Sample output (load range = 50 51 1)


7- Sample trace output


8- Simulation XML File

Sample file:


9- Adding algorithms to the Control Plane

A new algorithm to be used by the control plane is a Java class that implements the interface RWA:

There are only three methods:

Your new algorithm will be able to interact with the Control Plane through an especific interface that provides some key methods:

If, uppon an arrival, your algorithm decide to accept a call you can use the method acceptFlow providing the flow id and the lightpath object (single-hop routing) or sequence of lightpath objects (multi-hop routing) in order to establish the connection. Otherwise, you can use the method blockFlow to block the call.

If you create a new class named "MyRWA", then you will need to indicate its name in the XML input file:

Two simple RWA algorithms (MyRWA and My2RWA) are provided with the simulator code.