5-LP Simplex (CJ-ZJ Tableau)
5-LP Simplex (CJ-ZJ Tableau)
5-LP Simplex (CJ-ZJ Tableau)
Learning Outcomes Solving LP problems using an alternative form of simplex tableau (with Cj-Zj row) Recall the modified Wyndor Glass Co. problem in which Plant 3 operates at full capacity. We used the following steps to set up the initial simplex tableau.
Max
Max
Z = 3X1 + 5X2 +0S1 + 0S2 MA1 s.t. X1 + S1 = 4 2X2 + S2 = 12 3X1 + 2X2 +A1 = 18 X1, X2, S1, S2, A1 0
Eliminate variable A1 from the objective function to get the canonical form
+ S1
+ MA1 = 0 = 4 + S2 = 12 + A1 = 18
Multiply both sides of equation (4) by M we get 3MX1 + 2MX2 + MA1 = 18M
Then, subtract the new equation from (1) as follows: Z3X1 3MX1 + 5X2 + MA1 = 0 2MX2 + MA1 = 18M = -18M (1)
Z +(3M+3)X1 (2M+5)X2
-18M 4 12 18
X1
+ S1
= 4 + S2 = 12 + A1 = 18 = -18M
Iteration 1
Basic Var. S1 S2 S3 Z
Z 0 0 0 1
X1 1 0 3 -3M-3
X2 0 2 2 -2M-5
S1 1 0 0 0
S2 0 1 0 0
A1 0 0 1 0
RHS 4 12 18 -18M
Basic Var.
Z 0 0 0 1 Z 0 0 0 1
X1 1 0 0 0 X1 1 0 0 0
X2 0 2 2 -2M-5 X2 0 0 1 0
S2 0 1 0 0 S2 0 1 0 0
A1 0 0 1 0 A1 0 -1 1/2 M+5/2
Iteration 2
X1 S2 S3 Z Basic Var.
Iteration 3
X1 S2 X2 Z
Iteration 4
Basic Var. X1 S1 X2 Z
Z 0 0 0 1
X1 1 0 0 0
X2 0 0 1 0
S1 0 1 0 0
RHS 2 2 6 36
All z-row coefficients 0. Hence, the optimal solution is reached. Optimal solution: X1= 2, X2 = 6, S1 = 2, S2 =0, S3 =0, A1 =0 Optimal value=36
An Alternate Simplex Procedure (Cj-Zj Form) The procedure (in the pink box) done to eliminate variable to get the canonical form in order to set up the initial simplex tableau is rather lengthy. There is an alternate form of simplex tableau which can reduce this step. The simplex procedure is shown in the following flow chart.
Optimal
Interpret
Stop
Not Optimal Determine the Entering Variable *Choose the variable from the pivot column (column with the MOST POSITIVE Cj-Zj row value)
Choose variable from the pivot row (row with the smallest positive RHSto- pivot column ratio)
*Testing for Optimality (Maximization problems): All Cj-Zj row values 0 Optimal
*Testing for Optimality (Minimization problems): All Cj-Zj row values 0 Optimal
*Note: The differences in this method occur in the following steps (shown in blue boxes): Selecting the entering variable. Testing for optimality.
How to Use the Cj-Zj Form? To demonstrate the new method, we solve the original Wyndor Glass again. Maximize subject to: Z = 3X1 + 5X2 +0S1 + 0S2 + 0S3 2X2 3X1 + 2X2 X1 + S1 + S2 = 4 = 12 +S3 = 18 0 (Plant 1, hours) (Plant 2, hours) (Plant 3, hours)
where X1 = number of batches of doors produced per week X2 = number of batches of windows produced per week S1= unused hours in Plant 1 S2= unused hours in Plant 2 S3= unused hours in Plant 3
RHS 4 12 18
= the contribution rate (unit profit) = the gross profit given up by adding 1 unit of a variable into the current solution. Cj-Zj = the net profit
How to obtain Zj and Cj-Zj row values? Take the sum of the product of each entry under column Cj and the corresponding entry under each column. Cj 0 0 0 Basic S1 S2 S3 Zj Cj-Zj X1 X2 5 0 2 2 S1 0 1 0 0 S2 0 0 1 0 S3 0 0 0 1
3 1 0 3 0 3-0=3
RHS 4 12 18
(Column Cj) x (Column X1) 0(1) = 0 0(0) = 0 0(3) = 0 Sum = 0 Cj-Zj = 3 0 = 3 The complete initial tableau is shown below.
Cj 0 0 0
RHS 4 12 18 0
From the above tableau, we pivot on column X2, the column with the largest positive Cj-Zj value as follows: Iteration 1 Basic S1 S2 S3 Zj Cj-Zj X1 3 1 0 3 0 3 X2 5 0 2 2 0 5 S1 0 1 0 0 0 0 S2 0 0 1 0 0 0 S3 0 0 0 1 0 0
Cj 0 0 0
RHS 4 12 18 0
Cj 0 5 0
RHS 4 6 6 30
Iteration 3 Basic S1 X2 X1 Zj Cj-Zj X1 3 0 0 1 3 0 X2 5 0 1 0 5 0 S1 0 1 0 0 0 0 S2 0 1/3 0.5 -1/3 1.5 -1.5 S3 0 -1/3 0 1/3 1 -1
Cj 0 5 3
RHS 2 6 2 36
The Big-M Method Example: Wyndor Glass Co. Suppose Plant 3 is required to operate at full capacity. The third constraint 3X1 +2X2 18 is rewritten as 3X1 2X2 =18.
Max
Max
Z = 3X1 + 5X2 +0S1 + 0S2 MA1 s.t. X1 + S1 = 4 2X2 + S2 = 12 3X1 + 2X2 +A1 = 18 X1, X2, S1, S2, A1 0
Iteration 2 Cj 3 0 -M Basic X1 S2 A1 Zj Cj-Zj X1 3 1 0 0 3 0 X2 5 0 2 2 -2M 2M+5 S1 0 1 0 -3 3+3M -(3M+3) S2 0 0 1 0 0 0 A1 -M 0 0 1 -M 0 RHS 4 12 6 12-6M ratio --6 3
Iteration 3 Cj 3 0 5 Basic X1 S1 X2 Zj Cj-Zj X1 3 1 0 0 3 0 X2 5 0 0 1 5 0 S1 0 1 3 -3/2 -9/2 9/2 S2 0 0 1 0 0 0 A1 -M 0 -1 1/2 5/2 -M-5/2 RHS 4 6 3 27 ratio 4 2 ---
Iteration 4 Cj 3 0 5 Basic X1 S1 X2 Zj Cj-Zj X1 3 1 0 0 3 0 X2 5 0 0 1 5 0 S1 0 0 1 0 0 0 S2 0 -1/3 1/3 1/2 0 -3/2 A1 -M 1/3 -1/3 0 1 -M-1 RHS 2 2 6 36