1 introduction to linear programming linear programming problem linear programming problem problem...

44
1 Introduction to Linear Introduction to Linear Programming Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization Problem A Simple Maximization Problem Graphical Solution Procedure Graphical Solution Procedure Extreme Points and the Optimal Solution Extreme Points and the Optimal Solution Computer Solutions Computer Solutions A Simple Minimization Problem A Simple Minimization Problem Special Cases Special Cases

Upload: charles-caldwell

Post on 17-Jan-2016

296 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

1

Introduction to Linear Introduction to Linear ProgrammingProgramming

Linear Programming ProblemLinear Programming Problem Problem FormulationProblem Formulation A Simple Maximization ProblemA Simple Maximization Problem Graphical Solution ProcedureGraphical Solution Procedure Extreme Points and the Optimal SolutionExtreme Points and the Optimal Solution Computer SolutionsComputer Solutions A Simple Minimization ProblemA Simple Minimization Problem Special CasesSpecial Cases

Page 2: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

2

Linear ProgrammingLinear Programming Linear programmingLinear programming has nothing to do with has nothing to do with

computer programming.computer programming. The use of the word “programming” here means The use of the word “programming” here means

“choosing a course of action.”“choosing a course of action.” Linear programming involves choosing a course Linear programming involves choosing a course

of action when the mathematical model of the of action when the mathematical model of the problem contains only linear functions.problem contains only linear functions.

Page 3: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

3

Linear Programming (LP) Linear Programming (LP) ProblemProblem

The The maximizationmaximization or or minimizationminimization of some quantity is of some quantity is the the objectiveobjective in all linear programming problems. in all linear programming problems.

All LP problems have All LP problems have constraintsconstraints that limit the degree that limit the degree to which the objective can be pursued.to which the objective can be pursued.

A A feasible solutionfeasible solution satisfies all the problem's satisfies all the problem's constraints.constraints.

An An optimal solutionoptimal solution is a feasible solution that results is a feasible solution that results in the largest possible objective function value when in the largest possible objective function value when maximizing (or smallest when minimizing).maximizing (or smallest when minimizing).

A A graphical solution methodgraphical solution method can be used to solve a can be used to solve a linear program with two variables.linear program with two variables.

Page 4: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

4

Linear Programming (LP) Linear Programming (LP) ProblemProblem

If both the objective function and the constraints are If both the objective function and the constraints are linear, the problem is referred to as a linear, the problem is referred to as a linear linear programming problemprogramming problem..

Linear functionsLinear functions are functions in which each variable are functions in which each variable appears in a separate term raised to the first power appears in a separate term raised to the first power and is multiplied by a constant (which could be 0).and is multiplied by a constant (which could be 0).

Linear constraintsLinear constraints are linear functions that are are linear functions that are restricted to be "less than or equal to", "equal to", or restricted to be "less than or equal to", "equal to", or "greater than or equal to" a constant."greater than or equal to" a constant.

Page 5: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

5

Problem FormulationProblem Formulation Problem formulation or modelingProblem formulation or modeling is the process of is the process of

translating a verbal statement of a problem into a translating a verbal statement of a problem into a mathematical statement.mathematical statement.

Formulating models is an art that can only be Formulating models is an art that can only be mastered with practice and experience.mastered with practice and experience.

Every LP problems has some unique features, but Every LP problems has some unique features, but most problems also have common features.most problems also have common features.

General guidelinesGeneral guidelines for LP model formulation are for LP model formulation are illustrated on the slides that follow.illustrated on the slides that follow.

Page 6: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

6

Guidelines for Model Guidelines for Model FormulationFormulation

Understand the problem thoroughly.Understand the problem thoroughly. Describe the objective.Describe the objective. Describe each constraint.Describe each constraint. Define the decision variables.Define the decision variables. Write the objective in terms of the decision variables.Write the objective in terms of the decision variables. Write the constraints in terms of the decision variables.Write the constraints in terms of the decision variables.

Page 7: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

7

Example 1: A Simple Example 1: A Simple Maximization ProblemMaximization Problem

Max 5Max 5xx11 + 7 + 7xx22

s.t. s.t. xx11 << 6 6

22xx11 + 3 + 3xx22 << 19 19

xx11 + + xx22 << 8 8

xx11 >> 0 and 0 and xx22 >> 0 0

ObjectiveObjectiveFunctionFunction

““ Regular”Regular”ConstraintsConstraints

Non-negativityNon-negativity ConstraintsConstraints

