You are on page 1of 38

Chapter 3

Linear Programming:
Computer Solution and
Sensitivity Analysis

BIT 2406

Chapter Topics
Computer Solution
Sensitivity Analysis

BIT 2406

Simplex Method
The Simplex method is a procedure involving a set of
mathematical steps to solve linear programming problems.
Software for computer solution of linear programming
problems is based on the Simplex method.
Tutorial on the Simplex method is included in the online
material.
An online tutorial demonstrating the Simplex method, is
available here:
http://people.hofstra.edu/Stefan_waner/RealWorld/tutorialsf4/
frames4_3.html
In this course, we will use Excel Solver to look at computerized
solution of linear programming problems.
BIT 2406

A Maximization Model Example:


Product Mix Problem

BIT 2406

A Maximization Model Example: Product


Mix Problem
Bowl

Mug

RHS

Profit ($/Unit)

40

50

Labor
(Hrs./Unit)

40

Clay (Lb./Unit)

120

Objective: Given the labor and material constraints, the company wishes to
know how many bowls and mugs to produce each day in order to
maximize profit.
Resource
40 hrs of labor per day
Availability:
120 lbs of clay

BIT 2406

A Maximization Model Example:


Product Mix Problem

Decision
Variables:
day

x1 = number of bowls to produce per day


x2 = number of mugs to produce per

Objective
Function:

maximize Z = 40x1 + 50x2

Resource
Constraints:

1x1 + 2x2 40 hours of labor


4x1 + 3x2 120 pounds of clay

Non-Negativity
Constraints*:

x1 0; x2 0

*Non-negativity constraints: restrict the decision variables to zero or positive values.


BIT 2406

Spreadsheet Setup

BIT 2406

Formula View

BIT 2406

Calling and Setting Up


Solver
0

5
2
4

BIT 2406

Solver Options

BIT 2406

10

Solver Results

BIT 2406

11

Answer Report

BIT 2406

12

Sensitivity Analysis
Sensitivity analysis is the analysis of the effect
of parameter changes on the optimal solution.
Changes may be reactions to anticipated
uncertainties in the parameters or to new or
changed information concerning the model.
The obvious solution is to change the model
parameter, solve the model again and compare
the results.
However, in some cases the effect of changes on
the model can be determined without solving the
problem again.
BIT 2406

13

Optimal Solution with Original Model

x1 number of bowls produced


x2 number of mugs produced
maximize Z 40 x1 50 x2
subject to
x1 2 x2 40 hr. of labor
4 x1 3x2 120 lb. of clay
x1 , x2 0

BIT 2406

14

Impact of Changing Objective Function


Parameter (Coefficient of x1)

x1 number of bowls produced


x2 number of mugs produced
maximize Z $100 x1 50 x2
subject to
x1 2 x2 40 hr. of labor
4 x1 3x2 120 lb. of clay
x1 , x2 0

BIT 2406

15

Impact of Changing Objective Function


Parameter (Coefficient of x2)

x1 number of bowls produced


x2 number of mugs produced
maximize Z $40 x1 100 x2
subject to
x1 2 x2 40 hr. of labor
4 x1 3x2 120 lb. of clay
x1 , x2 0

BIT 2406

16

Sensitivity Range for an


Objective Function Coefficient
The sensitivity range for an
objective coefficient is the range of
values over which the current optimal
solution point will remain optimal.
The sensitivity range for the xi
coefficient is designated as ci.

BIT 2406

17

Sensitivity Range for an


Objective Function Coefficient
(x1)

BIT 2406

18

Sensitivity Range for an


Objective Function Coefficient
(x2)

BIT 2406

19

Sensitivity Range for an


Objective Function Coefficient
(x1)
The complete sensitivity range for the x 1
coefficient is: 25 c1 66.67.
This means that the profit for a bowl can
vary anywhere between $25.00 and
$66.67, and the optimal solution point, x 1
= 24 and x2 = 8 will not change.
The total profit, however, will change
depending on what c1 actually is.
In this case, a manager would know how
much profit can be altered without
resulting in a change in production.
BIT 2406

