Home | Research Interests | Publications | Positions | Personal | Models | Seminar Abstracts | Powerpoint Talks
 

 

» Agprice
» Constraint
» Curve
  Decent
» Distrib
» Economy
» Efficient
» Factory
» Farm
» Food
» Hydro
» Logic
» Manpower
» Market
» Milk
» Mining
» OandX
» Opencast
» Refinery
» Tariff
» TSP
» Yield
 

Model Decent

  MODEL Decent
  SET
   

ndepts = {1 .. 5},

! departments
   

ncities = {1 .. 3},

! cities, Bristol, Brighton, london
   

ncitiesm1 = {1 .. 2};

! cities, Bristol, Brighton
  DATA
   

benefit[ndepts,ncities] = [10,10,0,15,20,0,10,15,0,20,15,0,5,15,0],

! benefits (£k)
   

dist[ncities,ncities] = [5,14,13,14,5,9,13,9,10],

! communication costs/unit(£)
   

comm[ndepts,ndepts] =[0,0,1.0,1.5,0.0,0,0,1.4,1.2,0.0,0,0,0.0,

! quantities of communication (k units)
                                              0.0, 2.0,0,0,0.0,0.0,0.7,0,0,0.0,0.0,0.0];  
  VARIABLES
   

d[ndepts,ncities] integer,

! =1 iff dept i in city j
   

g[ndepts,ncities,ndepts,ncities] integer;

! =1 iff dept i in city j and dept k in city l
  OBJECTIVE
   

MAXIMIZE tcost = sum{i in ndepts, j in ncitiesm1} benefit[i,j]*

                                                  d[i,j] -sum{i in ndepts, j in ncities, k in ndepts,
                                                  l in ncities, k> i} (comm[i,k]*dist[j,l])*g[i,j,k,l];
  CONSTRAINTS
   

dept{i in ndepts} : sum{j in ncities} d[i,j] = 1,

! each dept i located somewhere
   

city{j in ncities} : sum{i in ndepts} d[i,j] <= 3,

! at most 3 depts in each city
   

for{i in ndepts, j in ncities, k in ndepts, l in ncities, k>i}

! logical relations
               {g[i,j,k,l] - d[i,j] <= 0, g[i,j,k,l] - d[k,l] <= 0, d[i,j] + d[k,l] -
                  g[i,j,k,l] <= 1, g[i,j,k,l] <= 1},
   

for{i in ndepts, j in ncities} {d[i,j] <= 1};

  END MODEL
   

solve Decent;

   

print solution for Decent >> "Decent.sol";

   

quit;

   

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

 

 

 

 

 

 

 

 

 
         
 
Site updated December 2021 | email: h.p.williams@lse.ac.uk