Page 8: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

8

Example 1: Graphical Example 1: Graphical SolutionSolution

First Constraint GraphedFirst Constraint Graphed xx22

xx11

xx11 = 6 = 6

(6, 0)(6, 0)

88

77

66

55

44

33

22

11

1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 109 10

Shaded regionShaded regioncontains allcontains all

feasible pointsfeasible pointsfor this constraintfor this constraint

Page 9: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

9

Example 1: Graphical Example 1: Graphical SolutionSolution

Second Constraint GraphedSecond Constraint Graphed

22xx11 + 3 + 3xx22 = = 1919

xx22

xx11

(0, 6(0, 6 ))

(9(9 , , 0)0)

88

77

66

55

44

33

22

11

1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 109 10

ShadedShadedregion containsregion containsall feasible pointsall feasible pointsfor this constraintfor this constraint

Page 10: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

10

Example 1: Graphical Example 1: Graphical SolutionSolution

Third Constraint GraphedThird Constraint Graphed xx22

xx11

xx11 + + xx22 = 8 = 8

(0, 8)(0, 8)

(8, 0)(8, 0)

88

77

66

55

44

33

22

11

1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 109 10

ShadedShadedregion containsregion containsall feasible pointsall feasible pointsfor this constraintfor this constraint

Page 11: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

11

Example 1: Graphical Example 1: Graphical SolutionSolution

xx11

xx22

88

77

66

55

44

33

22

11

1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 109 10

22xx11 + 3 + 3xx22 = = 1919

xx11 + + xx22 = 8 = 8

xx11 = 6 = 6

Combined-Constraint Graph Showing Feasible RegionCombined-Constraint Graph Showing Feasible Region

FeasibleFeasible RegionRegion

Page 12: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

12

Example 1: Graphical Example 1: Graphical SolutionSolution Objective Function LineObjective Function Line

xx11

xx22

(7, 0)(7, 0)

(0, 5)(0, 5)Objective FunctionObjective Function55xx11 + + 7x7x2 2 = 35= 35Objective FunctionObjective Function55xx11 + + 7x7x2 2 = 35= 35

88

77

66

55

44

33

22

11

1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 109 10

Page 13: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

13

Example 1: Graphical Example 1: Graphical SolutionSolution

Selected Objective Function Selected Objective Function LinesLines

xx11

xx22

55xx11 + + 7x7x2 2 = 35= 3555xx11 + + 7x7x2 2 = 35= 35

88

77

66

55

44

33

22

11

1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 109 10

55xx11 + + 7x7x2 2 = 42= 4255xx11 + + 7x7x2 2 = 42= 42

55xx11 + + 7x7x2 2 = 39= 3955xx11 + + 7x7x2 2 = 39= 39

Page 14: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

14

Example 1: Graphical Example 1: Graphical SolutionSolution

Optimal SolutionOptimal Solution

xx11

xx22 MaximumMaximumObjective Function LineObjective Function Line55xx11 + + 7x7x2 2 = 46= 46

MaximumMaximumObjective Function LineObjective Function Line55xx11 + + 7x7x2 2 = 46= 46

Optimal SolutionOptimal Solution((xx11 = 5, = 5, xx22 = 3) = 3)Optimal SolutionOptimal Solution((xx11 = 5, = 5, xx22 = 3) = 3)

88

77

66

55

44

33

22

11

1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 109 10

Page 15: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

15

Summary of the Summary of the Graphical Solution Graphical Solution

Procedure for Procedure for Maximization ProblemsMaximization Problems

Prepare a graph of the feasible solutions for each Prepare a graph of the feasible solutions for each of the constraints.of the constraints.

Determine the feasible region that satisfies all the Determine the feasible region that satisfies all the constraints simultaneously.constraints simultaneously.

Draw an objective function line.Draw an objective function line. Move parallel objective function lines toward Move parallel objective function lines toward

largerlarger objective function values without entirely objective function values without entirely leaving the feasible region.leaving the feasible region.

Any feasible solution on the objective function line Any feasible solution on the objective function line with the with the largestlargest value is an optimal solution. value is an optimal solution.

Page 16: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

16

Slack and Surplus Slack and Surplus VariablesVariables

A linear program in which all the variables are non-A linear program in which all the variables are non-negative and all the constraints are equalities is said negative and all the constraints are equalities is said to be in to be in standard formstandard form. .

