mascoptDev.networks
Class WDMNetwork

java.lang.Object
  |
  +--mascoptDev.networks.Network
        |
        +--mascoptDev.networks.WDMNetwork

public class WDMNetwork
extends Network

WDM Network class.

Author:
Jean-Francois Lalande (Jean-Francois.Lalande@sophia.inria.fr)

Field Summary
 String mglFile
          Name file where is save and write the solution of problem.
 String OBJECTIVE_TYPE
          String which is read on DiGraph of cable for the objective of networks.
 String PROTECTION_TYPE
          String which is read on DiGraph of cable for the protection type.
 
Constructor Summary
WDMNetwork(DiGraph cables, DiGraph requests)
          Constructs a WDM network.
WDMNetwork(DiGraph cables, DiGraph requests, String fileOut)
          Constructs a WDM network.
WDMNetwork(String fileIn)
          Constructor, initialize the network and the flow system with a file.
WDMNetwork(String fileIn, String fileOut)
          Constructor, initialize the network and the flow system with a file.
 
Method Summary
 void addMainPath(Arc r, DiPath p)
          Adds a main path for request r.
 void addProtectionPath(Arc j, Arc r, DiPath p)
          Adds a protection path for request r and failure j.
 void clearMainPath(Arc r)
          Clear the main path of request r.
 void clearProtectionPath(Arc j, Arc r)
          Clear the protection path of failure j and request r.
 DiGraph getCableGraph()
          Returns the cable graph of the network, as a DiGraph.
 DiPathSet getMainPaths(Arc r)
          Returns the set of main paths for a request.
 DiPathSet getProtectionPaths(Arc j, Arc r)
          Returns the set of protection paths for a request and a failure.
 DiGraph getRequestGraph()
          Returns the request graph of the network, as a DiGraph.
 void removeMainPath(Arc r, DiPath p)
          Remove the path which belongs to the main path of the request r.
 void removeProtectionPath(Arc j, Arc r, DiPath p)
          Remove the path which belongs to the protection path of the failure j and the request r.
 void setMainPath(Arc r, DiPath p)
          Setting a main path for request r.
 void setMainPath(Arc r, DiPathSet set)
          Setting a main path for request r.
 void setProtectionPath(Arc j, Arc r, DiPath p)
          Setting a protection path for failure j and request r.
 void setProtectionPath(Arc j, Arc r, DiPathSet set)
          Setting a protection path for failure j and request r.
 void setRequestArcSet(ArcSet d)
          Set the AcrSet of Request Graph.
 void writeSolution()
          Write the solution and the statistics of problem in the MGL File, for that use a constructor with a String fileOut.
 
Methods inherited from class mascoptDev.networks.Network
addGraph, getGraph
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTECTION_TYPE

public String PROTECTION_TYPE
String which is read on DiGraph of cable for the protection type.


OBJECTIVE_TYPE

public String OBJECTIVE_TYPE
String which is read on DiGraph of cable for the objective of networks.


mglFile

public String mglFile
Name file where is save and write the solution of problem.

Constructor Detail

WDMNetwork

public WDMNetwork(String fileIn,
                  String fileOut)
Constructor, initialize the network and the flow system with a file.

Parameters:
fileIn - the Stringrepresenting data in a file.mgl, features of this one are the graph of cables is called "graph Cable" and the graph of requests is called "graph Request".
fileOut - the Stringrepresenting the file.mgl where are writing the solutions and the statistics of problem

WDMNetwork

public WDMNetwork(String fileIn)
Constructor, initialize the network and the flow system with a file.

Parameters:
fileIn - the Stringrepresenting data in a file.mgl, features of this one are the graph of cables is called "graph Cable" and the graph of requests is called "graph Request".

WDMNetwork

public WDMNetwork(DiGraph cables,
                  DiGraph requests,
                  String fileOut)
Constructs a WDM network.

Parameters:
cables - the DiGraphrepresenting the cables of the network
requests - the DiGraphrepresenting the requests on the network.
fileOut - the Stringrepresenting the file where is save and write the solution of problem.

