mascoptCplex.algos.abstractalgos
Class FlowCapacityRouting

java.lang.Object
  |
  +--mascoptCplex.algos.abstractalgos.FlowCapacityRouting

public class FlowCapacityRouting
extends Object

Computes a flow on a graph with requests. The use of capacities is controled by the string CAPACITY_STRING_VALUE (the string used to read capacities on edges). You can get the chain resulting of the computed flow using two metdod. The first gives multi chains (i.e. one path covering all the flow). The second gives an HashSet contains all the single chains. On this two results you can get the amount of flow on the path itself or on each arc of the path. See the two methods getChain and getSingleChains.

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

Field Summary
 String CAPACITY_STRING_VALUE
          String which is read on edges for the capacity.
 boolean integerComputation
          Choice of the type of variables.
 ilog.cplex.IloCplex.Status status
          Status of the problem
 int W
          Number of wavelength per fiber
 
Constructor Summary
FlowCapacityRouting(AbstractGraph g, DiGraph requests)
          Provides the calculus of flow on a graph
 
Method Summary
 void computeFlow()
          Compute the flow on the network.
 AbstractGraph getAbstractGraph()
           
 AbstractPath getChain(Arc r)
          Returns the chain with the computed flow.
 AddFlowRouting getFlow()
           
 AbstractPathSet getSingleChains(Arc r)
          Returns single chains with the computed flow.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CAPACITY_STRING_VALUE

public String CAPACITY_STRING_VALUE
String which is read on edges for the capacity.


W

public int W
Number of wavelength per fiber


integerComputation

public boolean integerComputation
Choice of the type of variables. The flow can be written with integer variables or not. By default the flow is computed with real variables.


status

public ilog.cplex.IloCplex.Status status
Status of the problem

Constructor Detail

FlowCapacityRouting

public FlowCapacityRouting(AbstractGraph g,
                           DiGraph requests)
Provides the calculus of flow on a graph

Parameters:
g - the graph to use as network
Method Detail

computeFlow

public void computeFlow()
Compute the flow on the network.


getChain

public AbstractPath getChain(Arc r)
Returns the chain with the computed flow. The flow amount can be found on the chain returned, getting the value called FLOW_ALLOCATED which is stored with a Double (so, use the getDouValue). This method returns a multi chain. If you want a collection of chain, use the method getSingleChains. You can also ask to each arc of the path returned what amount of flow it carry. Use the string FLOW_ALLOCATED to do this using the metdho getDouValue().

Parameters:
r - the request to satisfy.
Returns:
a chain satisfaying r.

getSingleChains

public AbstractPathSet getSingleChains(Arc r)
Returns single chains with the computed flow. The flow amount can be found on the chain returned, getting the value called FLOW_ALLOCATED which is stored with a Double (so, use the getDouValue). You can also ask to each arc of the path returned what amount of flow it carry. Use the string FLOW_ALLOCATED to do this using the metdho getDouValue().

Parameters:
r - the request to satisfy.
Returns:
a set of paths containing all the paths satisfaying r.

getAbstractGraph

public AbstractGraph getAbstractGraph()
Returns:
Returns the AbstractGraph.

getFlow

public AddFlowRouting getFlow()
Returns:
Returns the flow.