Minimum cost flow problem
Let a graph $G = (V, E)$ where $V=\set{1,2,\ldots,n}$.
For each edge $(i,j)\in E$, an amount $x_{ij}$ flows from vertex $i$ to vertex $j$. We impose the following constraints:
-
Flow is conserved at each vertex. We fix a vector $\v b\in\R^n$ which indicates the amount of flow $b_i$ that enters a vertex $i$. A vertex with $b_i>0$ is called a source and a vertex with $b_i<0$ is called a sink.
-
$n\times n$ matrices $\underline{M} = (\underline{m}_{ij})$ and $\overline{M} = (\overline{m}_{ij})$ give the lower and upper bounds for the flow $x_{ij}$.
-
$n\times n$ matrices $C = (c_{ij})$ gives the cost per unit flow on the edge $(i,j)$.
$$ \begin{align*} \text{Minimise } & \sum_{(i,j)\in E} c_{ij} x_{ij} \\ \text{subject to } & b_i + \sum_{(j,i)\in E} x_{ji} = \sum_{(i,j)\in E} x_{ij} \quad \forall i\in V, \\ & \underline{m}_{ij} \leq x_{ij} \leq \overline{m}_{ij}. \end{align*} $$
For the problem to be feasible, we require $\sum_{i\in V} b_i = 0$.