Date post: | 09-Feb-2016 |
Category: |
Documents |
Upload: | sajal-agarwal |
View: | 222 times |
Download: | 0 times |
Dual Simplex Algorithm and Post Optimal Analysis
Group 1-C
Siddharth Aggarwal (2012ABPS435H)Ashish Garg (2012ABPS551H)
Abhishek Goyal (2012A4PS142H)Yash Pratap Singh (2011B2A4632H)
What is a dual problem• This is derived from the concept of solving the linear
programming problems starting with an infeasible solution.• This is a problem defined directly from its primal
counterpart.• The conversion from one of the problems to other is such
that the optimal solution of one is also an optimal for the other.
Conversion of a primal problem into its dual• Add all the slack and surplus variables where ever required in the
primal equations.• If any unconstrained variable is there in any of the original constraint
equations replace it by (+x&-x) there it self before we proceed to calculating its dual.• Graphically, the dual has a point corresponding to each edge of a
primal graph.
Dual primal graphs
primal Problem dual problem
Constraint VariableObjective function Right sides
i i
Relationships between Primal and Dual Problems
Minimization Maximization
Variables
Variables
Constraints
Constraints
0
0
0
0
Unrestricted
Unrestricted
Minimize 4x1 + 2x2 − x3=0 subject to x1 + x2 + 2x3 ≥ 3 2x1 − 2x2 + 4x3 ≤ 5 x1, x2, x3 ≥ 0. In standard form: Minimize 4x1 + 2x2 − x3 + 0s1 + MR + 0s2=0 subject to x1 + x2 + 2x3 − s1 + R = 3 2x1 − 2x2 + 4x3 + s2 = 5 x1, x2, x3, s1, R, s2 ≥ 0
Example
Minimize 4x1 + 2x2 − x3 + 0s1 + MR + 0s2=0 subject to x1 + x2 + 2x3 − s1 + R = 3….y1 2x1 − 2x2 + 4x3 + s2 = 5…..y2 x1, x2, x3, s1, R, s2 ≥ 0
Maximize 3y1 + 5y2=0 subject to y1 + 2y2 ≤ 4 y1 − 2y2 ≤ 2 2y1 + 4y2 ≤ −1 dual form of problem −y1 ≤ 0, i.e. y1 ≥ 0 y2 ≤ 0
Dual Simplex Algorithm• Dual simplex, unlike primal simplex, starts with an infeasible solution
and these solutions are better than the optimal feasible solution.• The feasibility is restored in final step and thus the solution is
obtained.• Thus, we move towards feasibility and optimality.• Why Dual Simplex?When there is in the constraint equations, artificial variables are required. More variables, more iterations, more chances of error.
When can Dual Simplex be applied?• If the objective function is like
• If the objective function is like
• Easy way to remember:Take all terms to one side. Use “Maximization”. If the coefficients of all terms is positive, we can apply dual simplex.
Dual Simplex Procedure1. Ensure that the objective function is maximization. If not, make it
“Maximization”.2. Convert all inequalities to ‘’.3. Add slack variables in the constraint equations to convert them into
equalities.4. Form the matrix. It should be an optimal matrix.5. If there is an ‘’ constraint, replace it by two inequalities.e.g.:
In the usual Simplex method, leaving variable is determined first, then entering variable.In Dual Simplex, entering variable is determined first, then leaving variable.• Leaving variable:Most value on the RHS. It is the pivot row.
• Entering variable:, where is the pivot row element.
Minimize subject to
Objective function for Dual Simplex:Maximize Constraint equations made compatible for Dual Simplex:
The starting solution is infeasible if at least one of the right-hand sides of the inequalities is .
x1 x2 x3 s1 s2 s3 RHS
s1 -3 -1 -1 1 0 0 -3
s2 3 -3 -1 0 1 0 -6
s3 1 1 1 0 0 1 3
z 3 2 1 0 0 0 0
2/3 1
x1 x2 x3 s1 s2 s3 RHS
s1 -4 0 -2/3 1 -1/3 0 -1
x2 -1 1 1/3 0 -1/3 0 2
s3 2 0 2/3 0 1/3 1 1
z 5 2 1/3 0 2/3 0 -4
5/4=1.25 (1/3)/(2/3)=0.5
x1 x2 x3 s1 s2 s3 RHS
x3 6 0 1 -3/2 1/2 0 3/2
x2 -3 1 0 -1/2 -1/2 0 3/2
s3 -2 0 0 1 0 1 0
z 3 0 0 1/2 1/2 0 -9/2
Feasible and optimalAll positive
Post Optimal AnalysisMaking changes in the parameters of the model and finding the new optimal solution.
• Changes affecting feasibility1) The right hand side of the constraints are changed.2) A new constraint is added to the model.
• Changes affecting optimality1) Changes in the original objective coefficients2) Addition of a new economic activity (variable) to the model
Changes affecting feasibilityMaximize z = 3x1+ 2x2 + 5x3
Subjected to x1 + 2x2 + x3 ≤ 430 3x1 + 2x3 ≤ 460 x1 + 4x2 ≤ 420 x1, , x2 , x3 ≥ 0
Basic x1 x2 x3 s1 s2 s3 RHSs1 1 2 1 1 0 0 430s2 3 0 2 0 1 0 460s3 1 4 0 0 0 1 420z -3 -2 -5 0 0 0 0
s1 -1/2 2 0 1 -1/2 0 200x3 1.5 0 1 0 0.5 0 230s3 1 4 0 0 0 1 420z 9/2 -2 0 0 5/2 0 1150
x2 -1/4 1 0 1/2 -1/4 0 100x3 3/2 0 1 0 1/2 0 230s3 2 0 0 -2 1 1 20
z 4 0 0 1 2 0 1350 optimal
The right hand side of the constraints are changed[New right-hand side of tableau in iteration i]
= [Inverse in iteration i] X [New right hand side of constraints]
600
640
590
14032030
Example 1 Solution is feasible
1/2 -1/4 0
0 1/2 0
-2 1 1
The associated optimum value is 1880.
450460400
110
230
-40
Example 2:
Solution is not feasible
1/2 -1/4 0
0 1/2 0
-2 1 1
Basic x1 x2 x3 s1 s2 s3 RHS
x2 -1/4 1 0 1/2 -1/4 0 100
x3 3/2 0 1 0 1/2 0 230
s3 2 0 0 -2 1 1 -40
z 4 0 0 1 2 0 1370
The slack capacity of operation 3 (s3=20) is shifted to the capacity of operation 1
Basic x1 x2 x3 s1 s2 s3 RHS
x2 -1/4 1 0 1/2 -1/4 0 100
x3 3/2 0 1 0 1/2 0 230
s3 2 0 0 -2 1 1 20
z 4 0 0 1 2 0 1350
The optimum solution remains the same as in the original model. This means that the proposed shift in capacity allocation is not advantageous because it simply shifts surplus capacity from op3 to op1.
A new constraint is added to the modelSituation 1Example 3x1+ x2+ x3 ≤ 500 redundant
Situation 2Example 3x1+ 3x2+ x3 ≤ 500
x1 x2 x3 s1 s2 s3 s4 RHS
X2 -1/4 1 0 1/2 -1/4 0 0 100
X3 3/2 0 1 0 1/2 0 0 230
S3 2 0 0 -2 1 1 0 20
s4 3 3 1 0 0 0 1 500 coefficients of basic variables to zero
z 4 0 0 1 2 0 0 1350
A new constraint is added to the model
x1 x2 x3 s1 s2 s3 s4 RHS
x2 -1/4 1 0 1/2 -1/4 0 0 100
x3 3/2 0 1 0 1/2 0 0 230
s3 2 0 0 -2 1 1 0 20
s4 9/4 0 0 -3/2 1/4 0 1 -30
z 4 0 0 1 2 0 0 1350
x1 x2 x3 s1 s2 s3 s4 RHS
x2 1/3 1 0 0 -1/6 0 0 90
x3 3/2 0 1 0 1/2 0 0 230
s3 -1 0 0 0 2/3 1 -4/3 60
s1 -3/2 0 0 1 -1/6 0 -2/3 20
z 11/2 0 0 0 13/6 0 2/3 1330 optimal
Changes Affecting Optimality:Changes in the original objective coefficients
• Example 1: New pricing policy : $2, $3, $4 respectively for train, truck and car toys, respectively.
Maximize z = 2x1+ 3x2 + 4x3
(New objective coefficients of basic x2, x3 and s3) = (3, 4, 0)
1. Compute dual values using(Optimal dual values) = (Row vector of objective coefficients of optimal basic variables) x (optimal primal
inverse)
New Dual variables:
(y1, y2, y3) = (3,4,0) = (3/2, 5/4, 0)
2. Substitute the new dual values in (z equation coefficient of variable x) = (Left-hand side of dual constraint) – (Right-hand side of dual constraint)to determine the new reduced costs (z-row coefficients)
Minimize z = 2x1+ 3x2 + 4x3 Subjected to y1 + 3y2 + y3 ≥ 2
2y1 + 2y3 ≥ 3 y1 + 4y2 ≥ 4 y1, , y2 , y3 ≥ 0
Reduced cost of x1 = y1 +3y2 + y3 -2 = 3/2 + 3(5/4) + 0 -2 = 13/4Reduced cost of s1 = y1 - 0 = 3/2Reduced cost of s2 = y2 - 0 = 5/4new revenue generated is $1220
Changes in the original objective coefficients
• Example 2: Maximize z = 6x1+ 3x2 + 4x3
(y1, y2, y3) = (3,4,0) = (3/2, 5/4, 0)
Reduced cost of x1 = y1 +3y2 + y3 -6 = 3/2 + 3*5/4 + 0 -6 = -3/4Reduced cost of s1 = y1 - 0 = 3/2Reduced cost of s2 = y2 - 0 = 5/4
1/2 -1/4 0
0 1/2 0
-2 1 1
Basic x1 x2 x3 s1 s2 s3 RHS
x2 -1/4 1 0 1/2 -1/4 0 100
x3 3/2 0 1 0 1/2 0 230
s3 2 0 0 -2 1 1 20
z -3/4 0 0 3/2 5/4 0 1220
Basic x1 x2 x3 s1 s2 s3 RHS
x2 -1/4 1 0 1/2 -1/4 0 100
x3 3/2 0 1 0 1/2 0 230
s3 2 0 0 -2 1 1 20
z -3/4 0 0 3/2 5/4 0 1220
Basic x1 x2 x3 s1 s2 s3 RHS
x2 0 1 0 1/4 -1/8 1/8 102.5
x3 0 0 1 3/2 -1/4 -3/4 215
x1 1 0 0 -1 1/2 1/2 10
z 0 0 0 3/4 13/8 3/8 1227.5
Addition of a new economic activity (variable) to the model• Given that (y1, y2, y3)=(1,2,0)• Toy- remote control car (x4): $4, assembly times (1, 1, 2) on (op1, op2,
op3)• Reduced cost of x4= y1 +y2 + 2y3 – 4 = -1
• x4 – constraint column=
112
1/41/21
=
1/2 -1/4 0
0 1/2 0
-2 1 1
Basic x1 x2 x3 x4 s1 s2 s3 RHS
x2 -1/4 1 0 1/4 1/2 -1/4 0 100
x3 3/2 0 1 1/2 0 1/2 0 230
s3 2 0 0 1 -2 1 1 20
z 4 0 0 -1 1 2 0 1350
Addition of new activity – example continued
Basic x1 x2 x3 x4 s1 s2 s3 RHS
x2 -3/4 1 0 0 1 -1/2 -1/4 95
x3 1/2 0 1 0 1 0 -1/2 220
x4 2 0 0 1 -2 1 1 20
z 6 0 0 0 -1 3 1 1370
Basic x1 x2 x3 x4 s1 s2 s3 RHS
s1 -3/4 1 0 0 1 -1/2 -1/4 95
x3 5/4 -1 1 0 0 1/2 -1/4 125
x4 7/2 2 0 1 0 0 1/2 210
z 21/4 1 0 0 0 5/2 3/4 1465
The new solution is z=$1465, which improves the original revenues by $115. Therefore, introduction of new product is advantageous.
1. When do we use Dual Simplex algorithm?
2. How does Dual Simplex method proceed?a) Better than optimal and Infeasible to optimal and feasibleb) Feasible and non-optimal to optimal and feasible
3. Difference between Sensitivity and Post-optimal analysis.
4. When does feasibility change?a) Changes in the objective function coefficientsb) Changes in the right hand sidec) Addition of new activityd) All of the above
5. If new constraint is added, what will change?a) Feasibilityb) Optimalityc) No changed) Both
Thank You!