|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectnet.sourceforge.combean.graph.alg.AbstractGraphAlg
net.sourceforge.combean.graph.alg.flow.MinCostFlowByLPAlg
public class MinCostFlowByLPAlg
An implementation of a min-cost flow algorithm using an LP solver.
| Constructor Summary | |
|---|---|
MinCostFlowByLPAlg()
constructor |
|
| Method Summary | |
|---|---|
FixedDoubleEdgeMap |
getFlowMap()
Return the calculated flow. |
double |
getTotalCost()
Calculate the total cost of the flow. |
boolean |
isFeasible()
Check if a feasible flow exists. |
void |
run()
Execute the algorithm. |
void |
setEdgeCapacityMap(FixedDoubleEdgeMap edgeCapacities)
Set the edge capacities. |
void |
setEdgeWeightsMap(FixedDoubleEdgeMap edgeWeights)
Set the cost of one unit of flow for each edge. |
void |
setInflowMap(FixedDoubleNodeMap inflowMap)
Set the inflow at each node in the graph. |
void |
setLpModelLoader(LPModelSolver lpModelLoader)
|
void |
setLpSolver(LPSolver lpSolver)
|
| Methods inherited from class net.sourceforge.combean.graph.alg.AbstractGraphAlg |
|---|
getGraph, setGraph |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.GraphAlgorithm |
|---|
getGraph, setGraph |
| Constructor Detail |
|---|
public MinCostFlowByLPAlg()
| Method Detail |
|---|
public final void setLpModelLoader(LPModelSolver lpModelLoader)
lpModelLoader - public final void setLpSolver(LPSolver lpSolver)
lpSolver - The lpSolver to set.public void setEdgeWeightsMap(FixedDoubleEdgeMap edgeWeights)
MinCostFlowAlg
setEdgeWeightsMap in interface MinCostFlowAlgedgeWeights - a map containing the cost of each edge in the graphpublic void setInflowMap(FixedDoubleNodeMap inflowMap)
FeasibleFlowAlg
setInflowMap in interface FeasibleFlowAlginflowMap - the inflow at each node.public void setEdgeCapacityMap(FixedDoubleEdgeMap edgeCapacities)
AbstractFlowAlg
setEdgeCapacityMap in interface AbstractFlowAlgedgeCapacities - a map containing the edge capacities.public void run()
GraphAlgorithm
run in interface GraphAlgorithmpublic boolean isFeasible()
FeasibleFlowAlg
isFeasible in interface FeasibleFlowAlgpublic double getTotalCost()
MinCostFlowAlg
getTotalCost in interface MinCostFlowAlgpublic FixedDoubleEdgeMap getFlowMap()
AbstractFlowAlg
getFlowMap in interface AbstractFlowAlg
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||