$ondollar title Tubular Products (LP) Example 4.3 of Rardin(1998) $offsymxref offsymlist offuelxref offuellist offupper option limrow = 0, limcol = 0; sets p "products" /1*16/, m "mills" /1*4/; table c(p,m) "unit cost of p at m" 1 2 3 4 1 90 75 70 63 2 80 70 65 60 3 104 85 83 77 4 98 79 80 74 5 123 101 110 99 6 113 94 100 84 7 160 156 140 8 142 150 130 9 140 110 122 10 124 96 101 11 160 133 138 12 143 127 133 13 202 150 160 14 190 141 140 15 190 220 16 175 200; table t(p,m) "unit time for p at m" 1 2 3 4 1 0.8 0.7 0.5 0.6 2 0.8 0.7 0.5 0.6 3 0.8 0.7 0.5 0.6 4 0.8 0.7 0.5 0.6 5 0.8 0.7 0.5 0.6 6 0.8 0.7 0.5 0.6 7 0.9 0.5 0.6 8 0.9 0.5 0.6 9 1.5 0.9 1.2 10 1.5 0.9 1.2 11 1.5 0.9 1.2 12 1.5 0.9 1.2 13 1.5 0.9 1.2 14 1.5 0.9 1.2 15 1.0 1.5 16 1.0 1.5; parameter d(p) "weekly demand for p" /1 100, 2 630, 3 500, 4 980, 5 720, 6 240, 7 75, 8 22, 9 50, 10 22, 11 353, 12 55, 13 125, 14 35, 15 100, 16 10/; parameter b(m) "mill m capacity" /1 800, 2 480, 3 1280, 4 960/; free variable cost "objective value"; positive variable x(p,m) "units of p produced at m"; equations obj "total cost", dem(p) "demand for product p", cap(m) "capacity of mill m"; obj.. cost =e= sum((p,m)$(c(p,m) gt 0.0), c(p,m)*x(p,m)); dem(p).. sum(m$(c(p,m) gt 0.0), x(p,m)) =g= d(p); cap(m).. sum(p$(c(p,m) gt 0.0), t(p,m)*x(p,m)) =l= b(m); model tubprods /all/; solve tubprods using lp minimizing cost;