$ondollar title Tmark (ILP) Example 11.10 of Rardin (1998) $offsymxref offsymlist offuelxref offuellist offupper option limrow = 0, limcol = 0; sets j "calling zone" /1*14/, i "possible centers" /1*8/; table c(j,i) "unit calling cost from i to j" 1 2 3 4 5 6 7 8 1 1.25 1.40 1.10 0.90 1.50 1.90 2.00 2.10 2 0.80 0.90 0.90 1.30 1.40 2.20 2.10 1.80 3 0.70 0.40 0.80 1.70 1.60 2.50 2.05 1.60 4 0.90 1.20 1.40 0.50 1.55 1.70 1.80 1.40 5 0.80 0.70 0.60 0.70 1.45 1.80 1.70 1.30 6 1.10 1.70 1.10 0.60 0.90 1.30 1.30 1.40 7 1.40 1.40 1.25 0.80 0.80 1.00 1.00 1.10 8 1.30 1.50 1.00 1.10 0.70 1.50 1.50 1.00 9 1.50 1.90 1.70 1.30 0.40 0.80 0.70 0.80 10 1.35 1.60 1.30 1.50 1.00 1.20 1.10 0.70 11 2.10 2.90 2.40 1.90 1.10 2.00 0.80 1.20 12 1.80 2.60 2.20 1.80 0.95 0.50 2.00 1.00 13 1.60 2.00 1.90 1.90 1.40 1.00 0.90 0.80 14 2.00 2.40 2.00 2.20 1.50 1.20 1.10 0.80; parameter d(j) "demand at j" /1 250, 2 150, 3 1000, 4 80, 5 50, 6 800, 7 325, 8 100, 9 475, 10 220, 11 900, 12 1500, 13 430, 14 200/; parameter f(i) "fixed charge for a center at i" /1 2400, 2 7000, 3 3600, 4 1600, 5 3000, 6 4600, 7 9000, 8 2000/; scalars mincalls "minimum number of calls per center" /1500/, maxcalls "maximum number of calls per center" /5000/; free variable totcost "total cost"; positive variable x(i,j) "fraction of j serviced from i"; binary variable y(i) "whether a center is opened at i"; equations obj "min total cost" serv(j) "each j serviced from somewhere", minc(i) "minimum number of calls at i", maxc(i) "maximum number of calls at i"; obj.. totcost =e= sum((i,j), c(j,i)*d(j)*x(i,j)) + sum(i, f(i)*y(i)); serv(j).. sum(i, x(i,j)) =e= 1; minc(i).. mincalls*y(i) =l= sum(j, d(j)*x(i,j)); maxc(i).. sum(j, d(j)*x(i,j)) =l= maxcalls*y(i); model tmark /all/; solve tmark using mip minimizing totcost;