Standard form is attained by adding Standard form is attained by adding slack variablesslack variables to "less than or equal to" constraints, and by to "less than or equal to" constraints, and by subtracting subtracting surplus variablessurplus variables from "greater than or from "greater than or equal to" constraints. equal to" constraints.

Slack and surplus variables represent the difference Slack and surplus variables represent the difference between the left and right sides of the constraints.between the left and right sides of the constraints.

Slack and surplus variables have objective function Slack and surplus variables have objective function coefficients equal to 0.coefficients equal to 0.

Page 17: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

17

Max 5Max 5xx11 + 7 + 7xx2 2 + 0+ 0ss1 1 + 0+ 0ss2 2 + 0+ 0ss33

s.t. s.t. xx11 + + ss11 = 6 = 6

22xx11 + 3 + 3xx2 2 + + ss22 = 19 = 19

xx11 + + xx22+ + ss3 3 = 8 = 8

xx11, , xx2 2 , , ss11 , , ss22 , , ss33 >> 0 0

Example 1 in Standard FormExample 1 in Standard Form

Slack Variables (for Slack Variables (for << constraints)constraints)

ss11 , , ss22 , and , and ss33 are are sslack lack variablesvariables

Page 18: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

18

Optimal SolutionOptimal Solution

Slack VariablesSlack Variables

xx11

xx22

88

77

66

55

44

33

22

11

1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 109 10

SecondSecondConstraint:Constraint:22xx11 + 3 + 3xx22 = =

1919

ThirdThirdConstraint:Constraint:xx11 + + xx22 = 8 = 8

FirstFirstConstraint:Constraint:

xx11 = 6 = 6

OptimalOptimalSolutionSolution

((xx11 = 5, = 5, xx22 = 3) = 3)

OptimalOptimalSolutionSolution

((xx11 = 5, = 5, xx22 = 3) = 3)

ss11 = = 11

ss22 = = 00

ss33 = = 00

Page 19: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

19

Extreme Points and the Extreme Points and the Optimal SolutionOptimal Solution

The corners or vertices of the feasible The corners or vertices of the feasible region are referred to as the region are referred to as the extreme pointsextreme points..

An optimal solution to an LP problem can be An optimal solution to an LP problem can be found at an extreme point of the feasible found at an extreme point of the feasible region.region.

When looking for the optimal solution, you When looking for the optimal solution, you do not have to evaluate all feasible solution do not have to evaluate all feasible solution points.points.

You have to consider only the extreme You have to consider only the extreme points of the feasible region.points of the feasible region.

Page 20: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

20

Example 1: Extreme Example 1: Extreme PointsPoints

xx11

FeasibleFeasible RegionRegion

1111 2222

3333

4444

5555

xx22

88

77

66

55

44

33

22

11

1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 109 10

(0, 6 (0, 6 ))

(5, 3)(5, 3)

(0, 0)(0, 0)

(6, 2)(6, 2)

(6, 0)(6, 0)

Page 21: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

21

Computer SolutionsComputer Solutions LP problems involving 1000s of variables and 1000s of LP problems involving 1000s of variables and 1000s of

constraints are now routinely solved with computer constraints are now routinely solved with computer packages.packages.

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

Leading commercial packages include CPLEX, LINGO, Leading commercial packages include CPLEX, LINGO, MOSEK, Xpress-MP, and Premium Solver for Excel.MOSEK, Xpress-MP, and Premium Solver for Excel.

The Management Scientist, a package developed by The Management Scientist, a package developed by the authors of your textbook, has an LP module.the authors of your textbook, has an LP module.

Page 22: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

22

Interpretation of Interpretation of Computer OutputComputer Output

In this chapter we will discuss the following In this chapter we will discuss the following output:output: objective function valueobjective function value values of the decision variablesvalues of the decision variables reduced costsreduced costs slack and surplusslack and surplus

In the next chapter we will discuss how an optimal In the next chapter we will discuss how an optimal solution is affected by a change in:solution is affected by a change in: a coefficient of the objective functiona coefficient of the objective function the right-hand side value of a constraintthe right-hand side value of a constraint

Page 23: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

23

Example 1: Spreadsheet Example 1: Spreadsheet SolutionSolution

Partial Spreadsheet Showing Partial Spreadsheet Showing Problem DataProblem DataA B C D

12 Constraints X1 X2 RHS Values3 #1 1 0 64 #2 2 3 195 #3 1 1 86 Obj.Func.Coeff. 5 7

LHS Coefficients

Page 24: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

