CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and...

19
CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming and applications Quiz 4 (sections 3.1, 3.2 and 3.3) Next class: 3. Linear programming

description

3. Linear programming & applications 3.1. What is linear programming (LP)? 3.2. How to develop a LP model? 3.3. How to solve a LP model graphically? 3.4. How to solve a LP model in Excel? 3.5. How to do sensitivity analysis? 3.6. What are some special cases of LP?

Transcript of CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and...

Page 1: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

CDAE 266 - Class 15Oct. 16

Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7Today: 3. Linear programming and applications Quiz 4 (sections 3.1, 3.2 and 3.3)Next class: 3. Linear programming Group project 2 (read the project and develop a

LP model before the class)

Page 2: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

CDAE 266 - Class 15Oct. 16

Important dates: Problem set 3: due Tuesday, Oct. 23 Problems 8-1, 8-2, 8-3, 8-5 and 8-14 (pp. 3-29 and 3-30)

Group project 2 (case 1 on page 3-31): due Tuesday, Oct. 23

Midterm exam: Thursday, Oct. 25

Page 3: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

3. Linear programming & applications

3.1. What is linear programming (LP)? 3.2. How to develop a LP model? 3.3. How to solve a LP model graphically? 3.4. How to solve a LP model in Excel? 3.5. How to do sensitivity analysis? 3.6. What are some special cases of LP?

Page 4: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

3.3. How to solve a LP model graphically? 3.3.2. Major steps of solving a LP

model graphically: (1) Plot each constraint (2) Identify the feasible region

(3) Plot the objective function (4) Move the objective function to

identify the “optimal point” (most attractive

corner) (5) Identify the two constraints that

determine the “optimal point” (6) Solve the system of 2 equations (7) Calculate the optimal value of the

objective function.

Page 5: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

3.3. How to solve a LP model graphically? 3.3.3. Example 1 -- Furniture Co.

XT = Number of tables XC = Number of chairs

Maximize P = 6XT + 8XC

subject to: 30XT + 20XC < 300 (wood) 5XT + 10XC < 110 (labor) XT > 0 XC > 0

Page 6: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

3.3. How to solve a LP model graphically? 3.3.3. Example 1

(1) Plot each constraint (a) XT > 0 (b) XC > 0 (c) 30XT + 20XC < 300 (wood) (d) 5XT + 10XC < 110 (labor)

(2) Find the feasible region (3) Plot the objective function (4) Move the objective function to

identify the optimal point (most attractive corner)

Page 7: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

3.3. How to solve a LP model graphically? 3.3.3. Example 1

(5) Identify the two constraints that determine the “optimal point”

(6) Solve the system of 2 equations 30XT + 20XC = 300

(wood) 5XT + 10XC = 110

(labor) Solution: XT = , XC =

(7) Calculate the optimal value of the

objective function.

P = 6XT + 8XC =

Page 8: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

3.3. How to solve a LP model graphically? 3.3.4. Example 2 -- Galaxy Industries

XS = Number of space ray XZ = Number of zappers

Maximize P = 8XS + 5XZ

subject to 2XS + 1XZ < 1200 (plastic)3XS + 4XZ < 2400 (labor)XS + XZ < 800 (total)XS < XZ + 450 (mix)XS > 0XZ > 0

Page 9: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

1200

600

Xz

The Plastic constraint

FeasibleXs

Plastic constraint

Infeasible

Labor constraint

600

800

Total production constraint

Production mix constraint

Page 10: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

Recall the feasible region

600

800

1200

400 600 800

Xz

Xs

We now demonstrate the search for an optimal solution Start at some arbitrary profit, say profit = $2,000 ...

Profit = $ 000

2,

Then increase the profit, if possible...

3,4,

… and continue until it becomes infeasible

Profit =$5040

Page 11: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

600

800

1200

400 600 800

Xz

Xs

Let’s take a closer look at the optimal point

FeasibleregionFeasibleregion

Page 12: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

Questions:1. Why do we need to plot the objective function?

(a) The optimal point IS NOT always the intersecting point when you have two straight-line

constraints

For example: Maximize P = 9XT + 3XC

subject to: 30XT + 20XC < 300 wood 5XT + 10XC < 110 labor

XT > 0, XC > 0

(b) There could be more than two straight-line constraints (see example 2)

2. How do I pick up a starting value to draw the objective

function?

Page 13: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

Class Exercise 7 (Thursday, Oct. 11)

Solve the following LP model graphically:

X = Number of product A, Y = number of product BMaximize P = 3X + 9Ysubject to 30X + 20Y < 300 5X + 10Y < 110

X > 0, Y > 0

X* = ? Y* = ? P = ?

(Try P = 27 to draw the objective function)

Page 14: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

Take-home Exercise(Thursday, Oct. 11)

Solve the following LP model graphically:

XT = Number of tables XC = Number of chairs

Maximize P = 6XT + 8XC

subject to: 40XT + 20XC < 280 (wood) 5XT + 10XC < 95 (labor) XT > 0 XC > 0

XT = ? XC = ? P = ?

Page 15: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

3.4. How to solve a LP model in Excel? 3.4.1. Check the Excel program

Page 16: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

3.4. How to solve a LP model in Excel? 3.4.2. Enter the data & formulas

(Example 2 -- Galaxy Industries) X1 = Number of space ray X2 = Number of zappers

Maximize P = 8X1 + 5X2

subject to 2X1 + 1X2 < 1200 (plastic) 3X1 + 4X2 < 2400 (labor) X1 + X2 < 800 (total) X1 - X2 < 450 (mix) X1 > 0 X2 > 0

Page 17: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

3.4. How to solve a LP model in Excel? 3.4.3. Solve the model and obtain computer

reports -- Answer report -- Sensitivity report -- Limits report

Page 18: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

3.5. How to interpret computer reports and conduct sensitivity analysis?

3.5.1. Answer report (1) Optimal solution for X1 and X2

(2) Optimal value of the objective function (3) “Original value” (4) “Cell value” or LHS value (5) “Status” of each constraint (6) “Slack” of each constraint (Relation between “status” & “slack”)

Page 19: CDAE 266 - Class 15 Oct. 16 Last class: Result of group project 1 3. Linear programming and applications Class Exercise 7 Today: 3. Linear programming.

Take home exerciseSolve the following LP model in Excel and obtain the “answer report” and “sensitivity report”

X1 = Number of space ray X2 = Number of zappers

Maximize P = 8X1 + 5X2

subject to 2X1 + 1X2 < 1200 (plastic) 3X1 + 4X2 < 2400 (labor) X1 + X2 < 800 (total) X1 - X2 < 450 (mix) X1 > 0 X2 > 0