ba 452 lesson a.2 solving linear programs 1 1readingsreadings chapter 2 an introduction to linear...

37
BA 452 Lesson A.2 Solving Linear Programs 1 Readings Readings Chapter 2 An Introduction to Linear Programming

Upload: benny-heward

Post on 15-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 11

Readings

Readings

Chapter 2An Introduction to Linear Programming

Page 2: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 22

Overview

Overview

Page 3: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 33

Overview

Graphical Solutions to linear programs arise from graphing the feasible solutions for each constraint and a constant-value line for the objective function to identify the binding constraints to solve.

Slack and Surplus Variables measure the deviation of inequality constraints from binding equalities. Thus they measure how much non-binding constraints can change before they affect an optimum.

Extreme Points are the corners (or vertices) of the feasible region of a linear program. An optimal solution can be found at extreme points. Thus finding extreme points is an alternative to graphing solutions.

Computer Solutions are available to linear programs with many variables and constraints. Computed values include the objective function, decision variables, and slack and surplus variables.

Resource Allocation Problems with Sales Maximums constrain the maximum output D that can be sold at a given price P. The demand curve for output is assumed to be of a special form.

Page 4: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 44

Graphical Solutions

Graphical Solutions

Page 5: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 55

Overview

Graphical Solutions to linear programs arise from graphing the feasible solutions for each constraint and a constant-value line for the objective function to identify which constraints bind (hold with equality) at the optimal solution. Then, solve those constraints to compute the optimal solution.

Graphical Solutions

Page 6: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 66

Graph the first constraint of Example 1 from Lesson I.1, plus non-negativity constraints.

x2

x1

x1 = 6 is the binding edge of the first constraint, where it holds with equality.

The point (6, 0) is on the end of the binding edge of the first constraint plus the non-negativity of x2.

8

7

6

5

4

3

2

1

1 2 3 4 5 6 7 8 9 10

Shaded regioncontains all

feasible pointsfor this constraint

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

Graphical Solutions

Page 7: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 77

2x1 + 3x2 = 19 is the binding edge of the second constraint.

x2

x1

8

7

6

5

4

3

2

1

Shadedregion containsall feasible pointsfor this constraint

Graph the second constraint of Example 1, plus non-negativity constraints.

The point (0, 6 1/3) is on the end of the binding edge of the second constraint plus the non-negativity of x1.

The point (9 1/2, 0) is on the end of the binding edge of the second constraint plus the non-negativity of x2.

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

Graphical Solutions

1 2 3 4 5 6 7 8 9 10

Page 8: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 88

x2

x1

x1 + x2 = 8 is the binding edge of the third constraint

8

7

6

5

4

3

2

1

Shadedregion containsall feasible pointsfor this constraint

Graph the third constraint of Example 1,

plus non-negativity constraints.The point (0, 8) is on the end of the binding edge of the third constraint plus the non- negativity of x1

The point (8, 0) is on the end of the binding edge of the third constraint plus the non-negativity of x2

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

Graphical Solutions

1 2 3 4 5 6 7 8 9 10

Page 9: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 99

x1

x2

8

7

6

5

4

3

2

1

2x1 + 3x2 = 19

x1 + x2 = 8

x1 = 6

Feasible region

Intersect all constraint graphs to define the

feasible region.

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

Graphical Solutions

1 2 3 4 5 6 7 8 9 10

Page 10: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 1010

Graph a line with a constant objective-function value. For example, 35 dollars of profit.

x1

(7, 0)

(0, 5)objective function value5x1 + 7x2 = 35objective function value5x1 + 7x2 = 35

8

7

6

5

4

3

2

1

x2

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

Graphical Solutions

1 2 3 4 5 6 7 8 9 10

Page 11: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 1111

x1

5x1 + 7x2 = 355x1 + 7x2 = 35

8

7

6

5

4

3

2

1

5x1 + 7x2 = 425x1 + 7x2 = 42

5x1 + 7x2 = 395x1 + 7x2 = 39

Graph alternative constant-value lines.

For example, 35 dollars, 39 dollars, or

42 dollars of profit. x2

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

Graphical Solutions

1 2 3 4 5 6 7 8 9 10

Page 12: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 1212

x1

x2

Maximum constant-value line 5x1 + 7x2 = 46Maximum constant-value line 5x1 + 7x2 = 46

Second and third constraints bind at the optimal solutionSecond and third constraints bind at the optimal solution

8

7

6

5

4

3

2

1

Graph the maximum constant-value line,

graph the optimal solution, then determine

the binding constraints.

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

Graphical Solutions

1 2 3 4 5 6 7 8 9 10

Page 13: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 1313

1 12 3

x1

x2

819 =

x1 = det / det = (8x3-1x19)/(1x3-1x2) = 5

8 119 3