24

Example 1: Spreadsheet Example 1: Spreadsheet SolutionSolution

Partial Spreadsheet Showing Partial Spreadsheet Showing SolutionSolutionA B C D

89 X1 X2

10 5.0 3.01112 46.01314 Constraints Amount Used RHS Limits15 #1 5 <= 616 #2 19 <= 1917 #3 8 <= 8

Optimal Decision Variable Values

Maximized Objective Function

Page 25: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

25

Example 1: Spreadsheet Example 1: Spreadsheet SolutionSolution

Interpretation of Computer OutputInterpretation of Computer Output

We see from the previous slide that:We see from the previous slide that:

Objective Function Value = 46Objective Function Value = 46

Decision Variable #1 (Decision Variable #1 (xx11) = 5) = 5

Decision Variable #2 (Decision Variable #2 (xx22) = 3) = 3

Slack in Constraint #1 = 6 – 5 = 1Slack in Constraint #1 = 6 – 5 = 1

Slack in Constraint #2 = 19 – 19 = 0Slack in Constraint #2 = 19 – 19 = 0

Slack in Constraint #3 = 8 – 8 = 0Slack in Constraint #3 = 8 – 8 = 0

Page 26: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

26

Example 2: A Simple Example 2: A Simple Minimization ProblemMinimization Problem

LP FormulationLP Formulation Min 5Min 5xx11 + 2 + 2xx22

s.t. 2s.t. 2xx11 + 5 + 5xx22 >> 10 10

44xx11 xx22 >> 1212

xx11 + + xx22 >> 4 4

xx11, , xx22 >> 0 0

Page 27: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

27

Example 2: Graphical Example 2: Graphical SolutionSolution

Graph the ConstraintsGraph the Constraints Constraint 1Constraint 1: When : When xx11 = 0, then = 0, then xx22 = 2; when = 2; when xx22 = =

0, 0, then then xx11 = 5. Connect (5,0) and (0,2). The ">" = 5. Connect (5,0) and (0,2). The ">" side is side is above this line.above this line.

Constraint 2Constraint 2: When : When xx22 = 0, then = 0, then xx11 = 3. But = 3. But setting setting xx11 to to 0 will yield 0 will yield xx22 = -12, which is not = -12, which is not on the graph. Thus, to get a second point on this on the graph. Thus, to get a second point on this line, set line, set xx11 to to any number larger than 3 and any number larger than 3 and solve for solve for xx22: when : when xx11 = 5, then = 5, then xx22 = 8. Connect = 8. Connect (3,0) and (5,8). The ">" side is to the right.(3,0) and (5,8). The ">" side is to the right.

Constraint 3Constraint 3: When : When xx11 = 0, then = 0, then xx22 = 4; when = 4; when xx22 = = 0, 0, then then xx11 = 4. Connect (4,0) and (0,4). The ">" = 4. Connect (4,0) and (0,4). The ">" side is side is above this line.above this line.

Page 28: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

28

Example 2: Graphical Example 2: Graphical SolutionSolution

Constraints GraphedConstraints Graphedxx22xx22

44xx11 xx22 >> 12 1244xx11 xx22 >> 12 12

22xx11 + 5 + 5xx22 >> 10 1022xx11 + 5 + 5xx22 >> 10 10

xx11xx11

Feasible RegionFeasible Region

1 1 22 3 3 4 4 5 5 6 6

66

55

44

33

22

11

xx11 + + xx22 >> 4 4xx11 + + xx22 >> 4 4

Page 29: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

29

Example 2: Graphical Example 2: Graphical SolutionSolution

Graph the Objective FunctionGraph the Objective Function

Set the objective function equal to an arbitrary Set the objective function equal to an arbitrary constant (say 20) and graph it. For 5constant (say 20) and graph it. For 5xx11 + 2 + 2xx22 = 20, when = 20, when xx11 = 0, then = 0, then xx22 = 10; when = 10; when xx22= 0, then = 0, then xx11 = 4. Connect = 4. Connect (4,0) and (0,10).(4,0) and (0,10).

Move the Objective Function Line Toward OptimalityMove the Objective Function Line Toward Optimality

Move it in the direction which lowers its value Move it in the direction which lowers its value (down), since we are minimizing, until it touches the last (down), since we are minimizing, until it touches the last point of the feasible region, determined by the last two point of the feasible region, determined by the last two constraints.constraints.

Page 30: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

30

Example 2: Graphical Example 2: Graphical SolutionSolution

