Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Chapter 4 Duality & sensitivity analysis.pdf
1. 4/28/2020 Duality and Sensitivity Analysis
Compiled by Tsegay Berhe [ MSc in production engineering & Management ]
MEKELLE UNVERISTY
2. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 1
Contents
4. Duality and Sensitivity Analysis .............................................................................................. 2
4.1. Primal-dual relationship;................................................................................................. 2
4.2. Rules for Constructing the Dual Problem........................................................................ 3
4.3. Economic interpretation of duality .................................................................................. 4
4.4. Simple way of solving dual problems [optimal Dual solution]........................................ 7
4.5. Post-optimal [Simplex method sensitivity Analysis]........................................................ 9
3. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 2
4. Duality and Sensitivity Analysis
The dual problem is defined systematically from the primal (or original) LP model. The two
problems are closely related, in the sense that the optimal solution of one problem automatically
provides the optimal solution to the other. As such, it may be advantageous computationally in
some cases to determine the primal solution by solving the dual.
The term 'Duality' implies that every linear programming problem, whether of maximization or
minimization, is associated with another linear programming problem based on the same data
which is called dual.
The primal problem is dealing with determining the number of units of the products, time etc.
While the dual problem deals with determining the unit worth (price) of the resource.
When taking the dual of a given LP, we refer to the given LP as the primal. If the primal 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.
To find the dual to a max problem in which all the variables are required to be nonnegative and
all the constraints are ≤ constraints (called normal max problem) the problem may be written
as:
4.1. Primal-dual relationship;
Primal Dual problem
( ) ∑ ( ) ∑
{
( )
( )
( )
( ) {
( )
( )
( )
( )
The following is a summary of how the dual is constructed from the (equation form) primal:
I. A dual variable is assigned to each primal (equation) constraint and a dual constraint is
assigned to each primal variable.
4. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 3
II. The right-hand sides of the primal constraints provide the coefficients of the dual
objective function.
Table 4.1
Rules for constructing the dual problem
Primal problem objective
Dual problem
objective Constraint type Variable sign
Maximization Minimization ≥ Unrestricted
Minimization Maximization ≤ Unrestricted
All primal constraints are equations with nonnegative right-hand sides, and all the
variables are nonnegative.
A convenient way to remember the constraint type (≤ or ≥) in the dual is that if the dual
objective is a “pointing-down” minimization, then all the constraints are “pointing-up”
(≥) inequalities. The opposite applies when the dual objective is maximization.
III. The dual constraint corresponding to a primal variable is constructed by transposing the
primal variable column into a row with;
a. the primal objective coefficient becoming the dual right-hand side and
b. the remaining constraint coefficients comprising the dual left-hand side
coefficients.
IV. The sense of optimization, direction of inequalities, and the signs of the variables in the
dual are governed by the rules in Table 4.1
4.2. Rules for Constructing the Dual Problem
Maximization Problem Minimization Problem
constraints Variables
≥ ≤
≤ ≥
= Unrestricted
Variables constraints
≥ ≥
≤ ≤
Unrestricted =
Primal Dual
Objective is minimization Objective is maximization & vice versa
≥ type constraints ≤ type constraints
Number of columns Number of rows
Number of rows Number of columns
Number of decision variables Number of constraints
Number of constraints Number of decision variables
Coefficient of objective function RHS value
5. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 4
RHS values Coefficient of objective function
Example
Finding the Dual of a Normal Max /Min
Primal Dual
1.
{ {
2.
{ {
+
{
{
4.
{
{
4.3. Economic interpretation of duality
Example: A Dakota work shop want to produce desk, table, and chair with the available resource of:
Timber, finishing hours and carpenter hours as revised in the table below. The selling price and
available resources are also revised in the table. Formulate this problem as Primal and Dual
Problem? [ Amare Matebu Kassa (Dr.-Ing)]
Resource Desk Table Chair Availability
Timber 8 board ft 6 board ft 1 board ft 48 boards fit
Finishing 4 hours 2 hours 1.5hours 20 hours
Carpentry 2hours 1.5hours 0.5 hours 8 hours
6. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 5
Selling price $60 $30 $20
7. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 6
Interpreting the Dual of the Dakota (Max) Problem;
The primal;
( )
( )
( )
The dual;
( )
( )
( )
The first dual constraint is associated with desks, the second with tables, and the third with
chairs. Decision variable y1 is associated with Timber, y2 with finishing hours, and y3 with
carpentry hours. Suppose an entrepreneur wants to purchase all of Dakota’s resources. The
entrepreneur must determine the price he or she is willing to pay for a unit of each of Dakota’s
resources.
To determine these prices, we define:
y1 = price paid for 1 boards ft of lumber
y2 = price paid for 1 finishing hour
y3 = price paid for 1 carpentry hour
The resource prices y1, y2, and y3 should be determined by solving the Dakota dual.
The total price that should be paid for these resources is 48 y1 + 20y2 + 8y3. Since the cost of
purchasing the resources is to minimized:
Min w = 48y1 + 20y2 + 8y3 is the objective function for Dakota dual.
In setting resource prices, the prices must be high enough to induce Dakota to sell.
For example, the entrepreneur must offer Dakota at least $60 for a combination of resources
that includes 8 board feet of timber, 4 finishing hours, and 2 carpentry hours because Dakota
could, if it wished, use the resources to produce a desk that could be sold for $60. Since the
entrepreneur is offering 8y1 + 4y2 + 2y3 for the resources used to produce a desk, he or she
must choose y1, y2, and y3 to satisfy: 8y1 + 4y2 + 2y3 ≥ 60. Similar reasoning shows that at
least $30 must be paid for the resources used to produce a table.
Thus y1, y2, and y3 must satisfy: 6y1 + 2y2 + 1.5y3 ≥ 30
Likewise, at least $20 must be paid for the combination of resources used to produce one chair.
Thus y1, y2, and y3 must satisfy: y1 + 1.5y2 + 0.5y3 ≥ 20. The solution to the Dakota dual yields
prices for timber, finishing hours, and carpentry hours.
8. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 7
4.4. Simple way of solving dual problems [optimal Dual solution]
The primal and dual solutions are closely related, in the sense that the optimal solution of either
problem directly yields the optimal solution to the other, as is explained subsequently. Thus, in
an LP model in which the number of variables is considerably smaller than the number of
constraints, computational savings may be realized by solving the dual because the amount of
computations associated with determining the inverse matrix primarily increases with the
number of constraints. Notice that the rule addresses only the amount of computations in each
iteration but says nothing about the total number of iterations needed to solve each problem.
This section provides two methods for determining the dual values.
Method 1.
. / ( )
Example 1
. / ( )
. /
Method 2
. / ( ) . /
Cj 2 2 5 4 0 0
C.B.V B.V X1 X2 X3 X4 S1 S2 solution
5 X3 0 1 1 2/5 2/5 - 1/10 1.5
2 X1 1 -1 0 1.4 - 3/5 2/5 4
Zj 2 3 5 24/5 4/5 3/10
Zj-Cj 0 1 0 4/5 4/5 3/10
Optimal table B
-1
10. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 9
. /
. /
Method 2;
. / ( ) . /
( ) ( ) ( )
( ) ( ) ( )
( ) ( )
Max z=Min W
222=100*1.5+72*1+0*80
222=222
4.5. Post-optimal [Simplex method sensitivity Analysis]
While solving a linear programming problem for optimal solution, we assume that:
a. Technology is fixed,
b. Fixed prices,
c. Fixed levels of resources or requirements,
d. The coefficients of variables in structural constraints (i.e. time required by a product
on a particular resource) are fixed,
e. profit contribution of the product will not vary during the planning period.
The condition in the real world however, might be different from those that are assumed by the
model. It is, therefore, desirable to determine how sensitive the optimal solution is to different
types of changes in the problem data and parameters.
Why we use sensitivity analysis?
(a) Sensitivity analysis allow us to determine how "sensitive" the optimal solution is to
changes in data values.
(b) Sensitivity analysis is important to the manager who must operate in a dynamic
environment with imprecise estimates of the coefficients.
(c) Sensitivity analysis is used to determine how the optimal solution is affected by changes,
within specified ranges, in:
i. the objective function coefficients (cj ), which include:
Coefficients of basic variables.
11. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 10
Coefficients of non-basic variables.
ii. the right-hand side (RHS) values (bi ), (i.e. resource or requirement levels).
iii. Change in the consumption rate (Technological coefficients)
The above changes may result in one of the following three cases
Case I. The optimal solution remains unchanged, that is the basic variables and
their values remain essentially unchanged.
Case II. The basic variables remain the same but their values are changed.
(d)
Case III. The basic solution changes completely.
( ) +
{
( )
( )
( )
( )
Sensitivity of the optimal solution to the changes in the available resources, (i.e. the right
hand side RHS of the constraints bij)
Sensitivity of the optimal solution to the changes in the unit profit or unit cost, (i.e. the
coefficient of the objective function Cij)
Change in the consumption rate (Technological coefficients)
The right hand side of the constraint denotes present level of availability of resources (or
requirement in minimization problems). When this is increased or decreased, it will have effect
on the objective function and it may also change the basic variable in the optimal solution.
Example 1
12. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 11
Optimal table
Cj 2 2 5 4 0 0
C.B.V B.V X1 X2 X3 X4 S1 S2 solution
5 X3 0 1 1 2/5 2/5 - 1/10 3/2
2 X1 1 -1 0 7/5 - 3/5 2/5 4
Zj 2 3 5 24/5 4/5 3/10
Zj-Cj 0 1 0 4/5 4/5 3/10
N.B. From this optimal table
{X1, X3} are Basic variables (B.V) because there are in the solution
{X2, X3} are Non Basic variables (N.B.V) because there are not in the solution
Solution X1 = 4; X2 = 0; X3 = 1.5; S1 = 0; S2 = 0; ) Z = 15.5
Man-hours are completely utilized hence S1 = 0.
Machine hours are completely utilized, hence S2 = 0
I. The shadow price of the man-hours resource is $4/5. Hence it means to say that as we
go on increasing one hour of man-hour resource, the objective function will go on
increasing by $4/5 per hour.
II. Similarly, the shadow price per unit of machine hour is $3/10. Similar reasoning can be
given, that is every unit increase in machine hour resource will increase the objective
function by $3/10.
If the management want to increase the capacity of both man-hours and machine-hours, which
one should receive priority?
The answer is man-hours, since it is shadow price is greater than the shadow price of
machine-hours.
If the management considers to increase man-hours by 10 hours i.e., from 10 hours to 20 hours
and machine hours by 20 hours i.e., 25 hours to 45 hours will the optimal solution remain
unchanged?
Use example 1 for more illustration
1. Change in the coefficient of objective function (Ci)
Case 1;Change in the coefficient of objective Non basic variable(N.B.V)
Δ Coeff of
Objective.
Function
Case 2;Change in the coefficient of objective basic variable(B.V)
Case 1; Change in the coefficient of objective Non basic variable (N.B.V)
a. Change in the coefficient of objective of X2 [C2]
13. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 12
2+Δ2
C2
2-Δ2
If the coefficient of X2 is changed then only Z2-C2 will change be changed and the other Zj-Cj
along the column are still constant. In addition, in order to do the sensitivity analysis, the
current optimal table should be optimal. So the optimal table is still optimal if Z2-C2 ≥0.
Case 1: Then if C2 =2+Δ2 [Maximum Increment]
then
, -
Case 2: Then if C2 =2-Δ2
, -
Then
Then the range of optimality for the coefficient of non-basic variable X2 which is C2.
b. Change in the coefficient of objective of X4 [C4]
4+Δ4
C4
4-Δ4
Case 1: Then if C2 =4+Δ4 [Maximum Increment]
14. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 13
then
, -
Case 2: Then if C4 =4-Δ4
, -
Then
Then the range of optimality for the coefficient of non-basic variable X4 which is C4;
Case 2; Change in the coefficient of objective basic variable (B.V)
From the above optimal table, the basic variables are X1, X3, because these variables are within
the solution with the value of 4,3/2 respectively.
a. Change in the coefficient of X1,
2+Δ1
C1
2-Δ1
N.B. if the coefficient of the basic variable is changed, then the whole Zj-Cj value will be also
changed. Though a new value of Zj-Cj should be determined using the current optimal table.
15. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 14
Case (a.1) when the coefficient of X1 which is C1 is changed to 2+Δ1
Then the new values of Zj-Cj respective to each variable along the column are;
( ) ( )
( )
( )
( )
( )
( )
The determine Zj-Cj
, - , -
, -
[ ]
16. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 15
[ ]
[ ]
Then the next step is selecting the value of Δ1
{ }
Then
Case (a.2) when the coefficient of X1 which is C1 is changed to 2-Δ1
Performing the same analysis as case (a.1) then;
, ( ( )-
[, ( )]
[, ( )]
17. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 16
[, ( )]
Then for determining the maximum decrement
* +
Therefor the range of optimality for C1 is;
2. Change in the RHS of constraints
Let the initial RHS is a column matrix represented by” b”
Let B is m by m matrix of optimal basic variable in the initial table (according their
order)
B-1
is the inverse matrix of B in which B* B-1
=I
In the optimal simplex table B-1
is the matrix of slack and surplus variables coefficients.
Then the simplex iteration has the following important formula.
, -( )
Cj 2 2 5 4 0 0
C.B.V B.V X1 X2 X3 X4 S1 S2 solution
5 X3 0 1 1 2/5 2/5 - 1/10 1.5
2 X1 1 -1 0 1.4 - 3/5 2/5 4
Zj 2 3 5 24/5 4/5 3/10
Zj-Cj 0 1 0 4/5 4/5 3/10
Optimal table B
-1
18. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 17
, -( ) ( ) , -
Case
Case 1;Change in the R.H.S of constraints 1
Change in
RHS
Case 2;Change in the R.H.S of constraints 2
A. Change in the R.H.S of constraints 1
Let the RHS constraint one be changed by Then ;
,then
( ) , -
( ) ( )
( ) ( )
{ }
19. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 18
( ) , -
( ) ( )
( ) ( )
{ }
N.B. then we can increase constraint 1 up to 50/3 and we can decrease up to 25/4
B. Change in the R.H.S of constraints 2
Let the RHS constraint one be changed by Then ;
21. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 20
( )
=10
* +
then range of feasibility for constraint two;
3. Change in the technological coeffiecnt [Consumption rate]
Let Xi is initial column matrix of variables
Xj is the optimal column matrix of variables
⃗⃗⃗⃗
0 1
0 1
0 1
[ ]
[ ]
Let coefficient of X1 in the first constraint changed by Δ1; Then
⃗⃗⃗⃗
22. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 21
⃗⃗⃗⃗⃗ ( ) 0 1
⃗⃗⃗⃗ ( ) 0 1 ( )
If ⃗⃗⃗⃗⃗ will changed then Zj-Cj will also change
Z1-C1 ≥ 0
( )
⃗⃗⃗⃗ ( ) 0 1
⃗⃗⃗⃗ ( ) 0 1 ( )
If ⃗⃗⃗⃗⃗ will changed then Zj-Cj will also change
23. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 22
Z1-C1 ≥ 0
( ) ( )
Let coefficient of X2 in the first constraint is changed by Δ2;
⃗⃗⃗⃗ ( ) 0 1 ( )
Z2-C2 ≥ 0
( ) ( )
⃗⃗⃗⃗ ( ) 0 1 ( )
Z2-C2 ≥ 0
( ) ( )
24. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 23
25. COMPILED BY TSEGAY BERHE [ MSC IN PRODUCTION ENGINEERING & MANAGEMENT ] 24
Exercise
Optimal table
Cj 12 3 1 0 0 0
C.B. V B. V X1 X2 X3 S1 S2 S3 SOLUTION
12 X1 1 0 - 1/16 3/16 - 1/8 0 73/8
3 X2 0 1 13/16 - 7/16 5/8 0 35/8
0 S3 0 0 -2 11/8 -9/4 1 177/4
Zj 12 3 27/16 15/16 3/8 0
Zj-Cj 0 0 18/16 15/16 3/8 0
i. Determine the dual values
ii. Determine the range of optimality of C1, C2 and C3 (change in the objective function
coefficient)
iii. Determine the range of feasibility b1 (change in the RHS constraints)
iv. Determine the range of optimality of the consumption rate (a11)