You are on page 1of 49

Linear Programming:

Computer Solution and


Sensitivity Analysis

Chapter 3

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-1


Chapter Topics

 Computer Solution

 Sensitivity Analysis

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-2


Computer Solution

 Early linear programming used lengthy manual


mathematical solution procedure called the
Simplex Method.
 Steps of the Simplex Method have been
programmed in software packages designed
for linear programming problems.
 Many such packages including OPL, LİNDO,
CPLEX and GAMS are available currently.
 Text focuses on Excel Spreadsheets and QM for
Windows.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-3
QM for Windows

When using this software, make sure in your LP model:


 all variables in the constraint equations appear on the
left of the inequality (or equality),
 all numeric values to be on the right-hand side.
x3  x1 + x2 must be converted to x3 - x1 - x2  0
 Only one decision variable appears in one term
x1/(x2 + x3)  2 becomes x1  2 (x2 + x3)
and then x1 - 2x2 - 2x3  0

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-4


Beaver Creek Pottery Example
QM for Windows (1 of 5)

Exhibit 3.7
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-5
Beaver Creek Pottery Example
QM for Windows – Data Set Creation (2 of 5)

Exhibit 3.8
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-6
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-7
Beaver Creek Pottery Example
QM for Windows: Data Table (3 of 5)

Exhibit 3.9
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-8
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-9
Beaver Creek Pottery Example
Original Problem with Answers

Exhibit 3.10
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-10
Beaver Creek Pottery Example
Graph

Exhibit 3.11
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-11
Objective Function Coefficient Ranges
Ranging Table
Maximize Z = $40x1 + $50x2
subject to: x1 + 2x2  40 Sensitivity ranges
4x1 + 3x2  120 for objective
x1, x2  0 function coefficients

Exhibit 3.14
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-12
Beaver Creek Pottery Example
Sensitivity Analysis (1 of 4)

 Sensitivity analysis determines how the


changes in parameter values of the
objective function and constraints affect
the optimal solution.
 Changes may be reactions to anticipated
uncertainties in the parameters or to new or
changed information concerning the model.

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-13


The Linear Programming Model (1)

Let: X1, X2, X3, ………, Xn = decision variables


Z = Objective function or linear function.

Max Z = c1X1 + c2X2 + c3X3 + ………+ cnXn


subject to the following constraints:

where aij, bi, and cj are given constants.

1-14
Beaver Creek Pottery Example
Sensitivity Analysis (2 of 4)

25  C1  66.67
30  C2  80
Maximize Z = $40x1 + $50x2
subject to: x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

Figure 3.1
Optimal Solution Point
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-15
Sensitivity Ranges of Objective
Function Coefficients
 The sensitivity range for an objective function
coefficient is the range of values over which the current
optimal solution point will remain optimal.
 This means that the profit for a bowl can change
anywhere between $25.00 and $66.67, likewise the
profit for a mug can change anywhere between $30.00
and $80.00 and
 the optimal solution point, x1=24 and x2=8, will not
change.
 Of course, the total profit, or Z value, will change,
depending on whatever the new values of c1 and c2 are.

3-16
Beaver Creek Pottery Example
Change x1 Objective Function Coefficient (3 of 4)

25  C1  66.67
30  C2  80

Maximize Z = $100x1 + $50x2


subject to: x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

Figure 3.2 Changing the x1 Objective Function Coefficient


Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-17
Beaver Creek Pottery Example
Change x2 Objective Function Coefficient (4 of 4)

25  C1  66.67
30  C2  80
Maximize Z = $40x1 + $100x2
subject to: x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

Figure 3.3 Changing the x2 Objective Function Coefficient


Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-18
Reduced Cost

Reduced cost indicates the amount of improvement necessary


in objective function coefficient of a decision variable

Exhibit 3.14
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-19
Reduced Cost
 If a decision variable is included (has a non-zero
value) in the optimal solution, its reduced cost will
be zero, otherwise that decision variable will have a
positive reduced cost.
 A positive reduced cost indicates 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 in the
objective function.

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-20


Changes in Constraint Quantity Values
Sensitivity Range for Labor Constraint

Figure 3.7 Determining the Sensitivity Range for Labor Quantity


Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-21
Changes in Constraint Quantity Values
Sensitivity Range for Clay Constraint

Figure 3.8 Determining the Sensitivity Range for Clay Quantity


Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-22
Changes in Constraint Quantity Values

Let: X1, X2, X3, ………, Xn = decision variables


Z = Objective function or linear function.

Max Z = c1X1 + c2X2 + c3X3 + ………+ cnXn


subject to the following constraints:

where aij, bi, and cj are given constants.

1-23
Changes in Constraint Quantity Values
bi

Maximize Z = $40x1 + $50x2


subject to: x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

3-24
Changes in Constraint Quantity Values

 The sensitivity range for a right-hand-side


value is the range of values over which the
quantity’s value can change without
changing the solution variable mix,
including the slack variables.
 Also, it gives the range over which dual
value (shadow price) is valid.

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-25


SHADOW PRICE (DUAL VALUE)

 It is the marginal value of increasing the


right-hand side of any constraint. In other
words, it is the additional profit generated
by an additional unit of that resource.
 Lower and upper bounds given for each
constraint (resource) provide the range
over which the shadow price for that
constraint is valid.

3-26
SENSITIVITY ANALYSIS

Dual Value RHS max Z (Profit) min Z (Cost)


Positive increase increase decrease
Positive decrease decrease increase
Negative increase decrease increase
Negative decrease increase decrease

Note: As long as increases/decreases in RHSs are within


the given lower and upper bounds

3-27
Binding and Non-Binding
Constraints
 A binding constraint will have zero
slack or zero surplus and the shadow
price for the constraint will be positive
 A non-binding constraint will have
positive slack or surplus , then its
Shadow (or Dual Price) = 0

3-28
Sensitivity Analysis of
Right-Hand SideValues
Any change in the right hand side of a binding
constraint will change the optimal solution.
For a nonbinding constraint any change in the
right-hand side that is less than its slack or
surplus, will cause no change in the optimal
solution.

3-29
Constraint Quantity Value Ranges by Computer
QM for Windows Sensitivity Range (2 of 2)

Exhibit 3.16
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-30
Other Forms of Sensitivity Analysis
Topics (1 of 4)

 Changing individual constraint parameters

 Adding new constraints

 Adding new variables

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-31


Other Forms of Sensitivity Analysis
Changing a Constraint Parameter (2 of 4)

Maximize Z = $40x1 + $50x2


subject to: x1 + 2x2  40
4x1 + 3x2  120
x1, x2  0

Figure 3.9 Changing the x1 Coefficient in the Labor Constraint


Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-32
Other Forms of Sensitivity Analysis
Adding a New Constraint (3 of 4)
Adding a new constraint to Beaver Creek Model:
0.20x1+ 0.10x2  5 hours for packaging
Original solution: 24 bowls, 8 mugs, $1,360 profit

Exhibit 3.17
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-33
Other Forms of Sensitivity Analysis
Adding a New Variable (4 of 4)
Adding a new variable to the Beaver Creek model, x3, for a third
product, cups
Maximize Z = $40x1 + 50x2 + 30x3
subject to:
x1 + 2x2 + 1.2x3  40 hr of labor
4x1 + 3x2 + 2x3  120 lb of clay
x1, x2, x3  0
Solving model shows that change has no effect on the original solution
(i.e., the model is not sensitive to this change).

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-34


Example Problem 1
ABC Company is considering bidding on a job for two airplane wing parts.
Each wing part must be processed through three manufacturing stages-
stamping, drilling, and finishing-for which the company has limited
available hours. The LP model to determine how many of part 1 (x1) and
part 2 (x2) the company should produce in order to maximize its profit is as
follows:
Maximize Z = $650x1 + 910x2
subject to: 4x1 + 7.5x2  105 (stamping, hr)
6.2x1 + 4.9x2  90 (drilling, hr)
9.1x1 + 4.1x2  110 (finishing, hr)
x 1, x 2  0
a) Find the optimum solution using graphical approach.
b) Answer following ‘What if’ questions by using the ‘Ranging Table’:
a. What is the optimum solution?
b. What if the profit per unit of product 1 increases by $10?
c. What if available labor hours at stamping department increases by
10 hrs?
d. What if available labor hours at drilling department decreases by
20 hrs?
e. What if available labor hours at finishing department increases by
30 hrs? 3-35
Example Problem 1
Part a) Graphical Solution

Maximize Z = $650x1 + $910x2


subject to:
4x1 + 7.5x2  105
6.2x1 + 4.9x2  90
9.1x1 + 4.1x2  110
x1, x2  0

Corner point B gives the


optimum solution

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-36


What if the profit per unit of product 1 increases by $10?

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-37


f available labor hours at stamping department increases by 10 hrs?

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-38


f available labor hours at drilling department decreases by 20 hrs?

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-39


f available labor hours at finishing department increases by 30 hrs?

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-40


Example Problem 1
Part b)Sensitivity Analysis
a) What is the optimum solution?
X1=5.97, X2=10.82
Z=5.97*650+10.82*910=$13722.5
b) What if the profit per unit of product 1 increases
by $10?
Z increases by 5.97*10 = $59.7
c) What if available labor hours at stamping
department increases by 10 hrs?
Z increases by 91.34*10 = $913.4

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-41


Example Problem 1
Part b)Sensitivity Analysis
d) What if available labor hours at drilling
department decreases by 20 hrs?
New value (110 hrs) will be out of given sensitivity
range, so current dual value is not valid any more
to calculate the new Z, the LP model needs to be
resolved.
e) What if available labor hours at finishing
department increases by 30 hrs?
No effect on Z, because there is already unused
hours (11.4 hours) at finishing department.

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-42


Example Problem 2
Tucker Inc. signs a contract to produce 1000 Tucker
automobiles in one month. The company has four
production plants. Due to differing workforces, technological
advances, and so on, the plants differ in the cost of producing
each car. They also use a different amount of labor and raw
material at each. This is summarized in the following table:
Plant Cost ('000) Labor(hr) Material (unit)
1 15 2 3
2 10 3 4
3 9 4 5
4 7 5 6
The contract signed requires at least 400 cars to be produced
at plant 3; there are 3300 hours of labor and 4000 units of
raw material that can be allocated to the four plants.

3-43
Example Problem 2
a) Develop an LP model to determine the number of Tucker automobiles
to produce at each plant so that the total production cost can be
minimized.
b) Use ‘QM for WindowsRanging Table to answer the following questions:
1. What is the optimum solution? What is the current cost of
production?
2. How much will it cost to produce one more automobile? How much
the cost can be reduced by producing one less?
3. How would the value of Z change if it costs only $8,000 to produce at
plant 2?
4. What if available labor hours increase by 100 hours, any effect on Z?
5. What would be the effect of producing at least 400 cars at plant 3
down to 200 cars?
6. What would be the effect of producing at least 400 cars at plant 3 up
by 100 cars?
7. What if material availability increases by 100 units?
3-44
a)
Xi : The number of cars to produce at plant i (i=1, 2,
3, 4)

MIN Z= 15000 X1 + 10000 X2 + 9000 X3 + 7000 X4


s.t.
2 X1 + 3 X2 + 4 X3 + 5 X4 ≤ 3300
3 X1 + 4 X2 + 5 X3 + 6 X4 ≤ 4000
X3 ≥ 400
X1 + X2 + X3 + X4 = 1000
X1, X2, X3, X4 ≥ 0

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-45


Example Problem 2
1. What is the optimum solution? What is the current cost of
production?
2. How much will it cost to produce one more automobile?
How much the cost can be reduced by producing one less?
3. How would the value of Z change if it costs only $8,000 to
produce at plant 2?
4. What if available labor hours increase by 100 hours, any
effect on Z?
5. What would be the effect of producing at least 400 cars at
plant 3 down to 200 cars?
6. What would be the effect of producing at least 400 cars at
plant 3 up by 100 cars?
7. What if material availability increases by 100 units?
3-46
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 3-47
Example Problem 2
Part b)Sensitivity Analysis
1. What is the optimum solution? What is the current cost
of production?
Z= 400*15000+200*10000+400*9000= $11 600 000
2. How much will it cost to produce one more
automobile? How much the cost can be reduced by
producing one less?
$30000
3. How would the value of Z change if it costs only
$8,000 to produce at plant 2?
Z would decrease by 2000*200= $400 000

3-48
Example Problem 2
Part b)Sensitivity Analysis
4. What if available labor hours increase by 100 hours,
any effect on Z?
No effect on Z, there is already slack
5. What would be the effect of producing at least 400
cars at plant 3 down to 200 cars?
Z would decrease by 200*4000= $800 000
6. What would be the effect of producing at least 400
cars at plant 3 up by 100 cars?
Z would increase by 100*4000= $400 000
7. What if material availability increases by 100 units?
Z would decrease by 100*5000=$500000
3-49

You might also like