Modelling Using Linear Programs
Transportation Problem
Suppose there are \(m\) suppliers and \(n\) customers. The \(i\)'th supplier can supply up to \(s_i\) units of supply, and the \(j\)'th customer has \(d_j\) units of demand. It costs \(c_{ij}\) to transport a unit of product from \(i\)'th supplier to the \(j\)'th customer. We want to find a transportation schedule to satisfy all demands with minimum transportation cost.
Let \(x_{ij}\) denote the amount of product trasnported from \(i\)'th supplier to \(j\)'th customer for \(i = 1, \ldots, m\) and \(j = 1, \ldots, n\). The LP is then:
Maximum Flow Problem
Let \(x_{ij}\) for \((i, j) \in A\), where \(A\) is the set of arcs. Figure 2 shows the I/O for a single node.
Then we can formulate the problem as an LP:
Here, the first constraint is called the flow conservation constraint. The second constraint is called the
Shortest Path Problem
Figure 3 shows a directed network, where then number on each edge is the distance for traversing that edge. We want to go from starting point \(s\) to the target point \(t\).
The basic idea is to find a minimum cost way to ship 1 unit of flow from \(s\) to all other nodes as shown in Figure 4.
The shortest distance from \(s\) to \(t\) can be formulated as an LP: