Вы находитесь на странице: 1из 72

Sensitivity Analysis and Duality

Intan Dewi Fortuna (2225160044)


Monica Sayuri (2225160058)
Iir Amelia (2225160060)
Graphical Analysis of the Effect of a Change in a
Right-Hand Side on the LP’s Optimal Solution

A graphical analysis can also be used to determine


whether a change in the right-hand side of a
constraint will make the current basis no longer
optimal. Let 𝑏1 be the number of available
finishing hours.
A Graphical Introduction to Sensitivity Analysis
Importance of Sensitivity Analysis
Sensitivity analysis is important for several reasons. In many
applications, the values of an LP’s parameters may change. For
example, the prices at which soldiers and trains are sold may
change, as may the availability of carpentry and finishing hours.
If a parameter changes, sensitivity analysis often makes it
unnecessary to solve the problem again. For example, if the
profit contribution of a soldier increased to $3.50, we would not
have to solve the Giapetto problem again because the current
solution remains optimal. Of course, solving the Giapetto
problem again would not be much work, but solving an LP with
thousands of variables and constraints again would be a chore. A
knowledge of sensitivity analysis often enables the analyst to
determine from the original solution how changes in an LP’s
parameters change the optimal solution.
Some Important Formulas
In this section, we use our knowledge of matrices to show
how an LP’s optimal tableau can be expressed in terms of
the LP’s parameters. The formulas developed in this section
are used in our study of sensitivity analysis, duality, and
advanced LP topics.
Assume that we are solving a max problem that has been
prepared for solution by the Big M method and that at this
point, the LP has m constraints and n variables. Although
some of these variables may be slack, excess, or artificial,
we choose to label them 𝑥1 , 𝑥2 , . . . , 𝑥𝑛 .
Then the LP may be written as
Using our knowledge of matrix algebra, we
can express the optimal tableau in terms of BV and
the original LP (1). Recall that 𝑐1 , 𝑐2 , . . . , 𝑐𝑛 are the
objective function coefficients for the variables 𝑥1 ,
𝑥2 , . . . , 𝑥𝑛 (some of these may be slack, excess, or
artificial variables).
Definition
Expressing the Constraints in Any Tableau
in Terms of 𝐵 −1 and the Original LP
Simplifying Formula (10) for Slack, Excess,
and Artificial Variables
Sensitivity Analysis
Ans in Section 6.2, we let BV be the set of basic variables in the
optimal tableau. Given a change (or changes) in an LP, we want
to determine whether BV remains optimal. The mechanics of
sensitivity analysis hinge on the following important observation.
From Chapter 4, we know that a simplex tableau (for a max
problem) for a set of basic variables BV is optimal if and only if
each constraint has a nonnegative right-hand side and each
variable has a nonnegative coefficient in row 0. This follows,
because if each constraint has a nonnegative right-hand side,
then BV’s basic solution is feasible, and if each variable in row 0
has a nonnegative coefficient, then there can be no basic feasible
solution with a higher z-value than BV. Our observation implies
that whether a tableau is feasible and optimal depends only on
the right-hand sides of the constraints and on the coefficients of
each variable in row 0.
We can use the following procedure to determine if any
change in the LP will cause BV to be no longer optimal.
Changing the Objective Function Coefficient
of a Nonbasic Variable
The reduced cost for a nonbasic variable (in a max problem) is the
maximum amount by which the
Changing the Objective Function
Coefficient of a Basic Variable
Changing the Column of a Nonbasic Variable
Finding the Dual of an LP
• Associated with any LP is another LP, called the
dual.
• When taking the dual of a given LP, we refer to
the given LP as the primal.
• If the pri-mal is a max problem, then the dual
will be a min problem, and vice versa.
• For convenience, we define the variables for the
max problem to be z, x1, x2, . . . , xn and the
variables for the min problem to be w, y1, y2, . . .
, ym.
Finding the Dual of an LP
• We begin by explaining how to find the dual of a
max problem in which all variables are required
to be nonnegative and all constraints are con-
straints (called a normal max problem).
Max Z = c1x1 + c2x2 +… +cnxn
s.t
a11x1 + a12x2 + … + a1nxn ≤b1
a21x1 + a22x2 + … + a2nxn ≤b2
. . .
am1x1 + am2x2 + … + amnxn ≤b
xj ≥ 0 (j = 0,1,2, . . . , m)
Finding the Dual of an LP
The dual of a normal max problem such as (16) is
defined to be

Min w b1y1 b2y2 bmxm


s.t.
a11y1 + a21y2 + am1ym ≥ c1
a12y1 + a22y2 + am2ym ≥ c2
. . .
a1ny1 + a2ny2 + amnym ≥ cn
yi ≥ 0 (i = 0,1,2, . . . , m)
Finding the Dual of Normal Max or Min Problem
• If the primal is a normal max problem, then it can be
read across (Table 14); the dual is found by reading
down. Simi-larly, if the primal is a normal min problem,
we find it by reading down; the dual is found
Finding the Dual of a Nonnormal Max Problem
• Unfortunately, many LPs are not normal max or min
problems. For example,

Max Z = 2x1 + x2
s.t
x1 + x2 = 2
2x1 - x2 ≥3
x1 - x2 ≤ 1
x1, x2≥ 0

• is not a normal max problem because it has a constraint,


an equality constraint, and an unrestricted-in-sign
variable.
Finding the Dual of a Nonnormal Max
Problem
To place a max problem into normal form, we proceed as
follows:
• Step 1 Multiply each constraint by 1, converting it into a
constraint. For example, in (18), 2x1 x2 3 would be
transformed into 2x1 x2 3.
• Step 2 Replace each equality constraint by two inequality
constraints (a constraint and a constraint). Then convert
the constraint to a constraint. For example, in (18), we
would replace x1 x2 2 by the two inequalities x1 x2 2 and x1
x2 2. Then we would convert x1 x2 2 to x1 x2 2. The net
result is that x1 x2 2 is replaced by the two inequalities x1
x2 2 and x1 x2 2.
• Step 3 As in section 4.14, replace eaach urs variable xi by
xi = x’ – xi”, where xi’ ≥ 0 and xi” ≥ 0. in (18), We would
replace x2 by x2 = x2’ – x2”
Finding the Dual of a Nonnormal Max
Problem
Max Z = 2x1 + x’2 – x”2
s.t
x1 + x’2 – x”2 ≤ 2
-x1 - x’2 + x” ≤-2
-2x1 + x’2 – x”≤ -3
x1 - x’2 + x” ≤1
x1 + x’2 – x”≥ 0
Finding the Dual of a Nonnormal Max
Problem
• Step 1 Fill in Table 14 so that the primal can
be read across.
• Step 2 After making the following changes, the
dual can be read down in the usual fash-ion: (a)
If the ith primal constraint is a constraint, then
the corresponding dual variable yi must satisfy yi
0. (b) If the ith primal constraint is an equality
constraint, then the dual variable yi is now
unrestricted in sign. (c) If the ith primal variable
is urs, then the ith dual constraint will be an
equality constraint.
Finding the Dual of a Nonnormal Min
Problem
• Step 1 Write out the primal so it can be read
down in Table 14.
• Step 2 Except for the following changes, the dual
can be read across the table: (a) If the ith primal
constraint is a constraint, then the
corresponding dual variable xi must sat-isfy xi 0.
(b) If the ith primal constraint is an equality
constraint, then the correspond-ing dual
variable xi will be urs. (c) If the ith primal
variable yi is urs, then the ith dual constraint is
an equality constraint.
The Dual Theorem and Its Consequences
Weak Duality
• LEMMA 1
Let
𝑥1
𝑥2
.
X=
.
.
𝑥𝑛

