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).
- How to compile it
- How to run it
- Sample usage
- Simulator output
- Sample output (single load)
- Sample output (load range = 50 51 1)
- Sample trace output
- Simulation XML File
- Adding algorithms to the Control Plane
1- How to compile it
- Download the source code here.
- Open your favorite Java IDE (NetBeans or Eclipse).
- Create a new project based on existing code on NetBeans or Eclipse.
- Build the project to generate a JAR file (may require the definition of the main class "Main.java").
- You are ready to go!
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:
- simulation_file: the XML file containing all the information about the simulation environment.
- seed:
it is not exactly a seed for a random number generator, but a number in
the interval [1,25] that defines up to 25 different random simulations.
Note that more than one run with different seed values are required in
order to generate results with confidence intervals, etc.
The optional parameters are:
- -trace: decides if you want to generate a tracing file. Generating the trace file is not necessary
if you plan to gather your simulation statistics directly from your
code added to the simulator.
- -verbose: if you want lots of information about the simulator in the runtime. Only required for debugging purposes.
- minload
maxload step: automates the running of several simulations for a range
of offered loads. If not provided the offered load considered will be
the one from “simulation_file”.
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:
- MBP: is the Mean Blocking Probability = (blockedCalls/totalCalls)*100.
- MBBR: is the Mean Bandwidth Blocking Ratio = (blockedBandwidth/requiredBandwidth)*100.
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:
- JFI: is the Jain's Fainess Index for the MBBR values for all
source-destination pairs in the network, it measures the balance of the
blocking among all pairs. JFI=[0,1], the closer to 1 it is the more
similar are the MBBR recults.
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:
- simulationInterface - this method is responsible to provide access to the algorithm for all relevant
information about the simulation including information about the physical and the virtual topologies. Moreover,
it provides an interface back to the Control Plane.
- flowArrival - Everytime a new call arrives into the network the Control Plane calls this method informing the
algorithm and providing all the relevant informations about the new flow.
- flowDeparture - Everytime a call departs from the network this method is called.
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.