WDMNetwork

public WDMNetwork(DiGraph cables,
                  DiGraph requests)
Constructs a WDM network.

Parameters:
cables - the DiGraphrepresenting the cables of the network
requests - the DiGraphrepresenting the requests on the network.
Method Detail

getRequestGraph

public DiGraph getRequestGraph()
Returns the request graph of the network, as a DiGraph.


getCableGraph

public DiGraph getCableGraph()
Returns the cable graph of the network, as a DiGraph.


setRequestArcSet

public void setRequestArcSet(ArcSet d)
Set the AcrSet of Request Graph.

Parameters:
d - is the ArcSetto set.

getMainPaths

public DiPathSet getMainPaths(Arc r)
Returns the set of main paths for a request. If there is no routes, null is returned.

Parameters:
r - the Arcrepresenting the request.
Returns:
an DiPathSet containing DiPaths.

getProtectionPaths

public DiPathSet getProtectionPaths(Arc j,
                                    Arc r)
Returns the set of protection paths for a request and a failure. If there is no routes, null is returned.

Parameters:
r - the Arcrepresenting the request.
j - the Arcrepresenting the failure.
Returns:
an DiPathSet containing DiPaths.

addMainPath

public void addMainPath(Arc r,
                        DiPath p)
Adds a main path for request r.

Parameters:
r - the Arcrepresenting the request.
p - the DiPathrepresenting the path to add.

addProtectionPath

public void addProtectionPath(Arc j,
                              Arc r,
                              DiPath p)
Adds a protection path for request r and failure j.

Parameters:
r - the Arcrepresenting the request.
j - the Arcrepresenting the failure.
p - the DiPathrepresenting the path to add.

setMainPath

public void setMainPath(Arc r,
                        DiPath p)
Setting a main path for request r.

Parameters:
r - the Arcrepresenting the request.
p - the DiPathrepresenting the path to set.

setProtectionPath

public void setProtectionPath(Arc j,
                              Arc r,
                              DiPath p)
Setting a protection path for failure j and request r.

Parameters:
r - the Arcrepresenting the request.
j - the Arcrepresenting the failure.
p - the DiPathrepresenting the path to set.

setMainPath

public void setMainPath(Arc r,
                        DiPathSet set)
Setting a main path for request r.

Parameters:
r - the Arcrepresenting the request.
set - the DiPathSetrepresenting the set of path to set.

setProtectionPath

public void setProtectionPath(Arc j,
                              Arc r,
                              DiPathSet set)
Setting a protection path for failure j and request r.

Parameters:
r - the Arcrepresenting the request.
j - the Arcrepresenting the failure.
set - the DiPathrepresenting the path to set.

removeMainPath

public void removeMainPath(Arc r,
                           DiPath p)
Remove the path which belongs to the main path of the request r.

Parameters:
r - the Arcrepresenting the request.
p - the DiPathrepresenting the path to remove.

removeProtectionPath

public void removeProtectionPath(Arc j,
                                 Arc r,
                                 DiPath p)
Remove the path which belongs to the protection path of the failure j and the request r.

Parameters:
r - the Arcrepresenting the request.
j - the Arcrepresenting the failure.
p - the DiPathrepresenting the path to remove.

clearMainPath

public void clearMainPath(Arc r)
Clear the main path of request r.

Parameters:
r - the Arcrepresenting the request.

clearProtectionPath

public void clearProtectionPath(Arc j,
                                Arc r)
Clear the protection path of failure j and request r.

Parameters:
r - the Arcrepresenting the request.
j - the Arcrepresenting the failure.

writeSolution

public void writeSolution()
Write the solution and the statistics of problem in the MGL File, for that use a constructor with a String fileOut. The statistics of protection system write on each arc. The arc represent the failure of system. There are 5 values : Maximun Flow, Minimum flow, Sum of Flow, Average Flow and the Sum of length of the Paths.