Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Î Z* ≤ 5/3(55) = 275/3
Similarly
4x1 + x2 + 5x3 + 3x4 ≤ constraint 2 + constraint 3
= (5x1+ x2 + 3x3 + 8x4) + (–x1 + 2x2 + 3x3 – 5x4)
Î Z* < 55 + 3 = 58
9 That is
(1) Z* ≤ 0.b1 + 5/3.b2 + 0.b3
(2) Z* ≤ 0.b1 + 1. b2 + 1.b3
……………
∑ j =1 aij x j ≤ bi , for i = 1, 2, …, m
n
S.T. S.T. Ax ≤ b
xj ≥ 0, for j = 1, 2, …, n x ≥ 0
∑i =1 aij yi ≥ c j , for j = 1, 2, …, n
m
S.T. S.T. yA ≥ c
yi ≥ 0, for i = 1, 2, …, m y ≥ 0
Weak duality property
If x is a feasible primal solution, and y is a feasible dual solution, then cx ≤ yb
<Proof>
9 Corollary: If the primal is feasible and unbounded, the dual is infeasible and
vice versa.
Z + 3x2 + x4 + x6 = 13
x1 + 2x2 + 2x4 – x6 =2
–5x2 – 2x4+ x5 =1
–x2 + x3 – 3x4 + 2x6 =1
Æ y1 = , y2 = , y3 =
9 Recall that
Coefficient of:
Iteration Basic Variable Right Side
Z Original Variable Slack Variables
Z 1 cBB-1A – c cBB-1 cBB-1b
Any
xB 0 B-1A B-1 B-1b
9 Let y (dual variables) = cBB-1 (the shadow price). Obviously, Z (=cx) = yb.
9 The coefficients of original and slack variables in the objective row are yA–c
and y, respectively.
9 Note that yA–c represents the value of surplus variables in the dual.
9 If the optimality hasn’t yet reached, at least one coefficient in the objective
row is < 0. Thus, at lease one constraint of the dual is violated.
9 If one problem has no feasible solutions, then the other problem has either no
feasible solutions or an unbounded objective function.
Dual
Optimal Infeasible Unbounded
Optimal
Primal Infeasible
Unbounded
Example for primal infeasibleÆdual infeasible
Max 2x1 – x2 Min y1 – 2y2
S.T. x1 – x2 ≤ 1 S.T. y1 – y2 ≥ 2
–x1 + x2 ≤ –2 –y1 + y2 ≥ –1
x1, x2 ≥ 0 y1, y2 ≥ 0
Applications of dual problem
9 Dual problem can be solved directly by the simplex method.
¾ The number of functional constraints affects the computational effort of
the simplex method far more than the number of variables does.
∑ j =1 aij x j ≤ bi , for i = 1, 2, …, m
n
S.T.
xj ≥ 0, for j = 1, 2, …, n
∑ i =1 aij yi ≥ c j , for j = 1, 2, …, n
m
S.T.
yi ≥ 0, for i = 1, 2, …, m
9 If resource i is not used for production, we rent it out with unit rental of yi.
9 ∑
m
i =1
aij y i means the rental income if we reduce the production amount of
product j by one.
∑i =1 aij yi ≥ c j means the rental income be greater than the sales income.
m
9
9 The objective of dual is to minimize the rental income in order to obtain the
reasonable rental price.
Primal-Dual relationships
9 Dual is a LP problem and also has corner-point solutions.
9 By using the augmented form, we can express these corner-point solutions as
basic solutions.
9 Because the functional constraints have the ≥ form, this augmented form is
obtained by subtracting the surplus from the left-hand side of each constraint.
Complementary basic solutions property
9 Each basic solution in the primal problem has a complementary basic solution
in the dual problem, where their respective objective function values are equal.
9 Recall again:
Coefficient of:
Iteration Basic Variable Right Side
Z Original Variable Slack Variables
Any Z 1 cBB-1A – c cBB-1 cBB-1b
9 Given row 0 (objective row) of the simplex tableau for the primal basic
solution, the complementary dual basic solution can be easily found.
Primal Variable Associated Dual Variables
(Original variable) xj (Surplus Variable) ym+j (j = 1, 2, …, n)
(Slack Variable) xn+i (Original Variable) yi (i = 1, 2, …., m)
9 The m basic variables for the primal problem are required to have a coefficient
of zero in the objective row, which thereby requires the m associated dual
variables to be zero, i.e., nonbasic variables for the dual problem.
¾ Given x = (4, 6, 0, 0, -6), we know that x1, x2, and x5 are basic variables.
The coefficients of these variables in row 0 are zero. Thus, y4, y5, and y3
are nonbasic variables (=0).
y1 =3
2y2 =5
∑a
*
(2) ij x *j < bi implies yi = 0.
j =1
Summary
Primal (Dual) Dual (Primal)
Max Min
th
i constraint is “ ≤ ” (sensible) ith variable ≥ 0 (sensible)
ith variable ≥ 0 (sensible) ith constraint is “ ≥ ” (sensible)
ith constraint is “=” (odd) ith variable is unsigned (odd)
ith variable is unsigned (odd) ith constraint is “=” (odd)
ith constraint is “ ≥ ” (bizarre) ith variable ≤ 0 (bizarre)
ith variable ≤ 0 (bizarre) ith constraint is “ ≤ ” (bizarre)
9 For “ ≥ ” constraint in primal, we can convert “ ≥ ” to “ ≤ ” by multiplying both
sides by -1.
9 For negative variable x (< 0) in primal, we can use another variable, whose
value is (-1)*x, to replace x.
9 Ex: Max 5x1 + 4x2
S.T. x1 – x2 ≥ 5
3x1 + x2 ≥ 2
–x1 + 2x2 = 9
x1 ≥ 0, x2 ≤ 0
9 Add slack variables to the primal (currently, the basic solution is infeasible).
Z + 8x1 + 8x2 + 9x3 =0
x1 + x2 + x3 + x4 =1
–2x1 – 4x2 – x3 + x5 = –8
x1 – x2 – x3 + x6 = –2
9 In the dual problem, pick y3 to enter and pick y5 to leave.
9 The coefficients of the dual objective function correspond to the current value
of primal’s basic variable. The dual current values of basic variables
correspond to the coefficients of the primal objective function.
9 The dual entering column corresponds to the primal leaving row.
9 In dual: Find a nonbasic variable with a negative coefficient in row 0 (positive
coefficient in algebraic form) to enter.
ÍÎ
In Primal: Find a basic variable with a negative current value to leave.
9 In dual: Find the variable corresponding to the entering variable with a positive
coefficient and smallest ratio to leave.
ÍÎ
In Primal: Find the variable with a negative coefficient in the leaving row and
smallest ratio to enter.
9 For dual, pick y3 to enter and pick y5 to leave.
W – y1 – 0y2 + 2y5 = 16
–2y1 + 6y2 + y4 + y5 = 16
–y1 + 4y2 + y3 + y5 =8
0y1 – 3y2 – y5 + y6 = 1
9 For primal, pick x6 to leave, x2 to enter.
Z + 16x1 + x3 + 8x6 = –16
2x1 + 0x3 + x4 + x6 = –1
–6x1 + 3x3 + x5 – 4x6 = 0
–x1 + x2 + x3 – x6 =2
9 The prerequisite for using the dual simplex is the dual has initial feasible
solution. Thus, the primal coefficient of row 0 must be nonnegative.
What if both primal and dual do not have a feasible initial solution?
9 Big M or two-phase method.
Another example for dual simplex
Z + 4x2 + x4 + x5 = 12
x1 – 3x2 + 11x4 – x5 = –4
x2 + x3 – 3x4 + 2x5 = –8
Sensitivity Analysis
Max Z = cx
Ax = b
x ≥ 0
Recalled that we can rewrite it as the following
Max Z = cBxB + cNxN
S.T. BxB + NxN = b
xB, xN ≥ 0
Î Max Z + (cBB-1N - cN)xN = cBB-1b
xB = B-1b – B-1NxN
‧
If B-1 b ≥ 0 Î The basic won’t change, we are at optimality since
(cBB-1N - cN ≥ 0)
‧
Otherwise (B-1 b < 0) Î The new basic solution is infeasible. That is, the basic
change. Need to solve the problem by using dual simplex.
S.T. x1 + x3 = 4
2x2 +x4 = 12
3x1 + 2x2 +x5 = 18
⎡ 2⎤ ⎡ x3 ⎤
x = ⎢⎢6⎥⎥ , xB =
* ⎢ x ⎥ , x = ⎡ x4 ⎤
⎢ 2⎥ N ⎢x ⎥
⎢⎣2⎥⎦ ⎢⎣ x1 ⎥⎦ ⎣ 5⎦
⎡4⎤ ⎡4⎤
b changes from ⎢12⎥ to ⎢⎢15⎥⎥
⎢ ⎥
⎢⎣18⎥⎦ ⎢⎣18⎥⎦
⎡4⎤ ⎡4⎤
b changes from ⎢12⎥ to ⎢⎢24⎥⎥
⎢ ⎥
⎢⎣18⎥⎦ ⎢⎣18 ⎥⎦
Coefficient of:
Iteration Basic Variable Right Side
Z Original Variable Slack Variables
Z 1 cBB-1A – c cBB-1 cBB-1b
Any
xB 0 B-1A B-1 B-1b
Allowable range for RHS given that the basic won’t change
Max Z = 3x1 + 5x2
S.T. x1 +x3 = 4
2x2 +x4 = 12
3x1 + 2x2 +x5 = 18
⎡4⎤ ⎡ 4 ⎤
b changes from ⎢12⎥ to ⎢⎢12 + Δ ⎥⎥ .
⎢ ⎥ We need to guarantee B-1b ≥ 0
⎢⎣18⎥⎦ ⎢⎣ 18 ⎥⎦
⎡4⎤ ⎡4⎤
Change b from ⎢12⎥ to ⎢⎢15⎥⎥ .
⎢ ⎥
⎢⎣18⎥⎦ ⎢⎣15⎥⎦
Conclusion:
‧
c is changed to c
‧
Supposed c is changed to c
‧
Î Max c x
Ax = b
x ≥ 0
9 Notice that the optimal solution computed before is still .
9 In order to check the optimality, look at the objective row and be sure
.
9 That is, if the above inequality holds, we are still at optimality. Otherwise,
use (revised) simplex method starting with x* as initial feasible solution.
9 Ex: Max Z = 3x1 + 5x2
S.T. x1 + x3 = 4
2x2 + x4 = 12
3x1 + 2x2 + x5 = 18
At the final iteration, we have
If c changes from [3 5] to [4 5] .
How much can c change and still have the same optimal solution?
9 The coefficients of nonbasic variables are changed Æ Let cBB-1N - cN remains
≥ 0
Reduce cost
9 For any nonbasic decision variable xj, the associated coefficient in row 0 is
referred to as the reduced cost for xj.
9 It is the minimum amount by which the unit cost of activity j would have to be
reduced to make it worthwhile to undertake activity j (increase xj from zero).
9 Interpreting cj as the unit profit of activity j, the reduce cost for xj is the
maximum allowable increase in cj to keep the current BF solution optimal.
‧
A is changed to A
Max cx
‧
S.T. A x = b
x ≥ 0
9 Similar to the procedures when b is changed; but a bit more complex.
9 Change the coefficients of nonbasic variables.
¾ Current optimal basic solution is still feasible.
¾ Only need to check the optimality.
¾ An easy way: If the complementary dual basic solution y* still satisfies
the single dual constraint that has changed, then the original optimal
solution remains optimal.
¾ Or use our usual way of checking whether cBB-1N - cN ≥ 0.
9 Change the coefficients of basic variables
¾ Check the feasibility first.
¾ Optimality check.
Add xn+1ÎAdd a new variable (xn+1) to the objective function and each
constraint
9 Assume the value of this new variable be zero. That is, let the new solution
⎡ x *1 ⎤
⎢ ⎥
.
be ⎢ * ⎥ .
⎢x n ⎥
⎢ ⎥
⎢⎣ 0 ⎥⎦
9 This new solution is still feasible.
9 Check optimality
-1
¾ If cBB N - cN ≥ 0 Î done, this new solution is the optimal solution.
Max x1 + x2 + 2x5
S.T. 2x1 + x2 + x3 + 3x5 = 4
x1 + 2x2 + x4 – 3x5 = 4
x1 ~x5 ≥ 0
Keep x1, x2 as basic variables, x3, x4, and x5 as nonbasic variables.
⎡4 / 3⎤
⎢4 / 3⎥
⎢ ⎥ -1
x = ⎢ 0 ⎥ , check cBB N - cN
⎢ ⎥
⎢ 0 ⎥
⎢⎣ 0 ⎥⎦