Minimum Cost
{ Exmpl9.6-1_MinCost.mpl }
{ Hillier and Lieberman, Introduction to Operations Research, 9th ed. }
{ Chapter 9.6, Example 1, Minimum cost flow, Size: 7x7, Page 384 }
TITLE
MinimumCost;
INDEX
node := (A, B, C, D, E);
FromNode := node;
ToNode := node;
DATA
UnitCost[FromNode, ToNode] :=
[A, B, 2,
A, C, 4,
A, D, 9,
B, C, 3,
C, E, 1,
D, E, 3,
E, D, 2];
Capacity[FromNode, ToNode] :=
[A, B, 10,
C, E, 80];
SupplyDemand[node] := (50, 40, 0, -30, -60);
VARIABLES
Ship[FromNode,ToNode] WHERE (UnitCost > 0)
MODEL
MIN TotalCost = SUM(FromNode, ToNode: UnitCost * Ship);
SUBJECT TO
FlowBalance[node]:
SUM(FromNode: Ship[FromNode,ToNode:=node]) + SupplyDemand
=
SUM(ToNode: Ship[FromNode:=node,ToNode]);
MaxCapacity[FromNode, ToNode] WHERE (Capacity > 0):
Ship <= Capacity;
END
Back To Top
|
Maximal Home Page
|
List of Models |
Previous Page
|
Next Page