Upload
amice-dickerson
View
222
Download
1
Tags:
Embed Size (px)
Citation preview
1 1© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Chapter 3Chapter 3An Introduction to Linear ProgrammingAn Introduction to Linear Programming
Linear Programming ProblemLinear Programming Problem Problem FormulationProblem Formulation A Maximization ProblemA Maximization Problem A Minimization ProblemA Minimization Problem Graphical Solution ProcedureGraphical Solution Procedure Extreme Points and the Optimal SolutionExtreme Points and the Optimal Solution Special CasesSpecial Cases
2 2© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Linear Programming (LP) ProblemLinear Programming (LP) Problem
The The maximizationmaximization or or minimizationminimization of some of some quantity is the quantity is the objectiveobjective in all linear in all linear programming problems.programming problems.
All LP problems have All LP problems have constraintsconstraints that limit the that limit the degree to which the objective can be pursued.degree 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 is a feasible solution that results in the largest possible objective function results in the largest possible objective function value when maximizing (or smallest when value when maximizing (or smallest when minimizing).minimizing).
A A graphical solution methodgraphical solution method can be used to solve can be used to solve a linear program with two variables.a linear program with two variables.
3 3© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Linear Programming (LP) ProblemLinear Programming (LP) Problem
If both the objective function and the constraints If both the objective function and the constraints are linear, the problem is referred to as a are linear, the problem is referred to as a linear linear programming problemprogramming problem..
Linear functionsLinear functions are functions in which each are functions in which each variable appears in a separate term raised to the variable appears in a separate term raised to the first power and is multiplied by a constant (which first power and is multiplied by a constant (which could be 0).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 restricted to be "less than or equal to", "equal to", or "greater than or equal to" a constant.to", or "greater than or equal to" a constant.
4 4© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Problem FormulationProblem Formulation
Problem formulation or modelingProblem formulation or modeling is the process is the process of translating a verbal statement of a problem of translating a verbal statement of a problem into a mathematical statement.into a mathematical statement.
5 5© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Guidelines for Model FormulationGuidelines for Model Formulation
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 Write the objective in terms of the decision
variables.variables. Write the constraints in terms of the decision Write the constraints in terms of the decision
variables.variables.
6 6© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 1: A Maximization ProblemExample 1: A Maximization Problem
LP FormulationLP Formulation
Max 5Max 5xx11 + 7 + 7xx22
s.t. s.t. xx11 << 6 6
22xx11 + 3 + 3xx22 << 19 19
xx11 + + xx22 << 8 8
xx11, , xx22 >> 0 0
7 7© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
88
77
66
55
44
33
22
11
1 2 3 4 5 6 7 8 9 101 2 3 4 5 6 7 8 9 10
Example 1: Graphical SolutionExample 1: Graphical Solution
Constraint #1 GraphedConstraint #1 Graphed xx22
xx11
xx11 << 6 6
(6, 0)(6, 0)
8 8© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
88
77
66
55
44
33
22
11
1 2 3 4 5 6 7 8 9 101 2 3 4 5 6 7 8 9 10
Example 1: Graphical SolutionExample 1: Graphical Solution
Constraint #2 GraphedConstraint #2 Graphed
22xx11 + 3 + 3xx22 << 19 19
xx22
xx11
(0, 6 (0, 6 1/31/3))
(9 (9 1/21/2, 0), 0)
9 9© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 1: Graphical SolutionExample 1: Graphical Solution
Constraint #3 GraphedConstraint #3 Graphed
88
77
66
55
44
33
22
11
1 2 3 4 5 6 7 8 9 101 2 3 4 5 6 7 8 9 10
xx22
xx11
xx11 + + xx22 << 8 8
(0, 8)(0, 8)
(8, 0)(8, 0)
10 10© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 1: Graphical SolutionExample 1: Graphical Solution
Combined-Constraint GraphCombined-Constraint Graph
88
77
66
55
44
33
22
11
1 2 3 4 5 6 7 8 9 101 2 3 4 5 6 7 8 9 10
22xx11 + 3 + 3xx22 << 19 19
xx22
xx11
xx11 + + xx22 << 8 8
xx11 << 6 6
11 11© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 1: Graphical SolutionExample 1: Graphical Solution
Feasible Solution RegionFeasible Solution Region
88
77
66
55
44
33
22
11
1 2 3 4 5 6 7 8 9 101 2 3 4 5 6 7 8 9 10 xx11
FeasibleFeasibleRegionRegion
xx22
12 12© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
88
77
66
55
44
33
22
11
1 2 3 4 5 6 7 8 9 101 2 3 4 5 6 7 8 9 10
Example 1: Graphical SolutionExample 1: Graphical Solution
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
13 13© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
88
77
66
55
44
33
22
11
1 2 3 4 5 6 7 8 9 101 2 3 4 5 6 7 8 9 10
Example 1: Graphical SolutionExample 1: Graphical Solution
Optimal SolutionOptimal Solution
xx11
xx22
Objective FunctionObjective Function55xx11 + + 7x7x2 2 = 46= 46Objective FunctionObjective Function55xx11 + + 7x7x2 2 = 46= 46
Optimal SolutionOptimal Solution((xx11 = 5, = 5, xx22 = 3) = 3)Optimal SolutionOptimal Solution((xx11 = 5, = 5, xx22 = 3) = 3)
14 14© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Extreme Points and the Optimal SolutionExtreme Points and the Optimal Solution
The corners or vertices of the feasible region are The corners or vertices of the feasible region are referred to as the 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 region.found at an extreme point of the feasible region.
When looking for the optimal solution, you do not When looking for the optimal solution, you do not have to evaluate all feasible solution points.have to evaluate all feasible solution points.
You have to consider only the extreme points of You have to consider only the extreme points of the feasible region.the feasible region.
15 15© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Summary of the Graphical Solution Summary of the Graphical Solution ProcedureProcedure
for Maximization Problemsfor Maximization 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 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
larger objective function values without entirely larger objective function values without entirely leaving the feasible region.leaving the feasible region.
Any feasible solution on the objective function Any feasible solution on the objective function line with the largest value is an optimal solution.line with the largest value is an optimal solution.
16 16© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Slack and Surplus VariablesSlack and Surplus Variables
A linear program in which all the variables are A linear program in which all the variables are non-negative and all the constraints are non-negative and all the constraints are equalities is said to be in equalities is said to be in standard formstandard form. .
Standard form is attained by adding Standard form is attained by adding slack slack variables variables to "less than or equal to" constraints, to "less than or equal to" constraints, and by subtracting and by subtracting surplus variablessurplus variables from from "greater than or equal to" constraints. "greater than or equal to" constraints.
Slack and surplus variables represent the Slack and surplus variables represent the difference between the left and right sides of the difference between the left and right sides of the constraints.constraints.
Slack and surplus variables have objective Slack and surplus variables have objective function coefficients equal to 0.function coefficients equal to 0.
17 17© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 1Example 1
Standard FormStandard Form
Max 5Max 5xx11 + 7 + 7xx2 2 + 0+ 0ss1 1 + 0+ 0ss2 2 + 0+ 0ss33
s.t. s.t. xx11 + + ss11 = 6 = 6
22xx11 + 3 + 3xx22 + + ss22 = 19 = 19
xx11 + + xx22 + + ss3 3 = = 88
xx11, , xx2 2 , , ss11 , , ss22 , , ss33 >> 0 0
18 18© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 1: Graphical SolutionExample 1: Graphical Solution
The Five Extreme PointsThe Five Extreme Points
88
77
66
55
44
33
22
11
1 2 3 4 5 6 7 8 9 101 2 3 4 5 6 7 8 9 10 xx11
FeasibleFeasibleRegionRegion
1111 2222
3333
4444
5555
xx22
19 19© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Reduced CostReduced Cost
The The reduced costreduced cost for a decision variable whose for a decision variable whose value is 0 in the optimal solution is the amount value is 0 in the optimal solution is the amount the variable's objective function coefficient the variable's objective function coefficient would have to improve (increase for would have to improve (increase for maximization problems, decrease for maximization problems, decrease for minimization problems) before this variable minimization problems) before this variable could assume a positive value. could assume a positive value.
The reduced cost for a decision variable with a The reduced cost for a decision variable with a positive value is 0.positive value is 0.
20 20© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 2: A Minimization ProblemExample 2: A Minimization Problem
LP FormulationLP Formulation
Min 5Min 5xx11 + 2 + 2xx22
s.t. 2s.t. 2xx11 + 5 + 5xx22 >> 10 10
44xx11 - - xx22 >> 12 12
xx11 + + xx22 >> 4 4
xx11, , xx22 >> 0 0
21 21© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 2: Graphical SolutionExample 2: Graphical Solution
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 = -12, which is not on the graph. not on the graph. Thus, to get a second Thus, to get a second point on this line, set point on this line, set xx11 to any to any number larger number larger than 3 and solve for than 3 and solve for xx22: when : when xx11 = 5, = 5, then then xx22 = 8. Connect (3,0) and (5,8). The ">" side is = 8. Connect (3,0) and (5,8). The ">" side is to to the right.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.
22 22© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 2: Graphical SolutionExample 2: Graphical Solution
Constraints GraphedConstraints Graphed
55
44
33
22
11
55
44
33
22
11
1 2 3 4 5 61 2 3 4 5 6 1 2 3 4 5 61 2 3 4 5 6
xx22xx22
44xx11 - - xx22 >> 12 12
xx11 + + xx22 >> 4 4
44xx11 - - xx22 >> 12 12
xx11 + + xx22 >> 4 4
22xx11 + 5 + 5xx22 >> 10 1022xx11 + 5 + 5xx22 >> 10 10
xx11xx11
Feasible RegionFeasible Region
23 23© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 2: Graphical SolutionExample 2: Graphical Solution
Graph the Objective FunctionGraph the Objective Function
Set the objective function equal to an Set the objective function equal to an arbitrary constant (say 20) and graph it. For 5arbitrary constant (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,0) and (0,10). = 4. Connect (4,0) and (0,10).
Move the Objective Function Line Toward Move the Objective Function Line Toward OptimalityOptimality
Move it in the direction which lowers its Move it in the direction which lowers its value (down), since we are minimizing, until it value (down), since we are minimizing, until it touches the last point of the feasible region, touches the last point of the feasible region, determined by the last two constraints.determined by the last two constraints.
24 24© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 2: Graphical SolutionExample 2: Graphical Solution
Objective Function GraphedObjective Function Graphed
5
4
3
2
1
5
4
3
2
1
1 2 3 4 5 6 1 2 3 4 5 6
xx22xx22Min Min zz = 5 = 5xx11 + 2 + 2xx22
44xx11 - - xx22 >> 12 12
xx11 + + xx22 >> 4 4
Min Min zz = 5 = 5xx11 + 2 + 2xx22
44xx11 - - xx22 >> 12 12
xx11 + + xx22 >> 4 4
22xx11 + 5 + 5xx22 >> 10 1022xx11 + 5 + 5xx22 >> 10 10
xx11xx11
25 25© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
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/54/5
Example 2: Graphical SolutionExample 2: Graphical Solution
26 26© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 2: Graphical SolutionExample 2: Graphical Solution
Solve for the Optimal Value of the Objective Solve for the Optimal Value of the Objective FunctionFunction
Solve for Solve for zz = 5 = 5xx11 + 2 + 2xx22 = 5(16/5) + 2(4/5) = = 5(16/5) + 2(4/5) = 88/5.88/5.
Thus the optimal solution is Thus the optimal solution is
xx11 = 16/5; = 16/5; xx22 = 4/5; = 4/5; z z = 88/5= 88/5
27 27© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example 2: Graphical SolutionExample 2: Graphical Solution
Optimal SolutionOptimal Solution
5
4
3
2
1
5
4
3
2
1
1 2 3 4 5 6 1 2 3 4 5 6
xx22xx22Min Min zz = 5 = 5xx11 + 2 + 2xx22
44xx11 - - xx22 >> 12 12
xx11 + + xx22 >> 4 4
Min Min zz = 5 = 5xx11 + 2 + 2xx22
44xx11 - - xx22 >> 12 12
xx11 + + xx22 >> 4 4
22xx11 + 5 + 5xx22 >> 10 10
Optimal: Optimal: xx11 = 16/5 = 16/5 xx22 = 4/5 = 4/5
22xx11 + 5 + 5xx22 >> 10 10
Optimal: Optimal: xx11 = 16/5 = 16/5 xx22 = 4/5 = 4/5xx11xx11
28 28© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Feasible RegionFeasible Region
The feasible region for a two-variable linear The feasible region for a two-variable linear programming problem can be nonexistent, a single programming problem can be nonexistent, a single point, a line, a polygon, or an unbounded area.point, a line, a polygon, or an unbounded area.
Any linear program falls in one of three categories:Any linear program falls in one of three categories:• is infeasible is infeasible
•has a unique optimal solution or alternate has a unique optimal solution or alternate optimal solutionsoptimal solutions
•has an objective function that can be increased has an objective function that can be increased without boundwithout bound
A feasible region may be unbounded and yet there A feasible region may be unbounded and yet there may be optimal solutions. This is common in may be optimal solutions. This is common in minimization problems and is possible in minimization problems and is possible in maximization problems.maximization problems.
29 29© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Special CasesSpecial Cases
Alternate Optimal SolutionsAlternate Optimal Solutions
In the graphical method, if the objective function In the graphical method, if the objective function line is parallel to a boundary constraint in the line is parallel to a boundary constraint in the direction of optimization, there are direction of optimization, there are alternate alternate optimal solutionsoptimal solutions, with all points on this line , with all points on this line segment being optimal.segment being optimal.
InfeasibilityInfeasibility
A linear program which is overconstrained so A linear program which is overconstrained so that no point satisfies all the constraints is said that no point satisfies all the constraints is said to be to be infeasibleinfeasible..
UnboundednessUnboundedness
(See example on upcoming slide.)(See example on upcoming slide.)
30 30© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example: Infeasible ProblemExample: Infeasible Problem
Solve graphically for the optimal solution:Solve graphically for the optimal solution:
Max 2Max 2xx11 + 6 + 6xx22
s.t. 4s.t. 4xx11 + 3 + 3xx22 << 12 12
22xx11 + + xx22 >> 8 8
xx11, , xx22 >> 0 0
31 31© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example: Infeasible ProblemExample: Infeasible Problem
There are no points that satisfy both constraints, There are no points that satisfy both constraints, hence this problem has no feasible region, and hence this problem has no feasible region, and no optimal solution. no optimal solution.
xx22
xx11
44xx11 + 3 + 3xx22 << 12 12
22xx11 + + xx22 >> 8 8
33 44
44
88
32 32© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example: Unbounded ProblemExample: Unbounded Problem
Solve graphically for the optimal solution:Solve graphically for the optimal solution:
Max 3Max 3xx11 + 4 + 4xx22
s.t. s.t. xx11 + + xx22 >> 5 5
33xx11 + + xx22 >> 8 8
xx11, , xx22 >> 0 0
33 33© 2003 Thomson© 2003 Thomson/South-Western/South-Western Slide Slide
Example: Unbounded ProblemExample: Unbounded Problem
The feasible region is unbounded and the The feasible region is unbounded and the objective function line can be moved parallel to objective function line can be moved parallel to itself without bound so that itself without bound so that zz can be increased can be increased infinitely. infinitely. xx22
xx11
33xx11 + + xx22 >> 8 8
xx11 + + xx22 >> 5 5
Max 3Max 3xx11 + 4 + 4xx22
55
55
88
2.672.67