xx22xx22

44xx11 xx22 >> 12 1244xx11 xx22 >> 12 12

22xx11 + 5 + 5xx22 >> 10 1022xx11 + 5 + 5xx22 >> 10 10

xx11xx111 1 22 3 3 4 4 5 5 6 6

66

55

44

33

22

11

xx11 + + xx22 >> 4 4xx11 + + xx22 >> 4 4

Objective Function GraphedObjective Function Graphed

Min 5Min 5xx11 + 2 + 2xx22Min 5Min 5xx11 + 2 + 2xx22

Page 31: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

31

Solve for the Extreme Point at the Intersection of Solve for the Extreme Point at the Intersection of the Two Binding Constraintsthe Two Binding Constraints

44xx11 - - xx22 = 12 = 12

xx11+ + xx22 = 4 = 4

Adding these two equations gives:Adding these two equations gives:

55xx11 = 16 or = 16 or xx11 = 16/5 = 16/5

Substituting this into Substituting this into xx11 + + xx22 = 4 gives: = 4 gives: xx22 = 4/5 = 4/5

Example 2: Graphical Example 2: Graphical SolutionSolution

Solve for the Optimal Value of the Objective Solve for the Optimal Value of the Objective FunctionFunction

55xx11 + 2 + 2xx22 = 5(16/5) + 2(4/5) = 88/5 = 5(16/5) + 2(4/5) = 88/5

Page 32: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

32

Example 2: Graphical Example 2: Graphical SolutionSolution

xx22xx22

44xx11 xx22 >> 12 1244xx11 xx22 >> 12 12

22xx11 + 5 + 5xx22 >> 10 1022xx11 + 5 + 5xx22 >> 10 10

xx11xx111 1 22 3 3 4 4 5 5 6 6

66

55

44

33

22

11

xx11 + + xx22 >> 4 4xx11 + + xx22 >> 4 4

Optimal SolutionOptimal Solution

Optimal Optimal Solution:Solution: xx11 = 16/5, = 16/5, xx22 = = 4/5,4/5,

55xx11 + 2 + 2xx22 = = 17.617.6

Optimal Optimal Solution:Solution: xx11 = 16/5, = 16/5, xx22 = = 4/5,4/5,

55xx11 + 2 + 2xx22 = = 17.617.6

Page 33: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

33

Summary of the Summary of the Graphical Solution Graphical Solution

ProcedureProcedurefor Minimization for Minimization

ProblemsProblems Prepare a graph of the feasible solutions for Prepare a graph of the feasible solutions for each of the constraints.each of the constraints.

Determine the feasible region that satisfies all Determine the feasible region that satisfies all the constraints simultaneously.the constraints simultaneously.

Draw an objective function line.Draw an objective function line. Move parallel objective function lines toward Move parallel objective function lines toward

smallersmaller objective function values without objective function values without entirely leaving the feasible region.entirely leaving the feasible region.

Any feasible solution on the objective function Any feasible solution on the objective function line with the line with the smallestsmallest value is an optimal value is an optimal solution.solution.

Page 34: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

34

Surplus VariablesSurplus Variables Example 2 in Standard FormExample 2 in Standard Form

Min 5Min 5xx11 + 2 + 2xx22 + 0 + 0ss11 + 0 + 0ss22 + 0 + 0ss33

s.t. 2s.t. 2xx11 + 5 + 5xx22 ss11 >> 10 10

44xx11 xx22 ss22 >> 12 12

xx11 + + xx22 ss33 >> 4 4

xx11, , xx22, s, s11, s, s22, s, s33 >> 0 0

ss11 , , ss22 , and , and ss33 are are

surplus surplus variablesvariables

Page 35: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

35

Example 2: Spreadsheet Example 2: Spreadsheet SolutionSolution

Partial Spreadsheet Showing Partial Spreadsheet Showing Problem DataProblem DataA B C D

12 Constraints X1 X2 RHS3 #1 2 5 104 #2 4 -1 125 #3 1 1 46 Obj.Func.Coeff. 5 2

LHS Coefficients

Page 36: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

36

Example 2: Spreadsheet Example 2: Spreadsheet SolutionSolution

Partial Spreadsheet Showing Partial Spreadsheet Showing FormulasFormulasA B C D

910 X1 X211 Dec.Var.Values1213 =B6*B11+C6*C111415 Constraints Amount Used Amount Avail.16 #1 =B3*$B$11+C3*$C$11 >= =D317 #2 =B4*$B$11+C4*$C$11 >= =D418 #3 =B5*$B$11+C5*$C$11 >= =D5

