# ---------------------------------------- # LOCATION-TRANSPORTATION PROBLEM # # Sample problem for IE311.01 # # M.C. PINAR # # 1.11.2001 # # The problem is to minimize total shipping cost # between a set of cities # # subject to # 1.total shipment from city i to all other cities # cannot exceed total supply of city i if city i # is used as supply point (i.e., the variable Build[i] # is set to 1 # 2.total shipment in to city j should be at least as much # as its total demand # 3.there is a limit on the number of cities that are # used as supply point. # # data for the problem is given in file TRNLOC.DAT # ---------------------------------------- set CITY; param build_limit integer; param demand {i in CITY} integer > 0; param supply {CITY} integer > 0; param ship_cost {i in CITY, j in CITY} >= 0; var Build {CITY} integer >= 0 <= 1; # = 1 iff warehouse built at i var Ship {CITY,CITY} >= 0; # amounts shipped minimize Shipping_Cost: sum {i in CITY, j in CITY} ship_cost[i,j] * Ship[i,j]; subj to Supply {i in CITY}: sum {j in CITY} Ship[i,j] <= supply[i] * Build[i]; subj to Demand {j in CITY}: sum {i in CITY} Ship[i,j] >= demand[j]; subj to Limit: sum {i in CITY} Build[i] <= build_limit;