be any feasible solution to the primal and y [y1 y2 ym] be


any feasible solution to the dual. Then (z-value for x) (w-
value for y).
The Dual Theorem and Its Consequences
LEMMA 2
Let x1
𝑥2
.
X=
.
.
𝑥𝑛
be a feasible solution to the primal and y [ y1 y2
ym] be a feasible solution to the dual.

If cx yb, then x is optimal for the primal and y is


optimal for the dual.
The Dual Theorem and Its Consequences
The Dual Theorem
• LEMMA 3
If the primal is unbounded, then the dual problem is
infeasible.

• LEMMA 4
If the dual is unbounded, then the primal is
infeasible.

• Theorema 1
Suppose BV is an optimal basis for the primal. Then
cBVB 1 is an optimal solution to the dual. Also, z w.
Shadow Prices
Definition :
• The shadow price of the ith constraint is the
amount by which the optimal z-value is
improved (increased in a max problem and
decreased in a min problem) if we increase bi by
1 (from bi to bi 1).†

• †This assumes that after the right-hand side of


Constraint i has been changed to bi 1, the current
basis re-mains optimal.
Duality and Sensitivity Analysis
Our proof of the Dual Theorem demonstrated the
following result: Assuming that a set of basic
variables BV is feasible, then BV is optimal (that
is, each variable in row 0 has a nonnegative
coefficient) if and only if the associated dual
solution (𝑐𝐵𝑉 𝐵−1 ) is dual feasible.
Example
We want to change the objective function
coefficient of a nonbasic variable. Let 𝑐2 be the
coefficient of 𝑥2 (tables) in the Dakota objective
function. In other words, 𝑐2 is the price at which a
table is sold. For what values of 𝑐2 will the current
basis remain optimal?
Solution
If 𝑦1 = 0, 𝑦2 = 10, 𝑦3 = 10 remains dual feasible, then the
current basis—and the values of all the variables—are
unchanged. Note that if the objective function coefficient
for 𝑥2 is changed, then the first and third dual constraints
remain unchanged, but the second (table) dual constraint
is changed to
6𝑦1 +2𝑦2 + 1.5𝑦3 ≥ 𝑐2
If 𝑦1 = 0, 𝑦2 = 10, 𝑦3 = 10 satisfies this inequality, then
dual feasibility (and therefore primal optimality) is
maintained. Thus, the current basis remains optimal if c2
satisfies 6(0) + 2(10) + 1.5(10) ≥ 𝑐2 , or 𝑐2 ≤ 35. This shows
that for 𝑐2 ≤ 35, the current basis remains optimal.
Conversely, if 𝑐2 >35, the current basis is no longer
optimal.
Complementary Slackness
• The Theorem of Complementary Slackness is an
important result that relates the optimal primal and
dual solutions. To state this theorem, we assume
that the primal is a normal max problem with
variables x1, x2, . . . , xn and m constraints. Let s1,
s2, . . . , sm be the slack variables for the primal.
Then the dual is a normal min problem with
variables y1, y2, . . . , ym and n constraints. Let e1,
e2, . . . , en be the excess variables for the dual. A
statement of the Theorem of Complementary
Slackness follows.
A statement of the Theorem of
Complementary Slackness follows
To illustrate the interpretation of the
Theorem of Complementary Slackness
Using Complementary Slackness to
Solve LPs
The Dual Simplex Method
Dual Simplex Method for a Max
Problem
Three uses of the dual simplex follow:
1. Finding the new optimal solution after a
constraint is added to an LP
2. Finding the new optimal solution after
changing a right-hand side of an LP
3. Solving a normal min problem
Finding the New Optimal Solution After
a Constraint Is Added to an LP
Finding the new optimal solution after
changing a right-hand side of an LP
Solving a normal min problem
To determine the entering variable,
we find the following ratios:
TERIMAKASIH

Вам также может понравиться