mascoptCplex.networks
Class NetworkCplexFlow

java.lang.Object
  |
  +--mascoptDev.networks.Network
        |
        +--mascoptCplex.networks.NetworkCplexFlow
Direct Known Subclasses:
NetworkCplexFlowConstrains

public class NetworkCplexFlow
extends Network

The NetworkCplexFlow class ... a multi-flow with capacity. Note that allPathSolution represent the paths solution for all requests of problem.


Field Summary
 HashMap allPathSolution
          HashMap representing paths solution for all requests of problem.
static String CAPACITY_STRING_VALUE
          String which is read on edges for the capacity.
 ilog.cplex.IloCplex cplex
          IloCplex which is the Cplex object to solve the problem.
 AddFlowRouting flow
          AddFlowRouting which is the model flow to Cplex.
 boolean integerComputation
          Choice of the type of variables.
 ilog.cplex.IloCplex.Status status
          Status of the problem.
 
Constructor Summary
NetworkCplexFlow(DiGraph cable, DiGraph request, boolean integerCompute)
          Constructor for the NetworkCplexObject object.
 
Method Summary
 void addPathSolution(Arc r, DiPath p)
          Adds a path for request r.
 void clearPathSolution(Arc r)
          Clear the path solution of request r.
 DiGraph getCableGraph()
          Returns the cable graph of the network, as a DiGraph.
 double getCapacity(Arc arc)
          Returns the capacity of arc, or null if the network doesn't contain this arc.
 DiPathSet getPathSolution(Arc r)
          Returns solution path of the request, or null if there isn't solution for this request.
 DiGraph getRequestGraph()
          Returns the request graph of the network, as a DiGraph.
 void initFlow()
          Initialize the flow of network.
 void putCapacity(Arc arc, double capacity)
          Associates the specified capacity with the specified arc in this network.
 void removePathSolution(Arc r, DiPath p)
          Remove the path which belongs to the path solution of the request r.
 void setPathSolution(Arc request, DiPath path)
          Associates the specified solution path with the specified request in this network.
 void setPathSolution(Arc request, DiPathSet set)
          Associates the specified solution path with the specified request in this network.
 void setRequestArcSet(ArcSet d)
          Set the ArcSet of Request Graph.
 
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

flow

public AddFlowRouting flow
AddFlowRouting which is the model flow to Cplex.


cplex

public ilog.cplex.IloCplex cplex
IloCplex which is the Cplex object to solve the problem.


CAPACITY_STRING_VALUE

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


allPathSolution

public HashMap allPathSolution
HashMap representing paths solution for all requests of problem.


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 integer variables.


status

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

Constructor Detail

NetworkCplexFlow

public NetworkCplexFlow(DiGraph cable,
                        DiGraph request,
                        boolean integerCompute)
Constructor for the NetworkCplexObject object.

Parameters:
cable - the DiGraphrepresenting the cables of the network.
request - the DiGraphrepresenting 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 ArcSet of Request Graph.

Parameters:
d - is the ArcSetto set.

initFlow

public void initFlow()
Initialize the flow of network.


putCapacity

public void putCapacity(Arc arc,
                        double capacity)
Associates the specified capacity with the specified arc in this network. If the network previously contained a value for this arc, the old value is replaced.

Parameters:
arc - the Arcrepresenting an arc of the cables.
capacity - representing the capacity of this arc.

getCapacity

public double getCapacity(Arc arc)
Returns the capacity of arc, or null if the network doesn't contain this arc.

Parameters:
arc - the Arcrepresenting an arc of the cables.
Returns:
the capacity of arc, or null if the network doesn't contain this arc.

getPathSolution

public DiPathSet getPathSolution(Arc r)
Returns solution path of the request, or null if there isn't solution for this request.

Returns:
solution path of the request or null if there isn't solution for this request.

setPathSolution

public void setPathSolution(Arc request,
                            DiPathSet set)
Associates the specified solution path with the specified request in this network. If the network previously contained a mapping for this arc, the old value is replaced.

Parameters:
request - the Arcrepresenting an request of the problem.
set - the DiPathSetrepresenting the solution path of this request.

setPathSolution

public void setPathSolution(Arc request,
                            DiPath path)
Associates the specified solution path with the specified request in this network. If the network previously contained a mapping for this arc, the old value is replaced.

Parameters:
request - the Arcrepresenting an request of the problem.

addPathSolution

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

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

removePathSolution

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

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

clearPathSolution

public void clearPathSolution(Arc r)
Clear the path solution of request r.

Parameters:
r - the Arcrepresenting the request.