0% found this document useful (0 votes)
151 views69 pages

LPP PDF

The document provides an introduction to linear programming, including definitions of key terms like constraints, feasible and optimal solutions. It presents a sample maximization problem and shows how to formulate it as a linear program with decision variables and constraints. The graphical solution method is demonstrated, finding the optimal solution at an extreme point of the feasible region. Computer solutions are also discussed, with an example showing the optimal values and slack variables in spreadsheet output.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
151 views69 pages

LPP PDF

The document provides an introduction to linear programming, including definitions of key terms like constraints, feasible and optimal solutions. It presents a sample maximization problem and shows how to formulate it as a linear program with decision variables and constraints. The graphical solution method is demonstrated, finding the optimal solution at an extreme point of the feasible region. Computer solutions are also discussed, with an example showing the optimal values and slack variables in spreadsheet output.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

LINEAR

PROGRAMMING
Dr. Himani Gupta, IIFT
Email: [email protected]

Slide 1
An Introduction to Linear Programming

 Linear Programming Problem


 Problem Formulation
 A Maximization Problem
 Graphical Solution Procedure
 Extreme Points and the Optimal Solution
 Computer Solutions
 A Minimization Problem
 Special Cases

Slide 2
Linear Programming (LP) Problem

 The maximization or minimization of some quantity is


the objective in all linear programming problems.
 All LP problems have constraints that limit the degree
to which the objective can be pursued.
 A feasible solution satisfies all the problem's
constraints.
 An optimal solution is a feasible solution that results in
the largest possible objective function value when
maximizing (or smallest when minimizing).
 A graphical solution method can be used to solve a
linear program with two variables.

Slide 3
Problem Formulation

 Problem formulation or modeling is the process of


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

Slide 4
Guidelines for Model Formulation

 Understand the problem thoroughly.


 Describe the objective.
 Describe each constraint.
 Define the decision variables.
 Write the objective in terms of the decision variables.
 Write the constraints in terms of the decision variables.

Slide 5
Example 1: A Maximization Problem

 LP Formulation

Max 5x1 + 7x2

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

4 2x1 + 3x2 < 19


3

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

 Feasible Solution Region


x2

3
Feasible
2
Region
1

1 2 3 4 5 6 7 8 9 10
x1

Slide 11
Example 1: Graphical Solution

 Objective Function Line


x2

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

 A linear program in which all the variables are non-


negative and all the constraints are equalities is said to
be in standard form.
 Standard form is attained by adding slack variables to
"less than or equal to" constraints, and by subtracting
surplus variables from "greater than or equal to"
constraints.
 Slack and surplus variables represent the difference
between the left and right sides of the constraints.
 Slack and surplus variables have objective function
coefficients equal to 0.

Slide 14
Example 1

 Standard Form

Max 5x1 + 7x2 + 0s1 + 0s2 + 0s3

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

 The corners or vertices of the feasible region are


referred to as the extreme points.
 An optimal solution to an LP problem can be found at
an extreme point of the feasible region.
 When looking for the optimal solution, you do not have
to evaluate all feasible solution points.
 You have to consider only the extreme points of the
feasible region.

Slide 16
Example 1: Graphical Solution

 The Five Extreme Points


x2
8

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

 we will discuss the following output:


•objective function value
•values of the decision variables
•reduced costs
•slack/surplus
 an optimal solution is affected by a change in:
•a coefficient of the objective function
•the right-hand side value of a constraint

Slide 19
Example 1: Spreadsheet Solution

 Partial Spreadsheet Showing Problem Data


A B C D
1 LHS Coefficients
2 Constraints X1 X2 RHS Values
3 #1 1 0 6
4 #2 2 3 19
5 #3 1 1 8
6 Obj.Func.Coeff. 5 7

Slide 20
Example 1: Spreadsheet Solution

 Partial Spreadsheet Showing Solution


A B C D
8 Optimal Decision Variable Values
9 X1 X2
10 5.0 3.0
11
12 Maximized Objective Function 46.0
13
14 Constraints Amount Used RHS Limits
15 #1 5 <= 6
16 #2 19 <= 19
17 #3 8 <= 8

Slide 21
Example 1: Spreadsheet Solution

 Interpretation of Computer Output

We see from the previous slide that:

Objective Function Value = 46


Decision Variable #1 (x1) = 5
Decision Variable #2 (x2) = 3
Slack in Constraint #1 = 1 (= 6 - 5)
Slack in Constraint #2 = 0 (= 19 - 19)
Slack in Constraint #3 = 0 (= 8 - 8)

