220 likes | 296 Views
Lecture 3. OK. TX. 1. Pi Hybrids Model On Page 39 Facilities Sales Regions. MI. 2. AR. 3. LA. TN. 4. 4x6=24. Multiple Commodities. h in the set {a,b,c,d,e} For commodity a we have For commodity b we have. 4x6x5 = 120 arcs!. Subscripts & Sets.
E N D
Lecture 3 OK TX 1 Pi Hybrids Model On Page 39 Facilities Sales Regions MI 2 AR 3 LA TN 4 4x6=24
Multiple Commodities h in the set {a,b,c,d,e} For commodity a we have For commodity b we have 4x6x5 = 120 arcs!
Subscripts & Sets f – Facilities f F = {1,2,3,4} h – Corn Type h H = {a,b,c,d,e} r – Sales Region r R = {OK,TX,MI,AR,LA,TN} Constants pfh – cost/bag for producing corn type h at facility f (4x5=20) uf – capacity of facility f (bushels) (4) ah – bushels of corn that must be processed to produce 1 bag of corn type h (bushels/bag) (5)
More Constants dhr – demand for h in region r (5x6=30) (bags) sfhr – cost to ship one unit of product h from facility f to sales region r (4x5x6=120) ($/bag)
Variables xfh – bags of corn type h produced at facility f (4x5=20) yfhr – bags of corn of type h shipped from facility f to sales region r (4x5x6 = 120) Note: There are 140 unknowns in this problem.
Constraints Capacity Of Facilities (4) hH ahxfh< uf, for all f F Demands At Sales Regions (5x6=30) fF yfhr = dhr, for all h H and r R
More Constraints Balance (4x5=20) rR yfhr = xfh, for all f F, h H Nonnegativity (140) Xfh> 0, for all f F, h H Yfhr > 0, for all f F, h H, r R
Objective Function Minimize fF hH pfhxfh + fF hH rR sfhryfhr Production Cost Shipping Cost
AMPL Model For Pi Problem # Define Sets set F; set H; set R; #Define Constants param p {F,H}; param u {F}; param a {H}; param d {H,R}; param s {F,H,R};
AMPL Model Continued #Define Variables var x {F,H} >= 0; var y {F,H,R} >= 0; #Define Constraints subject to CoF {f in F}: sum {h in H} a[h]*x[f,h] <= u[f]; subject to DaR {h in H, r in R}: sum {f in F} y[f,h,r] = d[h,r];
AMPL Model Continued subject to B {f in F, h in H}: sum {r in R} y[f,h,r] = x[f,h]; #Define Objective Function minimize cost: sum {f in F, h in H} p[f,h]*x[f,h] + sum {f in F, h in H, r in R} s[f,h,r]*y[f,h,r];
Section 2.4 Linear & Nonlinear Functions General Optimization Problem minimize f(x) subject to gi(x) < bi, for all i Linear Function Is Simply: I=1..n aixi = a1x1 + a2x2 + …+ anxn
Nonlinear Optimization Everything That Is Not Linear Is Nonlinear One Nonlinear Function Is The Log Function
E-Mart Example On Page 50 Subscripts g – denotes the product type (g=1,2,3,4) c – advertising type (c=1,2,3) Note: Advertising has decreasing returns (a nonlinear return function involving a log) Constants pg – denotes the profit percentage for product g
More E-Mart sgc – denotes the increase in sales constant for product g using advertising type c b – denotes the advertising budget Variables xc – denotes the amount of money to spend on advertising type c
E-Mart Continued Constraints Budget Restriction c=1,2,3 xc< b Nonnegativity xc > 0, for c=1,2,3 Objective maximize g=1,2,3,4 pg c=1,2,3 sgc log(xc+1)
MINOS Can Solve But Not CPLEX Solution: x1 = 34148.1 x2 = 34542.4 x3 = 31309.6 MINOS can solve linear and nonlinear problems CPLEX can solve linear, quadratic, and linear integer problems. We use CPLEX in all of our research models.
Integer Programming Section 2.5 The variables must assume integer values. There are two types of integer variables, binary (0,1) and standard integer. var X binary; implies that X is either 0 or 1 var Y integer >= 4, <= 10; implies that Y is one of the following values: 4,5,6,7,8,9,10
Bethlehem Ingot Mold Subscripts i – mold design number ( i=1,2,3,4) j – product number (j=1,..,6) Sets Mj – set of molds that can be used to produce product j That is M1 = {1,2,3}, M2 = {2,3,4}, …, M6 = {2,4}
Constants P – max number of molds that can be used Cji – waste produced when mold i is used to create product j (j = 1,…,6; i Mj) Variables yi = 1, if mold type i is used = 0, otherwise xji = 1, if mold type i is used to produce product j = 0, otherwise
Constraints sum { i in {1..4}} yi< P (max # molds that can be used) sum {i in Mj} xji = 1; j = 1,..,6 (each product must be assigned to 1 mold) xji< yi; j=1,…,6; i Mj (products can be made from mold i only if mold i is selected for use)
Objective Minimize sum { j in {1..6}} sum {i in Mj} cji xji That is, minimize scrap.