20

Sensitivity Range for an


Objective Function Coefficient
(x2)
The complete sensitivity range for the x2
coefficient is: 30 c2 80.
The previous ranges for c1 and c2 only hold
true if we are changing only one coefficient
and holding the other constant.
Simultaneous changes in the objective
functions coefficients can be made but
determining the effect of simultaneous
changes is overly complex to do by hand.
Excel will perform sensitivity analysis and will
be used to demonstrate more complicated
analysis.
BIT 2406

21

Sensitivity Range for an


Objective Function Coefficient
(x1)
x1 number of bowls produced
x2 number of mugs produced
maximize Z $100 x1 50 x2
subject to
x1 2 x2 40 hr. of labor
4 x1 3x2 120 lb. of clay
x1 , x2 0

BIT 2406

22

Sensitivity Range for an


Objective Function Coefficient
(x2)
x1 number of bowls produced
x2 number of mugs produced
maximize Z $40 x1 100 x2
subject to
x1 2 x2 40 hr. of labor
4 x1 3x2 120 lb. of clay
x1 , x2 0

BIT 2406

23

Sensitivity Range for an


Objective Function Coefficient
x1 bags of Super - gro purchased
x2 bags of Crop - quick purchased
minimize Z 6 x1 3 x2
subject to
2 x1 4 x2 16 lb. of nitrogen
4 x1 3 x2 24 lb. of phosphate
x1 , x2 0

BIT 2406

24

Solver Solution

BIT 2406

25

Sensitivity Report

Sensitivity ranges for


objective function
coefficients.

BIT 2406

26

Sensitivity Range for a Right-HandSide (RHS) Value


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.
Dual values (marginal values/shadow prices):
the dollar amount one would be willing to pay
for one additional resource unit.
This is not the purchase price of one of these
resources, it is the maximum amount the company
would pay to get more of the resource.

Another way to look at it, the sensitivity range


for the right-hand-side value gives the range
over which the dual values are valid.
BIT 2406

27

Sensitivity Range for a RHS


Value (Labor)

BIT 2406

28

Sensitivity Range for a RHS


Value (Clay)

BIT 2406

29

Sensitivity Report

Sensitivity ranges for


the right-hand-side
values.

BIT 2406

30

Other Forms of Sensitivity


Analysis
Changing individual constraint parameters
Adding new constraints
Adding new variables
These typically require that the model be
solved again.

BIT 2406

31

Changing Individual Constraint


Parameters

x1 number of bowls produced


x2 number of mugs produced
maximize Z $40 x1 50 x2
subject to
1.33x1 2 x2 40 hr. of labor
4 x1 3x2 120 lb. of clay
x1 , x2 0

BIT 2406

32

Adding a New Constraint

BIT 2406

33

Shadow Prices
Dual values (marginal values/shadow
prices): the dollar amount one would be
willing to pay for one additional resource
unit.
This is not the purchase price of one of these
resources, it is the maximum amount the
company would pay to get more of the
resource.

The sensitivity range for the right-handside value gives the range over which the
shadow prices are valid.
BIT 2406

34

Sensitivity Report

Shadow Price (Marginal


Value or Dual Value)
In our example, that means that for every
additional hour of labor (up to the allowable
increase) will result in a $16 dollar increase in
profit. If we increase the labor hours available
to 40, we get an extra $640 ($16*40) in profit.
Past 80 hours, we have slack.
BIT 2406

35

Sensitivity Report

In our example, that means that for every


additional hour of labor (up to the allowable
increase) will result in a $16 dollar increase in
profit. If we increase the labor hours available
to 40, we get an extra $640 ($16*40) in profit.
Past 80 hours, we have slack.
BIT 2406

36

Shadow Price (Labor)

BIT 2406

37

Shadow Price (Clay)

BIT 2406

38

You might also like