Slide 22
Reduced Cost

 The reduced cost for a decision variable whose value is


0 in the optimal solution is the amount the variable's
objective function coefficient would have to improve
(increase for maximization problems, decrease for
minimization problems) before this variable could
assume a positive value.
 The reduced cost for a decision variable with a positive
value is 0.

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

 The feasible region for a two-variable linear


programming problem can be nonexistent, a single
point, a line, a polygon, or an unbounded area.
 Any linear program falls in one of three categories:
•is infeasible
•has a unique optimal solution or alternate optimal
solutions
•has an objective function that can be increased
without bound
 A feasible region may be unbounded and yet there may
be optimal solutions. This is common in minimization
problems and is possible in maximization problems.

Slide 25
Special Cases

 Alternative Optimal Solutions


In the graphical method, if the objective function line is
parallel to a boundary constraint in the direction of
optimization, there are alternate optimal solutions, with
all points on this line segment being optimal.
 Infeasibility
A linear program which is overconstrained so that no
point satisfies all the constraints is said to be infeasible.
 Unboundedness
(See example on upcoming slide.)

Slide 26
Example: Infeasible Problem

 Solve graphically for the optimal solution:

Max 2x1 + 6x2

s.t. 4x1 + 3x2 < 12


2x1 + x2 > 8

x1, x2 > 0

Slide 27
Example: Infeasible Problem

 There are no points that satisfy both constraints, hence


this problem has no feasible region, and no optimal
solution.
x2

8 2x1 + x2 > 8

4x1 + 3x2 < 12


4

x1
3 4
Slide 28
Example: Unbounded Problem

 Solve graphically for the optimal solution:

Max 3x1 + 4x2

s.t. x1 + x2 > 5
3x1 + x2 > 8

x1, x2 > 0

Slide 29
Example: Unbounded Problem

 The feasible region is unbounded and the objective


function line can be moved parallel to itself without
bound so that z can be increased infinitely.
x2

3x1 + x2 > 8
8
Max 3x1 + 4x2

5
x1 + x2 > 5

x1
2.67 5
Slide 30
Sensitivity Analysis
and Interpretation of Solution

 Introduction to Sensitivity Analysis


 Graphical Sensitivity Analysis
 Sensitivity Analysis: Computer Solution
 Simultaneous Changes

Slide 31
Standard Computer Output

Software packages such as Solver and TORA provide the


following LP information:
 Information about the objective function:
•its optimal value
•coefficient ranges (ranges of optimality)
 Information about the decision variables:
•their optimal values
•their reduced costs
 Information about the constraints:
•the amount of slack or surplus
•the dual prices
•right-hand side ranges (ranges of feasibility)

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

 Sensitivity analysis (or post-optimality analysis) is used


to determine how the optimal solution is affected by
changes, within specified ranges, in:
•the objective function coefficients
•the right-hand side (RHS) values
 Sensitivity analysis is important to the manager who
must operate in a dynamic environment with imprecise
estimates of the coefficients.
 Sensitivity analysis allows him to ask certain what-if
questions about the problem.

Slide 34
Graphical Sensitivity Analysis

Slide 35
Example 1

 LP Formulation

Max 5x1 + 7x2

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

 Let us consider how changes in the objective function


coefficients might affect the optimal solution.
 The range of optimality for each coefficient provides the
range of values over which the current solution will
remain optimal.
 Managers should focus on those objective coefficients
that have a narrow range of optimality and coefficients
near the endpoints of the range.

Slide 38
Example 1

 Changing Slope of Objective Function


x2
8

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

 Graphically, the limits of a range of optimality are


found by changing the slope of the objective function
line within the limits of the slopes of the binding
constraint lines.
 The slope of an objective function line, Max c1x1 + c2x2,
is -c1/c2, and the slope of a constraint, a1x1 + a2x2 = b, is
-a1/a2.

Slide 40
Example 1

 Range of Optimality for c1


The slope of the objective function line is -c1/c2.
The slope of the first binding constraint, x1 + x2 = 8, is -1
and the slope of the second binding constraint, x1 + 3x2
= 19, is -2/3.
Find the range of values for c1 (with c2 staying 7)
such that the objective function line slope lies between
that of the two binding constraints:
-1 < -c1/7 < -2/3
Multiplying through by -7 (and reversing the
inequalities):
14/3 < c1 < 7

Slide 41
Example 1

 Range of Optimality for c2


Find the range of values for c2 ( with c1 staying 5)
such that the objective function line slope lies between
that of the two binding constraints:
-1 < -5/c2 < -2/3

Multiplying by -1: 1 > 5/c2 > 2/3


