Maximum Flow
{ Exmpl9.5-1_MaxFlow.mpl }
{ Hillier and Lieberman, Introduction to Operations Research, 9th ed. }
{ Chapter 9.5, Example 1, Maximum Flow, Size: 7x14, Page 373 }
TITLE
MaximumFlow;
INDEX
node := (O, A, B, C, D, E, T);
FromNode := node;
ToNode := node;
SourceNode[node] := (O);
DestNode[node] := (T);
DATA
Capacity[FromNode, ToNode] :=
[O, A, 5,
O, B, 7,
O, C, 4,
A, B, 1,
A, D, 3,
B, C, 2,
B, D, 4,
B, E, 5,
C, E, 4,
D, T, 9,
E, D, 1,
E, T, 6];
VARIABLES
Flow[FromNode, ToNode] -> x WHERE (Capacity > 0);
Entrance[node=O];
Destination[node=T];
MODEL
MAX TotalFlow = Entrance[O];
SUBJECT TO
FlowBalance[node]:
Entrance + SUM(FromNode: Flow[FromNode,ToNode:=node])
=
Destination + SUM(ToNode: Flow[FromNode:=node,ToNode]);
BOUNDS
Flow <= Capacity;
END
Back To Top
|
Maximal Home Page
|
List of Models |
Previous Page
|
Next Page