EMIS Lecture 3 – pages Pi Hybrids Model On Page 39 FacilitiesSales Regions OK TX MI AR LA TN 4x6=24
EMIS Multiple Commodities h in the set {a,b,c,d,e} For commodity a we have For commodity b we have 4x6x5 = 120 arcs!
EMIS 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 p fh – cost/bag for producing corn type h at facility f (4x5=20) u f – capacity of facility f (bushels) (4) a h – bushels of corn that must be processed to produce 1 bag of corn type h (bushels/bag) (5)
EMIS More Constants d hr – demand for h in region r (5x6=30) (bags) s fhr – cost to ship one unit of product h from facility f to sales region r (4x5x6=120) ($/bag)
EMIS Variables x fh – bags of corn type h produced at facility f (4x5=20) y fhr – bags of corn of type h shipped from facility f to sales region r (4x5x6 = 120) Note: There are 140 unknowns in this problem.
EMIS Constraints Capacity Of Facilities (4) h H a h x fh < u f, for all f F Demands At Sales Regions (5x6=30) f F y fhr = d hr, for all h H and r R
EMIS More Constraints Balance (4x5=20) r R y fhr = x fh, for all f F, h H Nonnegativity (140) x fh > 0, for all f F, h H y fhr > 0, for all f F, h H, r R
EMIS Objective Function Minimize f F h H p fh x fh + f F h H r R s fhr y fhr Production Cost Shipping Cost
EMIS 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};
EMIS 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];
EMIS 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];
EMIS Section 2.4 Linear & Nonlinear Functions General Optimization Problem minimize f(x) subject to g i (x) < b i, for all i Linear Function Is Simply: i=1..n a i x i = a 1 x 1 + a 2 x 2 + …+ a n x n
13 Nonlinear Optimization Everything That Is Not Linear Is Nonlinear One Nonlinear Function Is The Log Function XLog(X+1)
EMIS 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 p g – denotes the profit percentage for product g
EMIS More E-Mart s gc – denotes the increase in sales constant for product g using advertising type c b – denotes the advertising budget Variables x c – denotes the amount of money to spend on advertising type c
EMIS E-Mart Continued Constraints Budget Restriction c=1,2,3 x c < b Nonnegativity x c > 0, for c=1,2,3 Objective maximize g=1,2,3,4 p g c=1,2,3 s gc log(x c +1)
EMIS MINOS Can Solve But Not CPLEX Solution: x 1 = x 2 = x 3 = 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.
EMIS 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
EMIS Bethlehem Ingot Mold Subscripts i – mold design number ( i=1,2,3,4) j – product number (j=1,..,6) Sets M j – set of molds that can be used to produce product j That is M 1 = {1,2,3}, M 2 = {2,3,4}, …, M 6 = {2,4}
EMIS Constants P – max number of molds that can be used C ji – waste produced when mold i is used to create product j (j = 1,…,6; i M j ) Variables y i = 1, if mold type i is used = 0, otherwise x ji = 1, if mold type i is used to produce product j = 0, otherwise
EMIS Constraints sum { i in {1..4}} y i < P (max # molds that can be used) sum {i in M j } x ji = 1; j = 1,..,6 (each product must be assigned to 1 mold) x ji < y i ; j=1,…,6; i M j (products can be made from mold i only if mold i is selected for use)
EMIS Objective Minimize sum { j in {1..6}} sum {i in M j } c ji x ji That is, minimize scrap.