Interface MinimumCostFlowProblem<V,​E>

• Type Parameters:
V - the graph vertex type
E - the graph edge type
All Known Implementing Classes:
MinimumCostFlowProblem.MinimumCostFlowProblemImpl

public interface MinimumCostFlowProblem<V,​E>
This class represents a minimum cost flow problem. It serves as input for the minimum cost flow algorithms.

The minimum cost flow problem is defined as follows: \begin{align} \mbox{minimize}~& \sum_{e\in \delta^+(s)}c_e\cdot f_e &\\ \mbox{s.t. }&\sum_{e\in \delta^-(i)} f_e - \sum_{e\in \delta^+(i)} f_e = b_e & \forall i\in V\\ &l_e\leq f_e \leq u_e & \forall e\in E \end{align} Here $\delta^+(i)$ and $\delta^-(i)$ denote the outgoing and incoming edges of vertex $i$ respectively. The parameters $c_{e}$ define a cost for each unit of flow on the arc $e$, $l_{e}$ define minimum arc flow and $u_{e}$ define maximum arc flow.

Author:
Timofey Chudakov
MinimumCostFlowAlgorithm
• Nested Class Summary

Nested Classes
Modifier and Type Interface Description
static class  MinimumCostFlowProblem.MinimumCostFlowProblemImpl<V,​E>
Default implementation of a Minimum Cost Flow Problem
• Method Summary

All Methods
Modifier and Type Method Description
java.util.function.Function<E,​java.lang.Integer> getArcCapacityLowerBounds()
Returns a function which specifies the minimum capacity of an arc.
java.util.function.Function<E,​java.lang.Integer> getArcCapacityUpperBounds()
Returns a function which specifies the maximum capacity of an arc.
Graph<V,​E> getGraph()
Returns the flow network
java.util.function.Function<V,​java.lang.Integer> getNodeSupply()
Returns a function which defines the supply and demand of each node in thet network.
• Method Detail

• getGraph

Graph<V,​E> getGraph()
Returns the flow network
Returns:
the flow network
• getNodeSupply

java.util.function.Function<V,​java.lang.Integer> getNodeSupply()
Returns a function which defines the supply and demand of each node in thet network. Supplies can be positive, negative or 0. Nodes with positive negative supply are the demand nodes, nodes with zero supply are the transhipment nodes. Flow is always directed from nodes with postive supply to nodes with negative supply. Summed over all nodes, the total demand should equal 0.
Returns:
supply function
• getArcCapacityLowerBounds

java.util.function.Function<E,​java.lang.Integer> getArcCapacityLowerBounds()
Returns a function which specifies the minimum capacity of an arc. The minimum capacity is the minimum amount of flow that has to go through an arc.
Returns:
arc capacity lower bounding function
• getArcCapacityUpperBounds

java.util.function.Function<E,​java.lang.Integer> getArcCapacityUpperBounds()
Returns a function which specifies the maximum capacity of an arc. The flow through an arc cannot exceed this upper bound.
Returns:
arc capacity upper bounding function