Upload
ashoka-vanjare
View
231
Download
0
Embed Size (px)
Citation preview
8/10/2019 04.1 Chapter4_Duality.pdf
1/35
Duality in Linear Programming
based on:Bradley, Hax, and Magnanti; Applied
Mathematical Programming, Addison-Wesley,1977Chapter 4, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6 and 4.7
(FEUP | DEGI) Operations Research March 26, 2014 1 / 35
http://find/http://goback/8/10/2019 04.1 Chapter4_Duality.pdf
2/35
Duality in Linear Programming
In the preceding chapter on sensitivity analysis, we saw that the shadow-price interpretation of theoptimal simplex multipliers is a very useful concept.First, these shadow prices give us directly the marginal worth of an additional unit of any of theresources.Second, when an activity is priced out using these shadow prices, the opportunity cost ofallocating resources to that activity relative to other activities is determined.Duality in linear programming is essentially a unifying theory that develops the relationshipsbetween a given linear program and another related linear program stated in terms of variableswith this shadow-price interpretation.The importance of duality is twofold:First, fully understanding the shadow-price interpretation of the optimal simplex multipliers canprove very useful in understanding the implications of a particular linear-programming model.Second, it is often possible to solve the related linear program with the shadow prices as the
variables in place of, or in conjunction with, the original linear program, thereby taking advantageof some computational efficiencies.
(FEUP | DEGI) Operations Research March 26, 2014 2 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
3/35
Duality in Linear Programming
Learning Objectives
Write the dual problem of a linear programming problem.
Understand the:
weak duality property,optimality property,unboundedness property,strong duality property.
Verify that the complementary slackness conditions hold for a given problem.
Apply the dual simplex method.
Apply the parametric primal-dual algorithm.
(FEUP | DEGI) Operations Research March 26, 2014 3 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
4/35
A Preview of Duality
(FEUP | DEGI) Operations Research March 26, 2014 4 / 35
http://find/http://goback/8/10/2019 04.1 Chapter4_Duality.pdf
5/35
Production Planning at BA
The factory of Barbosa & Almeida (BA) in Avintes produces glass containers through mouldinjection.BA recently won two new clients and intends to assign this production to one of its furnaces. Theorders were of bottles of Sandeman Ruby Port (75cl), one liter bottles of olive oil Oliveira da Serra
and one liter bottles of Favaios Moscatel. The customers buy all the bottles that BA can produce.Due to differences in the production (number of cavities and different cycle times), each batch ofportwine bottles takes 50 hours to produce, whereas each batch of oil bottles requires only 30hours and a batch of favaios takes 50 hours to produce. There are a total of 2000 hours availableat the oven.Moreover we must also consider the capacity available in the decoration sector (e.g. labels,packaging), which is 200 hours. The portwine bottles spend 3 hours per batch, the olive oil
bottles 5 hours per batch and the favaios bottles also 5 hours per batch.Barbosa & Almeida wants to maximize the profit from these two orders, knowing that the profitper batch is 50e 60e and 20e, respectively.
(FEUP | DEGI) Operations Research March 26, 2014 5 / 35
http://find/http://goback/8/10/2019 04.1 Chapter4_Duality.pdf
6/35
Production Planning at BA
Decision variables
xVP Number of batches of Vinho do Porto Ruby Sandeman bottles to produce;
xA Number of batches of Azeite Oliveira da Serra bottles to produce;
xF Number of batches of Favaios bottles to produce.
Objective:
max Z= 50xVP+ 60xA+ 20xF
Subject to:
50xVP +30xA +50xF 2000 (time in the oven)
3xVP +5xA +5xF 200 (capacity in the decoration sector)
xVP, xA, xF 0
In this model xVP, xA and xFmay not be integer.
(FEUP | DEGI) Operations Research March 26, 2014 6 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
7/35
8/10/2019 04.1 Chapter4_Duality.pdf
8/35
Economic properties of the shadow prices associated withthe resources
Shadowx1 . . . xn s1 . . . sm price
s1 a11 . . . a1n 1 . . . 0 b1 y1...
.
.
....
.
.
....
.
.
....
sm am1 . . . amn 0 . . . 1 bm ymZ c1 . . . cn 0 . . . 0 0
At the final tableau:Z c
1 . . . c
n c
n+1 . . . c
n+m z
0Reduced costs in terms of shadow prices:
cj =cjm
i=1aijyi (j= 1 . . . n)
aij is the amount of resource iused per unit of activity j, and yi is the imputed value of thatresource.
The termmi=1aijyi is the total value of the resources used per unit of activity jand is thus themarginal resource cost per unit of activity j.If we think of the objective coefficients cjas being marginal revenues, the reduced costs
cj =cjm
i=1aijyi (j= 1 . . . n)
are simply net marginal revenues (i.e., marginal revenue minus marginal cost).
(FEUP | DEGI) Operations Research March 26, 2014 8 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
9/35
Production Planning at BAReduced cost (net marginal revenue) for each type of
bottle (decision variable)xVP xA xF sO sD
sO 50 30 50 1 0 2000sD 3 5 5 0 1 200Z 50 60 20 0 0 0At the final tableau:
xVP xA xF sO sD
xVP 1 0 5
81
32 316 25
xA 0 1 5
8 3160
516 25
Z 0 0 48 34 716 9
38 2750
For the basic variables the reduced costs are zero.The marginal revenue is equal to the marginal cost for theseactivities.
For all nonbasic variables the reduced costs are negative.The marginal revenue is less than the marginal cost for theseactivities, so they should not be pursued.
Shadow price for the oven capacity: yO = 716 .
Shadow price for the decoration capacity: yD = 93
8 .Net marginal revenue for the production of portwine bottles:
cVP = cVPm
i=1aiVPyi = 50 (50 716 + 3 9
38 ) = 0
Net marginal revenue for the production of azeite bottles:
cA = cA m
i=1aiAyi = 60 (30 716
+ 5 9 38
) = 0
Net marginal revenue for the production of favaios bottles:
cF
= cFmi=1aiFyi = 20 (50 716 + 5 9 38 ) = 48 34
(FEUP | DEGI) Operations Research March 26, 2014 9 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
10/35
8/10/2019 04.1 Chapter4_Duality.pdf
11/35
Production Planning at BACan shadow prices be determined directly?
For a maximization decision problem, the shadow prices must satisfy the requirement thatmarginal revenue be less than or equal to marginal cost for all activities.
The shadow prices must be nonnegative since they are associated with less-than-or-equal-toconstraints in a maximization decision problem.
Imagine that BA does not own its productive capacity but has to rent it. In this case theshadow prices could be seen as rent rates.
Objective:
max Z = 50xVP+ 60xA+ 20xF
Subject to:
50xVP+ 30xA+ 50xF 2000
3xVP+ 5xA+ 5xF 200
xVP, xA, xF 0
Objective:
min V= 2000yO+ 200yD
Subject to:
50yO+ 3yD 50
30yO+ 5yD 60
50yO+ 5yD 20
yO, yD 0
(FEUP | DEGI) Operations Research March 26, 2014 11 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
12/35
Production Planning at BAPrimal and Dual Decision Problems
PRIMAL Decision Problem:
Objective:
max Z = 50xVP+ 60xA+ 20xF
Subject to:
50xVP+ 30xA+ 50xF 2000
3xVP+ 5xA+ 5xF 200
xVP, xA, xF 0
Optimal solution:xVP = 25
xA = 25xF = 0Z= 2750with shadow prices:yO=
716
yD= 938
DUAL Decision Problem:
Objective:
min V= 2000yO+ 200yD
Subject to:
50yO+ 3yD 5030yO+ 5yD 60
50yO+ 5yD 20
yO, yD 0
Optimal solution:
yO= 716yD = 9
38
V= 2750with shadow prices:xVP= 25xA = 25x
F = 0
(FEUP | DEGI) Operations Research March 26, 2014 12 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
13/35
Production Planning at BARequirements of the optimality conditions of the Simplex
Method
The reduced costs of the basicvariables are zero.
If a decision variable of the primal is positive, then thecorresponding constraint in the dual must hold with
equality.
IfxVP 0 then cVP = 50(50yO+ 3yD) = 0If
xA 0 then cA = 60(30
yO+ 5
yD) = 0
The variables with negativereduced costs are nonbasicvariables (zero valued)
If a constraint holds as a strict inequality, then the
corresponding decision variable must be zero.
IfcF = 20(50yO+ 5yD) < 0 thenxF = 0
If a shadow price is positive,then the correspondingconstraint must hold withequality.
IfyO>0 then 50xVP+ 30xA + 50xF = 2000IfyD>0 then 3xVP+ 5xA + 5xF= 200
(FEUP | DEGI) Operations Research March 26, 2014 13 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
14/35
Complementary Slackness Conditions
If a primal variable ispositive,then its corresponding(complementary) dualconstraint holds withequality.
If a dual constraint holdswith strict inequality,then its corresponding(complementary) primalvariable must be zero.
(FEUP | DEGI) Operations Research March 26, 2014 14 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
15/35
Finding the dual in general
Definition of the dual problem
(FEUP | DEGI) Operations Research March 26, 2014 15 / 35
PRIMAL
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
16/35
PRIMAL is a maximization problem
PRIMAL
Objective:
max Z =n
j=1
cjxj
Subject to:
nj=1
aijxj bi (i = 1,2, . . . , m
)
nj=1
aijxj bi (i = m
,2, . . . , m
)
nj=1
aijxj = bi (i = m
,2, . . . , m)
xj 0 (j = 1,2, . . . , n)
DUAL
Objective:
min V =
mi=1
biyi +m
i=m+1
biy
i +m
i=m+1
biy
i
Subject to:
mi=1
aijyi +m
i=m+1
aijy
i +m
i=m+1
aijy
i cj (j = 1,2, . . . , n)
yi 0 (i = 1, . . . , m)
y
i 0 (i = m + 1 , . . . , m)
y
i R (i = m
+ 1 , . . . , m)
(FEUP | DEGI) Operations Research March 26, 2014 16 / 35
PRIMAL
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
17/35
PRIMAL is a minimization problem
PRIMAL
Objective:
min Z =n
j=1
cjxj
Subject to:
nj=1
aijxj bi (i = 1,2, . . . , m)
nj=1
aijxj bi (i = m
,2, . . . , m
)
nj=1
aijxj = bi (i = m
,2, . . . , m)
xj 0 (j = 1,2, . . . , n)
DUAL
Objective:
max V =
mi=1
biyi +m
i=m+1
biy
i +m
i=m+1
biy
i
Subject to:
mi=1
aijyi +m
i=m+1
aijy
i +m
i=m+1
aijy
i cj (j = 1,2, . . . , n)
yi 0 (i = 1, . . . , m)
y
i 0 (i = m + 1 , . . . , m)
y
i R (i = m
+ 1 , . . . , m)
(FEUP | DEGI) Operations Research March 26, 2014 17 / 35
S a o co s o c s PRIMAL a
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
18/35
Summary of the correspondences between PRIMAL andDUAL decision problems
Primal (Maximize) Dual (Minimize)ith constraint ith variable 0ith constraint ith variable 0
ith constraint = ith variable unrestrictedjth variable 0 jth constraint jth variable 0 jth constraint jth variable unrestricted jth constraint =
(FEUP | DEGI) Operations Research March 26, 2014 18 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
19/35
Weak duality property
8/10/2019 04.1 Chapter4_Duality.pdf
20/35
Weak duality property
PRIMAL
Objective:
max Z =n
j=1cjxj
Subject to:n
j=1
aijxj bi (i= 1, 2, . . . ,m)
xj 0 (j= 1, 2, . . . , n)
DUAL
Objective:min V =
mi=1biyi
Subject to:m
i=1
aijyi cj (j= 1, 2, . . . ,n)
yi 0 (i= 1, . . . ,m)
nj=1cjxj
mi=1biyi
Ifxj, j= 1, 2, . . . , n is a feasible solution tothe primal problemandyi, i= 1, 2, . . . ,m is a feasible solutionto the dual problem.
DUAL feasible V decreasing
PRIMAL feasible Z increasing
(FEUP | DEGI) Operations Research March 26, 2014 20 / 35
Optimality property
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
21/35
Optimality property
PRIMAL
Objective:
max Z =n
j=1cjxj
Subject to:n
j=1
aijxj bi (i= 1, 2, . . . ,m)
xj 0 (j= 1, 2, . . . , n)
DUAL
Objective:
min V =m
i=1biyi
Subject to:m
i=1
aijyi cj (j= 1, 2, . . . ,n)
yi 0 (i= 1, . . . ,m)
Ifxj, j = 1, 2, . . . , n is a feasible solution to the primal problemand
yi, i = 1, 2, . . . , m is a feasible solution to the dual problem
andn
j=1cjxj = m
i=1biyithenxj, j= 1, 2, . . . , n is an optimal solution for the primal problemandyi, i= 1, 2, . . . ,m is an optimal solution for the dual problem
(FEUP | DEGI) Operations Research March 26, 2014 21 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
22/35
Strong Duality Property
8/10/2019 04.1 Chapter4_Duality.pdf
23/35
Strong Duality Property
If the PRIMAL problem has afinite optimal solution,then so does the DUALproblemand these two values areequal
If the DUAL problem has afinite optimal solution,then so does the PRIMALproblemand these two values areequal
(FEUP | DEGI) Operations Research March 26, 2014 23 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
24/35
The complementary slackness
(FEUP | DEGI) Operations Research March 26, 2014 24 / 35
Complementary Slackness Property
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
25/35
Complementary Slackness Property
In an optimal solution of a linear program:
For the PRIMAL linear programposed as a maximization problem with
less-than-or-equal-to constraints, thismeans:
If the value of the dual variable(shadow price) associated with aconstraint is nonzero, then that
constraint must be satisfied withequality.
If
yi>0, then
nj=1aij
xj =bi
If a constraint is satisfied withstrict inequality, then its
corresponding dual variable must bezero.
If
n
j=1aijxj
8/10/2019 04.1 Chapter4_Duality.pdf
26/35
Complementary Slackness Property
In an optimal solution of a linear program:
For the DUAL linear program posed asa minimization problem with greater-
than-or-equal-to constraints, thismeans:
If the value of the dual variable(shadow price) associated with aconstraint is nonzero, then that
constraint must be satisfied withequality.
If
xj>0, then
mi=1aij
yi =cj
If a constraint is satisfied withstrict inequality, then its
corresponding dual variable must bezero.
If
mi=1aij
yi
8/10/2019 04.1 Chapter4_Duality.pdf
27/35
Ifxj,j = 1, 2, . . . , n is a feasible solution to thePRIMAL problemand
yi, i = 1, 2, . . . , m, is a feasible solution to the
DUAL problem,then they are optimal solutions to these problems if,and only if, the complementary-slackness conditionshold for both the primal and the dual problems.
(FEUP | DEGI) Operations Research March 26, 2014 27 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
28/35
The dual Simplex Algorithm
(FEUP | DEGI) Operations Research March 26, 2014 28 / 35
The DUAL Simplex Algorithm
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
29/35
Solving the primal problem, moving throughsolutions (simplex tableaux) that are dual feasiblebut primal unfeasible.a
aDifferent from solving the DUAL problem with the (PRIMAL) simplex method
PRIMAL feasible: bi 0
DUAL feasible: ci 0
An optimal solution is a solution that is both primaland dual feasible.
(FEUP | DEGI) Operations Research March 26, 2014 29 / 35
DUAL Simplex Algorithm
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
30/35
Initialization: problem in canonical form with all cj 0.
Optimality test :ifbi 0 for all i= 1, 2, . . . ,m, then stop optimal solution found;else:
Iterate :
Choose the variable to leave the basis by1:
br= mini
bi|bi
8/10/2019 04.1 Chapter4_Duality.pdf
31/35
x1 x2 x3 x4
x3 1 1 1 0 1 x4 2 -3 0 1 2
Z 3 1 0 0 0
x1 x2 x3 x4
x3 1
3 0 1 1
3 1
3
x2 2
3 1 0 13
23
Z 73 0 0 13
23
x1 x2 x3 x4
x4 1 0 3 1 1x2 1 1 1 0 1Z 2 0 1 0 1
x4 leaves the basis because:minibi|bi< 0 = min {1,2} = 2
x2 enters the basis because:
minj
cjarj|arj
8/10/2019 04.1 Chapter4_Duality.pdf
32/35
Parametric PRIMAL-DUAL Algorithm an example I
8/10/2019 04.1 Chapter4_Duality.pdf
33/35
Objective:
max Z = 2x1+ 3x2
Subject to:
x1+ x2 6
x1+ 2x2 1
2x1 3x2 1
x1, x2 0
x1 x2 x3 x4 x5x3 1 1 1 0 0 6x4 1 2 0 1 0
12
x5 1 3 0 0 1 1Z 2 3 0 0 0 0
x1 x2 x3 x4 x5x3 1 1 1 0 0 6x4 1 2 0 1 0
12
+x5 1 3 0 0 1 1 +
Z 2 3 0 0 0 0
This example can easily be put in canonicalform by addition of slack variables.
However, neither primal feasibility nor primaloptimality conditions will be satisfied.
We will arbitrarily consider the example as a
function of the parameter .If we choose large enough, i.e. 3,this system of equations satisfies the primalfeasibility and primal optimality conditions.
(FEUP | DEGI) Operations Research March 26, 2014 33 / 35
http://find/8/10/2019 04.1 Chapter4_Duality.pdf
34/35
Parametric PRIMAL-DUAL Algorithm an example III
8/10/2019 04.1 Chapter4_Duality.pdf
35/35
After the pivot, the new canonical form is represented in the next tableau.
x1 x2 x3 x4 x5x3 0 0 1 4 3 1 + 7x2 0 1 0 1 1
32 2
x1 1 0 0 3 2 7
2 5Z 0 0 0 3 1 (3 )( 14 +
12 ) + (
12 +
12 )(
72 5)
As we continue to decrease to zero, the optimality conditions remain satisfied. Thus the optimal final tableaufor this example is given by setting equal to zero.
x1 x2 x3 x4 x5x3 0 0 1 4 3 1x2 0 1 0 1 1
32
x1 1 0 0 3 2 7
2
Z 0 0 0 3 1 52
(FEUP | DEGI) Operations Research March 26, 2014 35 / 35
http://find/