mascoptCplex.algos.abstractalgos
Class BaroniRouting

java.lang.Object
  |
  +--mascoptCplex.algos.abstractalgos.BaroniRouting
Direct Known Subclasses:
BaroniCapacityRouting

public class BaroniRouting
extends Object

Routes some request on a network. This algorithm is based on a Cplex Model of Baroni. It can also route protection paths in the network.

Version:
29/07/2002
Author:
jflaland@sophia.inria.fr

Field Summary
static String FLOW_ALLOCATED
          The string wich is used to store the number of lambdas on a path.
 boolean integerComputation_
          Computes the flow in integer
 double nbFTotal
          The total number of fibers
 String SIZEREQUESTSTRING
          The string identifying the size of the request in the file.
 int stretchFactor
          Additive stretch factor
 int W
          Number of wavelenghts per fiber.
 
Constructor Summary
BaroniRouting(AbstractGraph g, DiGraph requests)
          Constructs the BaroniRouting object.
 
Method Summary
 Vector getPathForRequest(AbstractEdge z)
          Return a primary path of a request.
 HashMap getPaths()
          Return all primary paths of requests.
 HashMap getProtectionForRequest(AbstractEdge z)
          Return protection paths of a request.
 boolean hasRoutes()
          Return true if a feasible solution have been found
 boolean hasSolution()
          Says if a solution exists for the current problem
 boolean pathsCalculusMethod(String method)
          Choose the path determination method.
 void printStatistics()
          Statistics.
 void route()
          Launch the routing computation.
 void setProtection(boolean protection)
          Sets the protection mode
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLOW_ALLOCATED

public static String FLOW_ALLOCATED
The string wich is used to store the number of lambdas on a path.


W

public int W
Number of wavelenghts per fiber.


SIZEREQUESTSTRING

public String SIZEREQUESTSTRING
The string identifying the size of the request in the file.


integerComputation_

public boolean integerComputation_
Computes the flow in integer


stretchFactor

public int stretchFactor
Additive stretch factor


nbFTotal

public double nbFTotal
The total number of fibers

Constructor Detail

BaroniRouting

public BaroniRouting(AbstractGraph g,
                     DiGraph requests)
Constructs the BaroniRouting object. Then, it's possible to launch the calculus for routing.

Parameters:
g - the graph used for the routing
Method Detail

pathsCalculusMethod

public boolean pathsCalculusMethod(String method)
Choose the path determination method. Several methods for detrmine paths are used.

Parameters:
method - the string designing the method
Returns:
true if the method exist

setProtection

public void setProtection(boolean protection)
Sets the protection mode

Parameters:
protection - true if activated

route

public void route()
Launch the routing computation.


hasRoutes

public boolean hasRoutes()
Return true if a feasible solution have been found

Returns:
true if a solution has been found.

getPaths

public HashMap getPaths()
Return all primary paths of requests.

Returns:
an hash map where the key is an edge representing the demand and where values are a vector of abstract chains.

getPathForRequest

public Vector getPathForRequest(AbstractEdge z)
Return a primary path of a request.

Parameters:
z - the request to consider
Returns:
a vector containing all AbstractChain

getProtectionForRequest

public HashMap getProtectionForRequest(AbstractEdge z)
Return protection paths of a request.

Parameters:
z - the request to consider
Returns:
an HashMap containing, for each edge j, a vector of the restoration path

printStatistics

public void printStatistics()
Statistics.


hasSolution

public boolean hasSolution()
Says if a solution exists for the current problem

Returns:
true if a solution exists