1 12 3

x2 = det / det = (1x19-8x2)/(1x3-1x2) = 3

1 82 19

1 12 3

1x1 + 1x2 = 8 2x1 + 3x2 = 19

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

The optimal solution (x1, x2 ) is where the second and third constraints bind (hold with equality): x1 + x2 = 8 and 2x1 + 3x2 = 19.

Solve those equalities using linear algebra, matrices, determinates (det), and Cramer’s rule:

Graphical Solutions

Page 14: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 1414

Summary of a graphical solution procedure Graph the feasible solutions for each constraint. Determine the feasible region that simultaneously

satisfies all the constraints. Draw a constant-value line for the objective function. Move parallel value lines toward larger objective function

values without leaving the feasible region. Any feasible solution on the objective function line with

the largest value is an optimal solution (or optimum). That solution can be found by solving the binding

(equality) constraints.

Graphical Solutions

Page 15: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 1515

Slack and Surplus Variables

Slack and Surplus Variables

Page 16: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 1616

Slack and Surplus Variables

Overview

Slack and Surplus Variables measure the deviation of inequality constraints from binding equalities. Thus they measure how much non-binding constraints can change before they affect an optimum.

Page 17: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 1717

Compute slack variables at the optimum to Example 1.

x1

x2

8

7

6

5

4

3

2

1

Binding secondconstraint:

2x1 + 3x2 = 19

Binding thirdconstraint:x1 + x2 = 8

Binding edge of first constraint:

x1 = 6

Optimalsolution

(x1 = 5, x2 = 3)

Optimalsolution

(x1 = 5, x2 = 3)

s1 = 1

s2 = 0

s3 = 0

Slack and Surplus Variables

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

1 2 3 4 5 6 7 8 9 10

Page 18: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 1818

Extreme Points

Extreme Points

Page 19: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 1919

Extreme Points

Overview

Extreme Points are the corners (or vertices) of the feasible region of a linear program. An optimal solution can be found at extreme points. Thus finding extreme points is an alternative to graphing solutions.

Page 20: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 2020

x1

Feasible region

11 22

33

44

55

x2

8

7

6

5

4

3

2

1

1 2 3 4 5 6 7 8 9 10

(0, 6 1/3), where 2x1 + 3x2 = 19 and x1 = 0

(5, 3), where 2x1 + 3x2 = 19 and x1 + x2 = 8

(0, 0)

(6, 2), where x1 + x2 = 8 and x1 = 6

(6, 0), where x2 = 0 and x1 = 6

Compute the extreme points in Example 1 by solving pairs of binding constraints.

Extreme Point Solutions

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

Page 21: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 2121

Evaluate the objective function at each of the extreme points in Example 1.

Point (5,3) thus maximizes the objective function, with value 46. (Likewise, point (0,0) minimizes.)

Extreme point has objective value 5x1 + 7x2 = 44 1/3

Extreme point has objective value 5x1 + 7x2 = 42

Extreme point has objective value 5x1 + 7x2 = 011

22

33

(0, 0)

(6, 0)Extreme point has objective value 5x1 + 7x2 = 30

(6, 2)

44

55

(5, 3)

(0, 6 1/3)

Extreme point has objective value 5x1 + 7x2 = 46

Extreme Point Solutions

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

Page 22: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 2222

Computer Solutions

Computer Solutions

Page 23: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 2323

Computer Solutions

Overview

Computer Solutions are available to linear programs with many variables and constraints. Computed values include the objective function, decision variables, and slack and surplus variables.

Page 24: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 2424

Computer Solutions

LP problems involving many variables and constraints are now routinely solved with computer packages.

Linear programming solvers are now part of many spreadsheet packages, such as Microsoft Excel.

The Management Scientist program has a convenient LP module. In remainder of this lesson we will interpret the following output:

• objective function value• values of the decision variables• slack and surplus

In a forthcoming lesson, we will interpret the output the shows how an optimal solution is affected by a change in:• a coefficient of the objective function• the right-hand side value of a constraint

Page 25: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 2525

To use The Management Scientist 6.0 program, select New under the File menu.

Computer Solutions

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

Page 26: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 2626

Decision Variable Names can be changed, if desired. Enter objective function coefficients in the Objective Function portion

of the input screen. In the Constraints section, enter constraint coefficients, constraint

relationship (<, =,>), where < abbreviates <, and > abbreviates >. And enter the constraint right-hand-side constants.

Do not enter non-negativity constraints. They are assumed.

Computer Solutions

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

Page 27: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 2727

Maximized objective function value = 46

Optimal x1 = 5 and x2 = 3

Under the Solution menu, select Solve for the Optimal Solution.

Computer Solutions

Example 1:

Max 5x1 + 7x2

s.t. x1 < 6

2x1 + 3x2 < 19

