|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mascoptCplex.algos.networks.RoutingCplexFlowCapacityMax
The RoutingCplexFlowCapacityMax class provides an algorithm to compute and solve the problem of multi-flow with capacity. The algorithm solve the problem with Cplex, so it use the NetworkCplexFlow object. In first, the algorithm add to Cplex the constraints of capacity and the objective of problem, then solve the problem with Cplex. The objective is to minimize the maximun flow of system. Note that result represent the optimality or the realisability of the problem.
Field Summary | |
static double |
INFINITY
Infinity. |
boolean |
result
The boolean is true if the problem has a optimal or feasible solution. |
Constructor Summary | |
RoutingCplexFlowCapacityMax(NetworkCplexFlow f)
Constructor, initialize the network and the flow system. |
Method Summary | |
void |
addCapacity()
Adds the constraints of capacity to the Cplex problem. |
Double |
averageFlow()
return the average flow of an arc of problem. |
Double |
getArcFlow(Arc arc)
Give the flow passing by an arc |
DiPath |
getChain(Arc r)
Returns the chain with the computed flow. |
DiPathSet |
getPathSolution(Arc r)
return a DiPath satisfaying the request r. |
DiPathSet |
getSingleChains(Arc r)
Returns single chains with the computed flow. |
Double |
maxFlow()
return the maximum flow of the arcs of problem. |
Double |
minFlow()
return the minimum flow of the arcs of problem. |
void |
objectiveRouting()
Add the objective to the Cplex problem. |
void |
printSolution()
print the solution paths for all requests |
void |
saveSolutionPath()
Save chains of all requests of networks in the HashMap allPathSolution of routingFlow Use the fonction getsingleChains(Arc ) |
boolean |
solve()
Initialize the system flow, add the objective and constraints of capacity, so solve the flow on the network. |
Double |
sumFlow()
return the sum of flow of all the arcs of problem. |
Double |
sumLengthPaths()
return the sum of length of the paths. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public boolean result
public static double INFINITY
Constructor Detail |
public RoutingCplexFlowCapacityMax(NetworkCplexFlow f)
f
- is the data of network.Method Detail |
public void objectiveRouting()
public void addCapacity()
public boolean solve()
public DiPath getChain(Arc r)
r
- the Arc
representing the request.
public DiPathSet getSingleChains(Arc r)
r
- the Arc
representing the request to
satisfy.
public void saveSolutionPath()
public void printSolution()
public DiPathSet getPathSolution(Arc r)
r
- the Arc
representing the request.
public Double getArcFlow(Arc arc)
arc
- The arc
public Double maxFlow()
public Double minFlow()
public Double sumFlow()
public Double averageFlow()
public Double sumLengthPaths()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |