Upload
melvyn-barber
View
260
Download
0
Tags:
Embed Size (px)
Citation preview
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 1
Chapter 7
Linear Programming: ComputerSolution and Sensitivity Analysis
Introduction to Management Science
8th Edition
by
Bernard W. Taylor III
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 2
Chapter Topics
Computer SolutionMicrosoft Excel’s “Solver” module
QM for Excel
QM for Windows
Sensitivity AnalysisDone “by hand”
Using Microsoft Excel’s “Solver” module
QM for Excel
QM for Windows
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 3
Early linear programming used lengthy manual mathematical solution procedure called the Simplex Method (See CD-ROM Module A).
Steps of the Simplex Method have been programmed in software packages designed for linear programming problems.
Many such packages available currently.
Used extensively in business and government.
Text focuses on Excel Spreadsheets and QM for Windows.
Computer Solution
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 4
Beaver Creek Pottery ExampleExcel Spreadsheet – Data Screen (1 of 5)
Exhibit 7.1
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 5
Beaver Creek Pottery Example“Solver” Parameter Screen (2 of 5)
Exhibit 7.2 Click on “Options” and then on
“Assume Linear Models” !
Click on “Options” and then on
“Assume Linear Models” !
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 6
Exhibit 7.3
Beaver Creek Pottery ExampleAdding Model Constraints (3 of 5)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 7
Exhibit 7.4
Beaver Creek Pottery ExampleSolution Screen (4 of 5)
Running “Solver” will iterativelyvary B10 and B11 to reduce theslack in G10 & G11.
Running “Solver” will iterativelyvary B10 and B11 to reduce theslack in G10 & G11.
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 8
Beaver Creek Pottery ExampleAnswer Report (5 of 5)
Exhibit 7.5
This report is generated only when
one clicks on “Options” and then on
“assume Linear Models” when setting
up the “Solver” calculation !
This report is generated only when
one clicks on “Options” and then on
“assume Linear Models” when setting
up the “Solver” calculation !
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 9
Linear Programming Problem Standard Form
Standard form requires all variables in the constraint equations to appear on the left of the inequality (or equality) and all numeric values to be on the right-hand side.
Examples:
x3 x1 + x2 must be converted to x3 - x1 - x2 0
x1/(x2 + x3) 2 becomes x1 2 (x2 + x3)and then x1 - 2x2 - 2x3 0
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 10
Beaver Creek Pottery ExampleQM for Windows – Data Screen (1 of 3)
Exhibit 7.6
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 11
Beaver Creek Pottery ExampleModel Solution Screen (2 of 3)
Exhibit 7.7
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 12
Beaver Creek Pottery ExampleGraphical Solution Screen (3 of 3)
Exhibit 7.8
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 13
Beaver Creek Pottery ExampleSensitivity Analysis (1 of 4)
Sensitivity analysis determines the effect on optimal solutions of changes in parameter values of the objective function and constraint equations.
Changes may be reactions to anticipated uncertainties in the parameters or to new or changed information concerning the model.
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 14
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x1 + 3x2 120
x1, x2 0
Figure 7.1Optimal Solution Point
Beaver Creek Pottery ExampleSensitivity Analysis (2 of 4)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 15
Maximize Z = $100x1 + $50x2
subject to: 1x1 + 2x2 40 4x1 + 3x2 120
x1, x2 0
Figure 7.2Changing the x1 Objective Function Coefficient
Beaver Creek Pottery ExampleChange x1 Objective Function Coefficient (3 of 4)
Old optimal solution
New optimal solution
Changed from $40Changed from $40
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 16
Maximize Z = $40x1 + $100x2
subject to: 1x1 + 2x2 40 4x1 + 3x2 120
x1, x2 0
Figure 7.3Changing the x2 Objective Function Coefficient
Beaver Creek Pottery ExampleChange x2 Objective Function Coefficient (4 of 4)
Changed from $50Changed from $50
Old optimal solution
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 17
The sensitivity range for an objective function coefficient is the range of values over which the current optimal solution point will remain optimal.
The sensitivity range for the xi coefficient, i.e., of ci, the coefficient of xi in the objective function, Z:
Z = c1 x1 + c2 x2 + c3 x3 + …
The sensitivity range is the interval within which a single coefficient, one at a time, can be varied without changing the optimal value of the objective function. (Although there do appear multiple alternate optimal values.)
Objective Function CoefficientSensitivity Range (1 of 3)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 18
objective function Z = $40x1 + $50x2 sensitivity range for:
x1: 25 c1 66.67 x2: 30 c2 80
Figure 7.4Determining the Sensitivity Range for c1
Objective Function CoefficientSensitivity Range for c1 and c2 (2 of 3)
Slope = – c1/c2Slope = – c1/c2
– 66.67/50 = – 4/3– 66.67/50 = – 4/3
– 25/50 = – 1/2– 25/50 = – 1/2
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 19
Minimize Z = $6x1 + $3x2
subject to: 2x1 + 4x2 164x1 + 3x2 24
x1, x2 0
sensitivity ranges: 4 c1 0 c2 4.5
Objective Function CoefficientFertilizer Cost Minimization Example (3 of 3)
Figure 7.5Fertilizer Cost Minimization Example
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 20
Exhibit 7.9
Objective Function Coefficient RangesExcel “Solver” Results Screen (1 of 3)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 21
Exhibit 7.10
Objective Function Coefficient RangesBeaver Creek Example Sensitivity Report (2 of 3)
This report is generated only when one clicks on “Options” and then on “assume Linear Models” when setting up the “Solver” calculation !
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 22
Exhibit 7.11
Objective Function Coefficient RangesQM for Windows Sensitivity Range Screen (3 of 3)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 23
Changes in Constraint Quantity ValuesSensitivity Range (1 of 4)
The sensitivity range for a right-hand-side value is the range of values over which the quantity values can change without changing the solution variable mix, including slack variables.
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 24
Changes in Constraint Quantity ValuesIncreasing the Labor Constraint (2 of 4)
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x1 + 3x2 120
x1, x2 0
Figure 7.6Increasing the Labor Constraint Quantity
Consider the Labor Constraintchanging from q1=40 to q1=60
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 25
Changes in Constraint Quantity ValuesSensitivity Range for Labor Constraint (3 of 4)
Sensitivity range for:30 q1 80 hr
Figure 7.7Determining the Sensitivity Range for Labor Quantity
The “maximal” and the “minimal”values of the Labor ConstraintQuantity:
The “maximal” and the “minimal”values of the Labor ConstraintQuantity:
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 26
Changes in Constraint Quantity ValuesSensitivity Range for Clay Constraint (4 of 4)
Sensitivity range for: 60 q2 160 lb
Figure 7.8Determining the Sensitivity Range for Clay Quantity
The amount of change in Zfor a unit change in a constraintquantity is that quantity’s dual(shadow) price.
The amount of change in Zfor a unit change in a constraintquantity is that quantity’s dual(shadow) price.
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 27
Exhibit 7.12
Constraint Quantity Value Ranges by ComputerExcel Sensitivity Range for Constraints (1 of 2)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 28
Exhibit 7.13
Constraint Quantity Value Ranges by ComputerQM for Windows Sensitivity Range (2 of 2)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 29
Changing individual constraint parameters
One at a time!
Adding new constraints
…or modifying the existing ones by changing the relatione.g., by changing ‘≤’ into ‘=’ to enforce saturation (no slack)
Adding new variables
Makes the problem more complicated, but also more versatile
Other Forms of Sensitivity AnalysisTopics (1 of 4)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 30
Other Forms of Sensitivity AnalysisChanging a Constraint Parameter (2 of 4)
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40 4x1 + 3x2 120
x1, x2 0
Figure 7.9Changing the x1 Coefficient in the Labor Constraint
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 31
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 7.13
Other Forms of Sensitivity AnalysisAdding a New Constraint (3 of 4)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 32
Adding a new variable to the Beaver Creek model, x3, 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).
Other Forms of Sensitivity AnalysisAdding a New Variable (4 of 4)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 33
Defined as the marginal value of one additional unit of resource.
Also defined (earlier) as: “the amount of change in the objective function for a unit change in a constraint quantity.”
That is, by allotting one extra unit of a resource/constraint quantity (denoted qi), the objective function changes by the shadow price or that resource.
The sensitivity range for a constraint quantity value is also the range over which the shadow price is valid.
Shadow Prices (Dual Values)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 34
Maximize Z = $40x1 + $50x2 subject to:
x1 + 2x2 40 hr of labor4x1 + 3x2 120 lb of clay
x1, x2 0
Exhibit 7.14
Excel Sensitivity Report for Beaver Creek PotteryShadow Prices Example (1 of 2)
For every additional hour of labor,the profit will increase by $16.Labor can be increased from 40 to40 + 40 = 80, before the solution(x1,x2) changes.
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 35
Excel Sensitivity Report for Beaver Creek PotterySolution Screen (2 of 2)
Exhibit 7.15
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 36
Two airplane parts: no.1 and no. 2.
Three manufacturing stages: stamping, drilling, milling.
Decision variables: x1 (number of part no.1 to produce) x2 (number of part no.2 to produce)
Model: 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) x1, x2 0
Example ProblemProblem Statement (1 of 3)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 37
Maximize Z = $650x1 + $910x2
subject to: 4x1 + 7.5x2 105 6.2x1 + 4.9x2 90 9.1x1 + 4.1x2 110 x1, x2 0
s1 = 0, s2 = 0, s3 = 11.35 hr
Coefficient sensitivity:485.33 c1 1,151.43
Quantity sensitivity:89.10 q1 137.76
Figure 7.10Graphical Solution
Example ProblemGraphical Solution (2 of 3)
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 38
Example ProblemExcel Solution (3 of 3)
Exhibit 7.16
Chapter 7 - Linear Programming: Computer Solution and Sensitivity Analysis 39