x1 + x2 < 8

x1 > 0 and x2 > 0

Page 28: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 2828

Resource Allocation with Sales Maximums

Resource Allocation with Sales Maximums

Page 29: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 2929

Overview

Resource Allocation Problems with Sales Maximums constrain the maximum output D that can be sold at a given price P. The demand curve for output is assumed to be of the following special form: At price P, demand quantity is D At any price less than P, demand quantity does not increase, but remains D At any price greater than P, demand quantity drops from D to 0

Resource Allocation with Sales Maximums

Page 30: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 3030

Question: The Monet Company produces four type of picture frames: 1, 2, 3, 4. The four types differ in size, shape and materials used. Each type requires a certain amount of skilled labor,

metal, and glass:• Each frame of type 1 uses 2 hours of labor, 4 ounces

of metal, 6 ounces of glass, and sells for $28.50.• Each frame of type 2 uses 1 hour of labor, 2 ounces

of metal, 2 ounces of glass, and sells for $12.50.• Each frame of type 3 uses 3 hours of labor, 1 ounces

of metal, 1 ounces of glass, and sells for $29.25.• Each frame of type 4 uses 2 hours of labor, 2 ounces

of metal, 2 ounces of glass, and sells for $21.50.

Resource Allocation with Sales Maximums

Page 31: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 3131

Each week, Monet can buy up to 4000 hours of skilled labor and 10,000 ounces of glass.

The unit costs are $8.00 per labor hour, $0.50 per ounce of metal, and $0.75 per ounce of glass.

Market constraints are such that it is impossible to sell more than:• 1000 type 1 frames, • 2000 type 2 frames, • 500 type 3 frames, • 1000 type 4 frames.

How can Monet maximize its weekly profit?

Resource Allocation with Sales Maximums

Page 32: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 3232

Answer: First, compute unit profit for each type of frame: Frame 1: Unit profit = Sales price – input costs = 28.5 – 2x8 – 4x.5 – 6x.75 = 28.5 – 16 – 2 – 4.5 = $6.00 Frame 2: Unit profit = 12.5 – 1x8 – 2x.5 – 2x.75 = 12.5 – 8 – 1 – 1.5 = $2.00 Frame 3: Unit profit = 29.25 – 3x8 – 1x.5 – 1x.75 = 29.25 – 24 – .5 – .75 = $4.00 Frame 4: Unit profit = 21.5 – 2x8 – 2x.5 – 2x.75 = 21.5 – 16 – 1 – 1.5 = $3.00

Resource Allocation with Sales Maximums

Page 33: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 3333

Let xi be weekly sales of frames of type i (i = 1, 2, 3, 4).

Maximize 6x1 + 2x2 + 4x3 + 3x4 (profit objective)

subject to 2x1 + x2 + 3x3 + 2x4 4000 (labor constraint)

6x1 + 2x2 + x3 + 2x4 10,000 (glass constraint)

x1 1000 (frame 1 sales constraint)

x2 2000 (frame 2 sales constraint)

x3 500 (frame 3 sales constraint)

x4 1000 (frame 4 sales constraint)

x1, x2, x3, x4 0 (nonnegativity constraints) 6x1 = Profit from frames of type 1

2x1 = Labor used in frames of type 1

4x1 = Glass used in frames of type 1

Resource Allocation with Sales Maximums

Page 34: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 3434

Maximize 6x1 + 2x2 + 4x3 + 3x4

subject to 2x1 + x2 + 3x3 + 2x4 4000

6x1 + 2x2 + x3 + 2x4 10,000

x1 1000

x2 2000

x3 500

x4 1000

x1, x2, x3, x4 0

Resource Allocation with Sales Maximums

Page 35: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 3535

Resource Allocation with Sales Maximums

Maximize 6x1 + 2x2 + 4x3 + 3x4

subject to 2x1 + x2 + 3x3 + 2x4 4000

6x1 + 2x2 + x3 + 2x4 10,000

x1 1000

x2 2000

x3 500

x4 1000

x1, x2, x3, x4 0

Page 36: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 3636

Maximum weekly profit of $10,000.

Xi is optimal weekly sales of frames of type i (i = 1, 2, 3, 4).

Resource Allocation with Sales Maximums

Maximize 6x1 + 2x2 + 4x3 + 3x4

subject to 2x1 + x2 + 3x3 + 2x4 4000

6x1 + 2x2 + x3 + 2x4 10,000

x1 1000

x2 2000

x3 500

x4 1000

x1, x2, x3, x4 0

Page 37: BA 452 Lesson A.2 Solving Linear Programs 1 1ReadingsReadings Chapter 2 An Introduction to Linear Programming

BA 452 Lesson A.2 Solving Linear Programs 3737

End of Lesson A.2

BA 452 Quantitative Analysis