Escolar Documentos
Profissional Documentos
Cultura Documentos
Where:
x1 = number of soldiers produced each week
x2 = number of trains produced each week.
2
The optimal solution for this X2
100
finishing constraint
A Feasible Region
80
demand constraint
60
basic variables. B Slope = -3/2
40
carpentry constraint
Slope = -1
problem’s objective function
coefficients or right-hand
20
C
3
Graphical analysis of the effect of a change in
an objective function value for the Giapetto LP
shows:
By inspection, we can see that making the slope of
the isoprofit line more negative than the finishing
constraint (slope = -2) will cause the optimal point to
switch from point B to point C.
Likewise, making the slope of the isoprofit line less
negative than the carpentry constraint (slope = -1)
will cause the optimal point to switch from point B to
point A.
Clearly, the slope of the isoprofit line must be
between -2 and -1 for the current basis to remain
optimal.
4
A graphical analysis can also be used to
determine whether a change in the rhs of a
constraint will make the current basis no
longer optimal. For example, let b1 = number
of available finishing hours.
The current optimal solution (point B) is where
the carpentry and finishing constraints are
binding.
If the value of b1 is changed, then as long as
where the carpentry and finishing constraints
are binding, the optimal solution will still occur
where the carpentry and finishing constraints
intersect.
5
In the Giapetto problem to
the right, we see that if b1 X2
finishing constraint, b1 = 120
100
> 120, x1 will be greater finishing constraint, b1 = 100
80
Also, if b1 < 80, x1 will be demand constraint
60
B
nonnegativity constraint
for x1 will be violated. D
40
carpentry constraint
change.
6
It is often important to determine how a change in a
constraint’s rhs changes the LP’s optimal z-value.
The shadow price for the ith constraint of an LP is the
amount by which the optimal z-value is improved if the
rhs of the ith constraint is increased by one.
This definition applies only if the change in the rhs of
constraint i leaves the current basis optimal.
For the finishing constraint, 100 + finishing hours are
available.
The LP’s optimal solution is then
x1 = 20 + and x2 = 60 – with z = 3x1 + 2x2 = 3(20 +
) + 2(60 - ) = 180 + .
Thus, as long as the current basis remains optimal, a one-
unit increase in the number of finishing hours will increase
the optimal z-value by $1. So, the shadow price for the
first (finishing hours) constraint is $1.
7
Sensitivity analysis is important for several
reasons:
Values of LP parameters might change. If a
parameter changes, sensitivity analysis shows it is
unnecessary to solve the problem again.
For example in the Giapetto problem, if the profit
contribution of a soldier changes to $3.50, sensitivity
analysis shows the current solution remains optimal.
Uncertainty about LP parameters.
In the Giapetto problem for example, if the weekly
demand for soldiers is at least 20, the optimal
solution remains 20 soldiers and 60 trains. Thus,
even if demand for soldiers is uncertain, the
company can be fairly confident that it is still optimal
to produce 20 soldiers and 60 trains. 8
4.2 The Computer and Sensitivity
Analysis
If an LP has more than two decision variables,
the range of values for a rhs (or objective
function coefficient) for which the basis
remains optimal cannot be determined
graphically.
These ranges can be computed by hand but
this is often tedious, so they are usually
determined by a packaged computer program.
LINDO will be used and the interpretation of its
sensitivity analysis discussed.
9
Example 1: Winco Products 1
Winco sells four types of products. The resources needed
to produce one unit of each and the sales prices are
given in Table 2. Currently, 4,600 units of raw material
and 5,000 labor hours are available. The resources
needed to produce one unit of each are known.
Product 1 Product 2 Product 3 Product 4
Raw material 2 3 4 7
Hours of labor 3 4 5 6
Sales price $4 $6 $7 $8
11
Ex. 1 – Solution continued
The LINDO output.
Reduced cost is the MAX 4 X1 + 6 X2 + 7 X3 + 8 X4
amount the objective SUBJECT TO
2) X1 + X2 + X3 + X4 = 950
NO. ITERATIONS= 4
12
Ex. 1 – Solution continued
LINDO sensitivity RANGES IN WHICH THE BASIS IS UNCHANGED:
13
Ex. 1 – Solution continued
Shadow prices are shown MAX 4 X1 + 6 X2 + 7 X3 + 8 X4
SUBJECT TO
of a constraint is X1
X2
0.000000
400.000000
1.000000
0.000000
NO. ITERATIONS= 4
14
Shadow price signs
1. Constraints with symbols will always have
nonpositive shadow prices.
2. Constraints with will always have nonnegative
shadow prices.
3. Equality constraints may have a positive, a
negative, or a zero shadow price.
15
For any inequality constraint, the product of
the values of the constraint’s slack/excess
variable and the constraint’s shadow price
must equal zero.
This implies that any constraint whose slack or
excess variable > 0 will have a zero shadow price.
Similarly, any constraint with a nonzero shadow price
must be binding (have slack or excess equaling zero).
For constraints with nonzero slack or excess,
relationships are detailed in the table below:
Type of Constraint Allowable Increase for rhs Allowable Decrease for rhs
≤ ∞ = value of slack
≥ = value of excess ∞
16
When the optimal solution is degenerate (a bfs
is degenerate if at least one basic variable in
the optimal solution equals 0), caution must be
used when interpreting the LINDO output.
For an LP with m constraints, if the optimal
LINDO output indicates less than m variables
are positive, then the optimal solution is
degenerate bfs.
MAX 6 X1 + 4 X2 + 3 X3 + 2 X4
SUBJECT TO
2) 2 X1 + 3 X2 + X3 + 2 X4 <= 400
3) X1 + X2 + 2 X3 + X4 <= 150
4) 2 X1 + X2 + X3 + 0.5 X4 <= 200
5) 3 X1 + X2 + X4 <= 250
17
Since the LP has four
constraints and in the
optimal solution only two
variables are positive,
the optimal solution is a
degenerate bfs.
LP OPTIMUM FOUND AT STEP 3
OBJECTIVE FUNCTION VALUE
1) 700.0000
VARIABLE VALUE REDUCED COST
X1 50.000000 0.000000
X2 100.000000 0.000000
X3 0.000000 0.000000
X4 0.000000 1.500000
ROW SLACK OR SURPLUS DUAL PRICES
2) 0.000000 0.500000
3) 0.000000 1.250000
4) 0.000000 0.000000
5) 0.000000 1.250000
18
RANGES IN WHICH THE BASIS IS UNCHANGED:
22
Example 5: Winco Products 2
Reconsider the Winco to the right.
What is the most Winco should be willing to
pay for additional units of raw material or
labor?
23
Example 5: Solution
The shadow price for raw
material constraint (row 4)
shows an extra unit of raw MAX 4 X1 + 6 X2 + 7 X3 + 8 X4
SUBJECT TO
revenue $1.
4) 2 X1 + 3 X2 + 4 X3 + 7 X4 <= 4600
5) 3 X1 + 4 X2 + 5 X3 + 6 X4 <= 5000
END
NO. ITERATIONS= 4
24
4.4 What happens to the Optimal z-Value if
the Current Basis Is No Longer Optimal?
25
The use of the LINDO PARAMETICS feature is
illustrated by varying the amount of raw
material in the Winco example.
Suppose we want to determine how the optimal z-
value and shadow price change as the amount of raw
material varies between 0 and 10,000 units.
With 0 raw material, we then obtain from the RANGE
and SENSITIVTY ANALYSIS results that show Row 4
has an ALLOWABLE INCREASE of -3900. This
indicates at least 3900 units of raw material are
required to make the problem feasible.
26
Raw Material rhs = 3900 optimal solution
RANGES IN WHICH THE BASIS IS UNCHANGED:
OBJECTIVE FUNCTION VALUE
OBJ COEFFICIENT RANGES
1) 5400.000
VARIABLE CURRENT ALLOWABLE ALLOWABLE
COEF INCREASE DECREASE
VARIABLE VALUE REDUCED COST
X1 4.000000 1.000000 INFINITY
X1 550.000000 0.000000
X2 0.000000 0.000000 X2 6.000000 INFINITY 0.500000
X3 7.000000 1.000000 INFINITY
X3 0.000000 1.000000
X4 400.000000 0.000000 X4 8.000000 6.000000 INFINITY
29
For any LP, the graph of the optimal objective function
value as a function of a rhs will be a piecewise linear
function. The slope of each straight line segment is just
the constraint’s shadow price.
For < constraints in a maximization LP, the slope of each
segment must be nonnegative and the slopes of
successive line segments will be nonincreasing.
For a > constraint, in a maximization problem, the graph
of the optimal function will again be piecewise linear
function. The slope of each line segment will be
nonpositive and the slopes of successive segments will
be nonincreasing
30
A graph of the optimal objective function value
as a function of a variable’s objective function
coefficient can be created.
When the slope of the line is portrayed
graphically, the graph is a piecewise linear
function.
The slope of each line segment is equal to the
value of xi in the optimal solution.
31
In a maximization LP, 440 500
Optimal z-Value vs c1
z c1
optimal z-value as a
function of an objective 100
32
Discussion
Session
33
I Thank You
34