Traffic
{ Exmpl8.5-7_Traffic.mpl }
{ Winston, Operations Research, Applications and Algorithms, 4th ed. }
{ Chapter 8.5, Example 7, Minimum Cost Flow, Size: 5x9, Page 452 }
TITLE
Traffic;
INDEX
node := 1..6;
node2 := node;
DATA
Cars := 900;
PathCapacity[node,node2] := [1,2,800,
1,3,600,
2,5,100,
2,4,600,
5,6,600,
4,5,600,
4,6,400,
3,5,400,
3,4,300];
TravelTime[node,node2] := [1,2,10,
1,3,50,
2,5,70,
2,4,30,
5,6,30,
4,5,30,
4,6,60,
3,5,60,
3,4,10];
VARIABLE
CarNumber[node,node2] WHERE (TravelTime > 0);
MODEL
MIN TotalTime = SUM(node,node2: CarNumber * TravelTime);
SUBJECT TO
StartFlow[node=1]:
SUM(node2: CarNumber) = Cars;
TransFlow[node=2..5]:
SUM(node2: CarNumber) = SUM(node2: CarNumber[node:=node2,node2:=node]);
FinishFlow[node>1]:
SUM(node: CarNumber) = Cars;
BOUNDS
Cap: CarNumber <= PathCapacity;
END
Back To Top
|
Maximal Home Page
|
List of Models |
Previous Page
|
Next Page