FindMinimumCostFlow
FindMinimumCostFlow[g,{sd1,sd2,…}]
finds the minimum cost flow in the graph g with sd1, sd2, … vertex supplies or demands.
FindMinimumCostFlow[g,s,t]
finds the minimum cost maximum flow between source vertex s and target vertex t in a graph g.
FindMinimumCostFlow[g,s,t,d]
finds the minimum cost flow between source s and target t, with the required flow d.
FindMinimumCostFlow[m,…]
finds the minimum cost flow in a graph with cost matrix m.
FindMinimumCostFlow[data,…,"property"]
returns the value of "property".
FindMinimumCostFlow[{vw,…},…]
uses rules vw to specify the graph g.
Details and Options
- FindMinimumCostFlow finds a flow of minimum total cost from a set of supply vertices to a set of demand vertices in a graph with capacity constraints and edge costs.
- By default, the minimum total cost is returned.
- Matrices and SparseArray objects can be used in FindMinimumCostFlow.
- For undirected graphs, edges are taken to have flows in both directions at the same time and same capacities.
- Self-loops are ignored and parallel edges are merged.
- FindMinimumCostFlow[data,…,"OptimumFlowData"] returns an OptimumFlowData object flowdata that can be used to extract additional properties, using the form flowdata["property"].
- FindMinimumCostFlow[data,…,"property"] can be used to directly give the value of "property".
- Properties related to the optimal flow data include:
-
"CostValue" cost of the flow "EdgeList" list of edges contributing to the flow "FlowGraph" graph of vertices and edges contributing to the flow "FlowMatrix" matrix of edge flows between pairs of vertices "FlowValue" value of the flow "VertexList" list of vertices contributing to the flow - The following options can be given:
-
EdgeCapacity Automatic capacity bounds for each edge EdgeCost Automatic cost per unit flow on edges - With the default setting EdgeCapacity->Automatic, the edge capacity of an edge is taken to be the EdgeCapacity in the graph g if available, otherwise Infinity.
- With the default setting EdgeCost->Automatic, the cost per unit flow on an edge is taken to be the EdgeCost in the graph g if available, otherwise 1.
- FindMinimumCostFlow works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examples
open allclose allBasic Examples (2)
Scope (10)
FindMinimumCostFlow works with undirected graphs:
Use rules to specify the graph:
Compute the minimum cost flow with vertex supplies:
Compute the minimum cost flow with a required flow:
Compute the minimum cost flow for a cost matrix:
Find properties of a minimum cost flow:
Text
Wolfram Research (2012), FindMinimumCostFlow, Wolfram Language function, https://reference.wolfram.com/language/ref/FindMinimumCostFlow.html (updated 2015).
CMS
Wolfram Language. 2012. "FindMinimumCostFlow." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/FindMinimumCostFlow.html.
APA
Wolfram Language. (2012). FindMinimumCostFlow. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindMinimumCostFlow.html