Inverting, 1 < c2/5 < 3/2

Multiplying by 5: 5 < c2 < 15/2

Slide 42
Example 1

 Range of Optimality for c1 and c2


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 43
Right-Hand Sides

 Let us consider how a change in the right-hand side for


a constraint might affect the feasible region and perhaps
cause a change in the optimal solution.
 The improvement in the value of the optimal solution
per unit increase in the right-hand side is called the
dual price.
 The range of feasibility is the range over which the dual
price is applicable.
 As the RHS increases, other constraints will become
binding and limit the change in the value of the
objective function.

Slide 44
Dual Price

 Graphically, a dual price is determined by adding +1 to


the right hand side value in question and then resolving
for the optimal solution in terms of the same two
binding constraints.
 The dual price is equal to the difference in the values of
the objective functions between the new and original
problems.
 The dual price for a nonbinding constraint is 0.
 A negative dual price indicates that the objective
function will not improve if the RHS is increased.

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

 The range of feasibility for a change in the right hand


side value is the range of values for this coefficient in
which the original dual price remains constant.
 Graphically, the range of feasibility is determined by
finding the values of a right hand side coefficient such
that the same two lines that determined the original
optimal solution continue to determine the optimal
solution for the problem.

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.

Olympic Bike is introducing two new lightweight


bicycle frames, the Deluxe and the Professional, to be
made from special aluminum and steel alloys. The
anticipated unit profits are $10 for the Deluxe and $15 for
the Professional. The number of pounds of each alloy
needed per frame is summarized below. A supplier
delivers 100 pounds of the aluminum alloy and 80
pounds of the steel alloy weekly.
Aluminum Alloy Steel Alloy
Deluxe 2 3
Professional 4 2
How many Deluxe and Professional frames should
Olympic produce each week?

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.

 Model Formulation (continued)

Max 10x1 + 15x2 (Total Weekly Profit)

s.t. 2x1 + 4x2 < 100 (Aluminum Available)


3x1 + 2x2 < 80 (Steel Available)

x1, x2 > 0

Slide 54
Example 2: Olympic Bike Co.

 Partial Spreadsheet Showing Problem Data


A B C D
1 Material Requirements Amount
2 Material Deluxe Profess. Available
3 Aluminum 2 4 100
4 Steel 3 2 80

Slide 55
Example 2: Olympic Bike Co.

 Partial Spreadsheet Showing Solution


A B C D
6 Decision Variables
7 Deluxe Professional
8 Bikes Made 15 17.500
9
10 Maximized Total Profit 412.500
11
12 Constraints Amount Used Amount Avail.
13 Aluminum 100 <= 100
14 Steel 80 <= 80

Slide 56
Example 2: Olympic Bike Co.

 Optimal Solution

According to the output:


x1 (Deluxe frames) = 15
x2 (Professional frames) = 17.5
Objective function value = $412.50

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

 The 100% rule states that simultaneous changes in


objective function coefficients will not change the
optimal solution as long as the sum of the percentages
of the change divided by the corresponding maximum
allowable change in the range of optimality for each
coefficient does not exceed 100%.

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.

If c2 = 17, the amount that c2 changed is 17 - 15 = 2.


The maximum allowable increase is 20 - 15 = 5 so this is
a 2/5 = 40% change.

The sum of the change percentages is 88%.


Since this does not exceed 100%, the optimal solution
would not change.
Slide 65
Range of Feasibility and 100% Rule

 The 100% rule states that simultaneous changes in


right-hand sides will not change the dual prices as long
as the sum of the percentages of the changes divided by
the corresponding maximum allowable change in the
range of feasibility for each right-hand side does not
exceed 100%.

Slide 66
Problem

 Three Retail outlet


R1 R2 R3 supply
W1 2 4 3 300
W2 5 3 4 600
Demand 200 300 400 900 (Total)

Slide 67
Example 1: Primal Problem

 LP Formulation

Min cost z= 2 x11 +4 x12 +3 x13 +5 x21 +3x22 + 4x23

s.t. x11 + x12 +x13 < 300


x21 + x22 +x23 < 600
x11+ x21 ≥ 200
x12+ x22 ≥ 300
x13+ x23 ≥ 400
xij> 0

Slide 68
Example 1: Dual Problem

 LP Formulation

Max profit z’= -300 y1-600 y2+200 y3 +300 y4+400 y5

s.t - y1+ y3 < 2


- y1+ y4 < 4
- y1+ y5 < 3
- y2+ y3 < 5
- y2+ y4 < 3
- y2+ y5 < 4
yi > 0

Slide 69

You might also like