EMIS 33601 Lecture 3 – pages 39 - 57 Pi Hybrids Model On Page 39 FacilitiesSales Regions 1 2 3 4...

22
EMIS 3360 1 Lecture 3 – pages 39 - 57 Pi Hybrids Model On Page 39 Facilities Sales Regions 1 2 3 4 OK TX MI AR LA TN 4x6=24

Transcript of EMIS 33601 Lecture 3 – pages 39 - 57 Pi Hybrids Model On Page 39 FacilitiesSales Regions 1 2 3 4...

EMIS 3360 1

Lecture 3 – pages 39 - 57

Pi Hybrids Model On Page 39

Facilities Sales Regions

1

2

3

4

OKTX

MI

AR

LATN

4x6=24

EMIS 3360 2

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 3360 3

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)

EMIS 3360 4

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)

EMIS 3360 5

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.

EMIS 3360 6

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

EMIS 3360 7

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

EMIS 3360 8

Objective Function

Minimize fF hH pfhxfh + fF hH rR sfhryfhr

Production Cost Shipping

Cost

EMIS 3360 9

AMPL Model For Pi Problem

# Define Setsset F; set H; set R;

#Define Constantsparam p {F,H}; param u {F}; param a {H};

param d {H,R}; param s {F,H,R};

EMIS 3360 10

AMPL Model Continued

#Define Variablesvar 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 3360 11

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 3360 12

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

EMIS 3360 13

Nonlinear Optimization

Everything That Is Not Linear Is NonlinearOne Nonlinear Function Is The Log Function

X Log(X+1)

0 0

10 1.04

20 1.32

30 1.49

40 1.61

50 1.71

100 2.00

EMIS 3360 14

E-Mart Example On Page 50

Subscriptsg – 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)

Constantspg – denotes the profit percentage for product

g

EMIS 3360 15

More E-Mart

sgc – denotes the increase in sales constant for product g using advertising type c

b – denotes the advertising budget

Variablesxc – denotes the amount of money to

spend on advertising type c

EMIS 3360 16

E-Mart Continued

ConstraintsBudget Restrictionc=1,2,3 xc < b

Nonnegativity xc > 0, for c=1,2,3

Objectivemaximize g=1,2,3,4 pg c=1,2,3 sgc log(xc+1)

EMIS 3360 17

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.

EMIS 3360 18

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 3360 19

Bethlehem Ingot Mold

Subscripts i – mold design number ( i=1,2,3,4) j – product number (j=1,..,6)

SetsMj – set of molds that can be used to produce product j

That is M1 = {1,2,3}, M2 = {2,3,4}, …, M6 = {2,4}

EMIS 3360 20

ConstantsP – 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)

Variablesyi = 1, if mold type i is used

= 0, otherwisexji = 1, if mold type i is used to produce product j

= 0, otherwise

EMIS 3360 21

Constraintssum { 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)

EMIS 3360 22

Objective

Minimize sum { j in {1..6}} sum {i in Mj} cji xji

That is, minimize scrap.