LPP PDF
LPP PDF
PROGRAMMING
Dr. Himani Gupta, IIFT
Email: [email protected]
Slide 1
An Introduction to Linear Programming
Slide 2
Linear Programming (LP) Problem
Slide 3
Problem Formulation
Slide 4
Guidelines for Model Formulation
Slide 5
Example 1: A Maximization Problem
LP Formulation
s.t. x1 < 6
2x1 + 3x2 < 19
x1 + x2 < 8
x1, x2 > 0
Slide 6
Example 1: Graphical Solution
Constraint #1 Graphed
x2
6 x1 < 6
5
2
(6, 0)
1
1 2 3 4 5 6 7 8 9 10
x1
Slide 7
Example 1: Graphical Solution
Constraint #2 Graphed
x2
8
(0, 6 1/3)
7
2 (9 1/2, 0)
1
1 2 3 4 5 6 7 8 9 10
x1
Slide 8
Example 1: Graphical Solution
Constraint #3 Graphed
x2
(0, 8)
8
x1 + x2 < 8
7
1
(8, 0)
1 2 3 4 5 6 7 8 9 10
x1
Slide 9
Example 1: Graphical Solution
Combined-Constraint Graph
x2
x1 + x2 < 8
8
6 x1 < 6
5
3
2x1 + 3x2 < 19
2
1 2 3 4 5 6 7 8 9 10
x1
Slide 10
Example 1: Graphical Solution
3
Feasible
2
Region
1
1 2 3 4 5 6 7 8 9 10
x1
Slide 11
Example 1: Graphical Solution
7
(0, 5)
6 Objective Function
5 5x1 + 7x2 = 35
4
2
(7, 0)
1
1 2 3 4 5 6 7 8 9 10
x1
Slide 12
Example 1: Graphical Solution
Optimal Solution
x2
Objective Function
5x1 + 7x2 = 46
8
6
Optimal Solution
(x1 = 5, x2 = 3)
5
1 2 3 4 5 6 7 8 9 10
x1
Slide 13
Slack and Surplus Variables
Slide 14
Example 1
Standard Form
s.t. x1 + s1 = 6
2x1 + 3x2 + s2 = 19
x1 + x2 + s3 = 8
x1, x2 , s1 , s2 , s3 > 0
Slide 15
Extreme Points and the Optimal Solution
Slide 16
Example 1: Graphical Solution
7
5
6
3
4
2 Feasible 3
1
Region
1 2
1 2 3 4 5 6 7 8 9 10 x1
Slide 17
Computer Solutions
Slide 18
Interpretation of Computer Output
Slide 19
Example 1: Spreadsheet Solution
Slide 20
Example 1: Spreadsheet Solution
Slide 21
Example 1: Spreadsheet Solution
Slide 22
Reduced Cost
Slide 23
Example 1: Spreadsheet Solution
Reduced Costs
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$8 X1 5.0 0.0 5 2 0.333333333
$C$8 X2 3.0 0.0 7 0.5 2
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$13 #1 5 0 6 1E+30 1
$B$14 #2 19 2 19 5 1
$B$15 #3 8 1 8 0.333333333 1.666666667
Slide 24
Feasible Region
Slide 25
Special Cases
Slide 26
Example: Infeasible Problem
x1, x2 > 0
Slide 27
Example: Infeasible Problem
8 2x1 + x2 > 8
x1
3 4
Slide 28
Example: Unbounded Problem
s.t. x1 + x2 > 5
3x1 + x2 > 8
x1, x2 > 0
Slide 29
Example: Unbounded Problem
3x1 + x2 > 8
8
Max 3x1 + 4x2
5
x1 + x2 > 5
x1
2.67 5
Slide 30
Sensitivity Analysis
and Interpretation of Solution
Slide 31
Standard Computer Output
Slide 32
we will discuss:
•changes in the coefficients of the objective function
•changes in the right-hand side value of a constraint
Slide 33
Sensitivity Analysis
Slide 34
Graphical Sensitivity Analysis
Slide 35
Example 1
LP Formulation
s.t. x1 < 6
2x1 + 3x2 < 19
x1 + x2 < 8
x1, x2 > 0
Slide 36
Example 1
Graphical Solution
x2
8
x1 + x2 < 8
Max 5x1 + 7x2
7
6
x1 < 6
5
Optimal:
4
x1 = 5, x2 = 3, z = 46
3
2
2x1 + 3x2 < 19
1
1 2 3 4 5 6 7 8 9 10
x1
Slide 37
Objective Function Coefficients
Slide 38
Example 1
5 5
4
3
Feasible
2 4
Region 3
1
1 2
1 2 3 4 5 6 7 8 9 10
x1
Slide 39
Range of Optimality
Slide 40
Example 1
Slide 41
Example 1
Slide 42
Example 1
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$13 #1 5 0 6 1E+30 1
$B$14 #2 19 2 19 5 1
$B$15 #3 8 1 8 0.333333333 1.666666667
Slide 43
Right-Hand Sides
Slide 44
Dual Price
Slide 45
A Cautionary Note
on the Interpretation of Dual Prices
Resource cost is sunk
The dual price is the maximum amount you should be
willing to pay for one additional unit of the resource.
Resource cost is relevant
The dual price is the maximum premium over the
normal cost that you should be willing to pay for one
unit of the resource.
Slide 46
Example 1
Dual Prices
Constraint 1: Since x1 < 6 is not a binding constraint,
its dual price is 0.
Constraint 2: Change the RHS value of the second
constraint to 20 and resolve for the optimal point
determined by the last two constraints:
2x1 + 3x2 = 20 and x1 + x2 = 8.
The solution is x1 = 4, x2 = 4, z = 48. Hence, the
dual price = znew - zold = 48 - 46 = 2.
Slide 47
Example 1
Dual Prices
Constraint 3: Change the RHS value of the third
constraint to 9 and resolve for the optimal point
determined by the last two constraints: 2x1 + 3x2 = 19
and x1 + x2 = 9.
The solution is: x1 = 8, x2 = 1, z = 47.
The dual price is znew - zold = 47 - 46 = 1.
Slide 48
Example 1
Dual Prices
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$8 X1 5.0 0.0 5 2 0.33333333
$C$8 X2 3.0 0.0 7 0.5 2
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$13 #1 5 0 6 1E+30 1
$B$14 #2 19 2 19 5 1
$B$15 #3 8 1 8 0.33333333 1.66666667
Slide 49
Range of Feasibility
Slide 50
Example 1
Range of Feasibility
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$8 X1 5.0 0.0 5 2 0.33333333
$C$8 X2 3.0 0.0 7 0.5 2
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$13 #1 5 0 6 1E+30 1
$B$14 #2 19 2 19 5 1
$B$15 #3 8 1 8 0.33333333 1.66666667
Slide 51
Example 2: Olympic Bike Co.
Slide 52
Example 2: Olympic Bike Co.
Model Formulation
•Verbal Statement of the Objective Function
Maximize total weekly profit.
•Verbal Statement of the Constraints
Total weekly usage of aluminum alloy < 100 pounds.
Total weekly usage of steel alloy < 80 pounds.
•Definition of the Decision Variables
x1 = number of Deluxe frames produced weekly.
x2 = number of Professional frames produced weekly.
Slide 53
Example 2: Olympic Bike Co.
x1, x2 > 0
Slide 54
Example 2: Olympic Bike Co.
Slide 55
Example 2: Olympic Bike Co.
Slide 56
Example 2: Olympic Bike Co.
Optimal Solution
Slide 57
Example 2: Olympic Bike Co.
Range of Optimality
Question
Suppose the profit on deluxe frames is increased to
$20. Is the above solution still optimal? What is the
value of the objective function when this unit profit is
increased to $20?
Slide 58
Example 2: Olympic Bike Co.
Sensitivity Report
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$8 Deluxe 15 0 10 12.5 2.5
$C$8 Profess. 17.500 0.000 15 5 8.333333333
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$13 Aluminum 100 3.125 100 60 46.66666667
$B$14 Steel 80 1.25 80 70 30
Slide 59
Example 2: Olympic Bike Co.
Range of Optimality
Answer
The output states that the solution remains optimal
as long as the objective function coefficient of x1 is
between 7.5 and 22.5. Since 20 is within this range, the
optimal solution will not change. The optimal profit
will change: 20x1 + 15x2 = 20(15) + 15(17.5) = $562.50.
Slide 60
Example 2: Olympic Bike Co.
Range of Optimality
Question
If the unit profit on deluxe frames were $6 instead
of $10, would the optimal solution change?
Slide 61
Example 2: Olympic Bike Co.
Range of Optimality
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$8 Deluxe 15 0 10 12.5 2.5
$C$8 Profess. 17.500 0.000 15 5 8.33333333
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$B$13 Aluminum 100 3.125 100 60 46.66666667
$B$14 Steel 80 1.25 80 70 30
Slide 62
Example 2: Olympic Bike Co.
Range of Optimality
Answer
The output states that the solution remains optimal
as long as the objective function coefficient of x1 is
between 7.5 and 22.5. Since 6 is outside this range, the
optimal solution would change.
Slide 63
Range of Optimality and 100% Rule
Slide 64
Range of Optimality and 100% Rule
Question Olympic Bike Co.
If simultaneously the profit on Deluxe frames was
raised to $16 and the profit on Professional frames was
raised to $17, would the current solution be optimal?
Answer
If c1 = 16, the amount c1 changed is 16 - 10 = 6 . The
maximum allowable increase is 22.5 - 10 = 12.5, so this
is a 6/12.5 = 48% change.
Slide 66
Problem
Slide 67
Example 1: Primal Problem
LP Formulation
Slide 68
Example 1: Dual Problem
LP Formulation
Slide 69