Decision Variables

Minimized Objective Function

Page 37: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

37

Example 2: Spreadsheet Example 2: Spreadsheet SolutionSolution

Partial Spreadsheet Showing Partial Spreadsheet Showing SolutionSolutionA B C D

910 X1 X211 Dec.Var.Values 3.20 0.8001213 17.6001415 Constraints Amount Used Amount Avail.16 #1 10.4 >= 1017 #2 12 >= 1218 #3 4 >= 4

Decision Variables

Minimized Objective Function

Page 38: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

38

Example 2: Spreadsheet Example 2: Spreadsheet SolutionSolution

Interpretation of Computer OutputInterpretation of Computer Output

We see from the previous slide that:We see from the previous slide that:

Objective Function Value = 17.6Objective Function Value = 17.6

Decision Variable #1 (Decision Variable #1 (xx11) = 3.2) = 3.2

Decision Variable #2 (Decision Variable #2 (xx22) = 0.8) = 0.8

Surplus in Constraint #1 = 10.4 Surplus in Constraint #1 = 10.4 10 = 0.410 = 0.4

Surplus in Constraint #2 = 12.0 Surplus in Constraint #2 = 12.0 12 12 = 0.0= 0.0

Surplus in Constraint #3 = 4.0 Surplus in Constraint #3 = 4.0 4 4 = 0.0= 0.0

Page 39: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

39

Special CasesSpecial Cases

InfeasibilityInfeasibility

• No solution to the LP problem satisfies all the No solution to the LP problem satisfies all the constraints, including the non-negativity constraints, including the non-negativity conditions.conditions.

• Graphically, this means a feasible region Graphically, this means a feasible region does not exist.does not exist.

• Causes include:Causes include:• A formulation error has been made.A formulation error has been made.• Management’s expectations are too high.Management’s expectations are too high.• Too many restrictions have been placed on Too many restrictions have been placed on

the problem (i.e. the problem is over-the problem (i.e. the problem is over-constrained).constrained).

Page 40: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

40

Example: Infeasible Example: Infeasible ProblemProblem

Consider the following LP problem.Consider the following LP problem.

Max 2Max 2xx11 + 6 + 6xx22

s.t. 4s.t. 4xx11 + 3 + 3xx22 << 12 12

22xx11 + + xx22 >> 8 8

xx11, , xx22 >> 0 0

Page 41: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

41

Example: Infeasible Example: Infeasible ProblemProblem

There are no points that satisfy both constraints, so There are no points that satisfy both constraints, so there is no feasible region (and no feasible solution). there is no feasible region (and no feasible solution).

xx22

xx11

44xx11 + 3 + 3xx22 << 12 12

22xx11 + + xx22 >> 8 8

2 2 4 4 6 6 8 8 1010

44

88

22

66

1010

Page 42: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

42

Special CasesSpecial Cases UnboundedUnbounded

• The solution to a maximization LP problem The solution to a maximization LP problem is unbounded if the value of the solution is unbounded if the value of the solution may be made indefinitely large without may be made indefinitely large without violating any of the constraints.violating any of the constraints.

• For real problems, this is the result of For real problems, this is the result of improper formulation. (Quite likely, a improper formulation. (Quite likely, a constraint has been inadvertently omitted.)constraint has been inadvertently omitted.)

Page 43: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

43

Example: Unbounded Example: Unbounded SolutionSolution

Consider the following LP problem.Consider the following LP problem.

Max 4Max 4xx11 + 5 + 5xx22

s.t. s.t. xx11 + + xx22 >> 5 5

33xx11 + + xx22 >> 8 8

xx11, , xx22 >> 0 0

Page 44: 1 Introduction to Linear Programming Linear Programming Problem Linear Programming Problem Problem Formulation Problem Formulation A Simple Maximization

44

Example: Unbounded Example: Unbounded SolutionSolution

The feasible region is unbounded and the The feasible region is unbounded and the objective function line can be moved objective function line can be moved outward from the origin without bound, outward from the origin without bound, infinitely increasing the objective function. infinitely increasing the objective function. xx22

xx11

33xx11 + + xx22 >> 8 8

xx11 + + xx22 >> 5 5

Max 4

Max 4xx11 + 5 + 5xx

22

66

88

1010

2 2 4 4 6 6 8 8 1010

44

22