Assignment Problem
{ Exmpl3.3-2_Assignment.mpl }
{ AMPL A Modeling Language for Mathematical Programming, 2nd Edition }
{ Chapter 3.3, Assignment, Size: 22x121, Page 49 }
TITLE
Assignment;
INDEX
origin := (coullard,daskin,hazen,hopp,iravani,linetsky,mehrotra,nelson,smilowitz,tamhane,white);
dest := (c118,c138,c140,c246,c250,c251,d237,d239,d241,m233,m239)
DATA
Supply := 1;
Demand := 1;
Cost[origin,dest] := ( 6, 9, 8, 7,11,10, 4, 5, 3, 2, 1,
11, 8, 7, 6, 9,10, 1, 5, 4, 2, 3,
9,10,11, 1, 5, 6, 2, 7, 8, 3, 4,
11, 9, 8,10, 6, 5, 1, 7, 4, 2, 3,
3, 2, 8, 9,10,11, 1, 5, 4, 6, 7,
11, 9,10, 5, 3, 4, 6, 7, 8, 1, 2,
6,11,10, 9, 8, 7, 1, 2, 5, 4, 3,
11, 5, 4, 6, 7, 8, 1, 9,10, 2, 3,
11, 9,10, 8, 6, 5, 7, 3, 4, 1, 2,
5, 6, 9, 8, 4, 3, 7,10,11, 2, 1,
11, 9, 8, 4, 6, 5, 3,10, 7, 2, 1);
VARIABLE
Trans[origin,dest];
MODEL
MIN TotalCost = SUM(origin,dest: Cost * Trans);
SUBJECT TO
Supplying[origin] -> SUP:
SUM(dest: Trans) = Supply;
Meetdemand[dest] -> DEM:
SUM(origin: Trans) = Demand;
END
Back To Top
|
Maximal Home Page
|
List of Models |
Previous Page
|
Next Page