AMPLMoment
Figure 6.35 provides the AMPL model for the maximal flow problem. The data applies
to Example 6.4-2 (file ampIEx6.4-2.txt). The overall idea of determining the input and
output flows at a node is similar to the one detailed following Example 6.3-6 of the
shortest-route model (you will find it helpful to review files amplEx6.3-6a.txt and
ampIEx6.3-6b.txt first). However, because the model is designed to find the maximum
flow between any two nodes, start and end, two additional constraints are needed to
ensure that no flow enters start and no flow Leaves end. Constraints inStart and