0% found this document useful (0 votes)
65 views16 pages

Simplex Method: Calculating Zj Example

This document discusses using the simplex method to solve a linear programming problem involving maximization. It provides the initial simplex table for a problem with two decision variables and two constraints. It then shows the calculations to move from the initial table to the first iteration table, including identifying the leaving and entering variables. The ratio test is used to select the variable to leave the basis.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views16 pages

Simplex Method: Calculating Zj Example

This document discusses using the simplex method to solve a linear programming problem involving maximization. It provides the initial simplex table for a problem with two decision variables and two constraints. It then shows the calculations to move from the initial table to the first iteration table, including identifying the leaving and entering variables. The ratio test is used to select the variable to leave the basis.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd

LINEAR PROGRAMMING - SIMPLEX METHOD - MAXIMIZATION CASE

Case:

Solve:
Max.: Z = 12x1 + 16x2
S.t.: 10x1 + 20x2 ≤ 120
8x1 + 8x2 ≤ 80
x1 and x2 ≥ 0
Standard fo
CBi = coefficient of the basic

Solution:

Max.: Z = 12x1 + 16x2 + 0S1 + 0S2


S.t.: 10x1 + 20x2 + S1 = 120
8x1 + 8x2 + S2 = 80
x1, x2, S1 + S2 ≥ 0

TABLE 0 (Initial Simplex Table)


Cj = coefficient
of the objective Cj 12 16 0 0
function
CBi BV x1 x2 S1 S2 Solution
0 SI 10 20 1 0 120
0 S2 8 8 0 1 80
CBi = Zj 0 0 0 0 0
coefficient of Cj - Zj 12 16 0 0
the basic
variable

Formula to find the values for Zj: should be zero or negative number

Zj = ∑ row1(CBi) (aij) + row2(CBi) (aij)

(1) Zj = 0 10 + 0 8
(2) Zj = 0 20 + 0 8
(3) Zj = 0 1 + 0 0
(4) Zj = 0 0 + 0 1
(5) Zj = 0 120 + 0 80
OPTIMALITY CONDITION:

For MAX.: All Cj -Zj values should be ≤ 0

For MIN.: All Cj - Zi values should be ≥ 0

Reproduc-
tion of
Table 0 for
illustration
purposes
only.

TABLE 0 (Initial Simplex Table)

Cj 12 16 0 0
CBi BV x1 x2 S1 S2 Solution
0 SI 10 20 1 0 120
0 S2 8 8 0 1 80
Zj 0 0 0 0 0
Cj - Zj 12 16 0 0

OV KCV KRV KE OV
8 8 10 20 8 4
8 8 20 20 8 8
0 8 1 20 0 0.4
1 8 0 20 1 0
80 8 120 20 80 48
Standard form
Bi = coefficient of the basic variable
Slack variable
(SV is added to balance the constraint)

1
2
4 x2 is the ENTERING VAR

Reproduction of Table 0
for illustration purposes
5 only. TABLE 0 (Initial Simplex Table)

7 Cj 12
Ratio 10 6 CBi BV x1
11 8 0 SI 10
12 9 0 S2 8
19 13 S1 is the LEAVING VARIABLE Zj 0
20 Cj - Zj 12

zero or negative number Since all figures are neither zero nor negative, then there is no optim

= 0 14
= 0 15
= 0 16
= 0 17
= 0 18

TABLE 1 (Iteration 1)
Cj 12
CBi BV x1
16 x2 1/2
0 S2 4
Zj 8
Cj - Zj 4

To find the NEW values for x2, divide by the key element all other val
(1) 10 / 20 =
(2) 20 / 20 =
(3) 1 / 20 =
(4) 0 / 20 =
(5) 120 / 20 =
Ratio Ratio
(120 / 20) 6 To find the NEW values for S2, the formula is:
(80 / 8) 10
Corr. key column value * Corr. key row value
New Value = Old Value - --------------------------------------------------
Key element

NV
4 (1) 8 - (8 x 10) / 20 = 8- 4
0 (2) 8 - (8 x 20) / 20 = 8- 8
-0.4 (3) 0 - (8 x 1)/ 20 = 0- 2/5
1 (4) 1 - (8 x 0) /20 = 1- 0
32 (5) 80 - (8 x 120) /20 = 80 - 48

To find Zj, (CBi * x1) in row 1 + (CBi * x2)in row 2

(1) 16 1/2 + 0
(2) 16 1 + 0
(3) 16 1 / 20 + 0
(4) 16 0 + 0
20 is the KEY VALUE
x2 is the ENTERING VARIABLE (intersection of key
column & key row

24

16 0 0
KEY ROW indicated
x2 S1 S2 Solution Ratio
by the lowest
20 1 0 120 (120 / 20) 6 22 computed RATIO
8 0 1 80 (80 / 8) 10 23
0 0 0 0
16 0 0

21
tive, then there is no optimal solution yet. It is therefore necessary to proceed to iteration.

KEY COLUMN indicated by


the highest value in Cj-Zj
row

25
16 0 0 27
x2 S1 S2 Solution Ratio 26
1 1 / 20 0 6 28 30 36
0 -2/5 1 32 29 42 S2 s LEAVING VARIA
16 4/5 0 47
0 -4/ 5 0 48


e key element all other values
1/2 31
1 32
1 / 20 33
0 34
6 35 ②

ue * Corr. key row value


-------------------------------------------------------- ③

= 4 37
= 0 38
= -2/5 8/20 4/10 2/5 39
= 1 40
= 32 41

4 = 8 0 = 8 43
0 = 16 0 = 16 44
-2/5 = 4/5 0 = 4/5 45 16/20
1 = 0 0 = 0 46
KEY ROW indicated
by the lowest
computed RATIO

x1 is ENTERING VARIABLE
4 is the KEY VALUE
(intersection of key
column & key row

TABLE 1 (Iteration 1)
(intersection of key
column & key row

Cj 12 16 0 0
CBi BV x1 x2 S1 S2
16 x2 1/2 1 1 / 20 0
S2 s LEAVING VARIABLE 0 S2 4 - 1/ 10 -2 / 5 1
Zj 8 16 4/5 0
Cj - Zj 4 0 -4/ 5 0

49
KEY COLUMN

TABLE 1 (Iteration 1)

Cj 12 16 -2 / 5 1
CBi BV x1 x2 S1 S2
16 x2 1/2 1 1 / 20 0
0 S2 4 0 -2 / 5 1
Zj 8 16 4/5 0
Cj - Zj 4 0 -4/ 5 1

4/5
4 is the KEY VALUE
(intersection of key
column & key row
(intersection of key
column & key row

TABLE 2 (Iteration 2)

Solution Ratio Cj 12
6 12 50 CBi BV x1
32 8 51 KEY ROW 16 x2 #VALUE!
12 x1 1
Zj 12
Cj - Zj 0

Find the value of x1:

(1) 4 /
(2) 0 /
(3) -2 / 5 /
(4) 1 /
(5) 32 /

Find the value of x2:


Solution Ratio
6 12 OV KCV
32 8 (1) 1/2 1/2
(2) 1 1/2
(3) 1 / 20 1/2
(4) 0 1/2
(5) 6 1/2

Find the value of Zj:

(1) 16 #VALUE!
(2) 16 1
(3) 16 1 / 10
(4) 16 -1 / 8
(5) 16 2

16
1
52

16 0 0 54
x2 S1 S2 Solution 53
1 1 / 10 -1 / 8 2 55 68
0 - 1/ 10 1/4 8 56 62
16 2/5 1 74
128
0 -2/ 5 -1 75


4 = 1 57
4 = 0 58
4 = - 1/ 10 59
4 = 1/4 60
4 = 8 61

KRV KE OV NV
4 4 1/2 1/2 #VALUE! 63
0 4 1 0 1 64
-2 / 5 4 1 / 20 -4/40 1 / 10 65
1 4 0 1/8 -1 / 8 66
32 4 6 4/1 2 67

+ 12 1 = 0 12 = 12 69
+ 12 0 = 16 0 = 16 70
+ 12 - 1/ 10 = 8/5 -6/5 = 2/5 71
+ 12 1/4 = -2 3 = 1 72
+ 12 8 = 32 96 = 128 73
OPTIMALITY REACHED!!!

Values: x1 = 8 x 12 = 96
x2 = 2 x 16 = 32
128


Solve:
Max.: Z = 12x1 + 16x
S.t.: 10x1 + 20x2 ≤ 120
8x1 + 8x2 ≤ 80
x1 and x2 ≥ 0
8x1 + 8x2 ≤ 80
x1 and x2 ≥ 0

Decision Variables
Co-efficient of variables
SOLVER CHECK! Constraints:
Optimum Solution = 128
Solve:
Max.: Z = 12x1 + 16x2
S.t.: 10x1 + 20x2 ≤ 120
8x1 + 8x2 ≤ 80
x1 and x2 ≥ 0
8x1 + 8x2 ≤ 80
x1 and x2 ≥ 0

x1 x2
Decision Variables 8 2
Co-efficient of variables 12 16 128
Constraints:
#1 10 20 <= 120 120
#2 8 8 <= 80 80

Common questions

Powered by AI

The entering variable is chosen based on the highest positive Cj - Zj value in the maximization case, indicating potential for the most improvement in the objective function. The leaving variable is determined by the row with the smallest non-negative ratio of the current solution value to the corresponding coefficient of the entering variable, ensuring the feasibility of the solution remains intact. Proper selection affects convergence and correctness of the optimization process .

The key column in the simplex tableau is identified by the largest positive Cj - Zj value, indicating the variable with the highest potential to increase the objective function value. The key row is determined by computing the smallest non-negative ratio of the right-hand side solution to the key column coefficients, maintaining solution feasibility. They guide the pivot operation, shifting bases while progressing towards optimality .

The Zj row, representing the current value of the objective function as a combination of basic variables, helps assess optimality. In maximization problems, all entries in the Cj - Zj row should be less than or equal to zero for the solution to be optimal. This condition indicates no further increases to the objective value are possible by entering another variable into the basis. If this condition is not satisfied, additional iterations are needed .

Zj values are computed by summing the products of the coefficients of basic variables (CBi) and their corresponding elements in the tableau. The formula Zj = Σ(CBi * aij) is applied for each column, where aij represents the current column element. These values reflect the contribution of each variable to the objective function when it's expressed in terms of current basic variables .

The key element in the simplex method is crucial as it facilitates the pivot operation during iterations. It is the intersection of the column of the entering variable and the row of the leaving variable. The tableau is transformed by dividing all elements of the key row by the key element. Other rows are adjusted by subtracting the product of the key column value and the relevant multiplier from each row element. This process ensures that the entering variable replaces the leaving variable, thereby transforming the basic feasible solution .

Transition between simplex iterations occurs by replacing a non-basic variable with a basic variable, selected based on optimality and feasibility conditions (entering and leaving variables). Each pivot operation recalculates the tableau using the key element. Progress towards optimality is ensured by systematically reducing Cj - Zj values towards non-positivity in maximization problems, guided by the choice of pivot operations .

Slack variables are introduced in the simplex tableau to convert inequality constraints into equalities, allowing the problem to fit the simplex method framework. They begin as basic variables with zero coefficients in the objective function. As iterations progress, slack variables may exit the basis when replaced by decision variables. Their presence allows the initial feasible solution and provides flexibility in the tableau adjustments during iterations .

The initial simplex table for a linear programming maximization problem is set up by first defining the objective function and constraints. Each constraint is expressed with slack variables to convert inequalities into equalities. The initial table contains the coefficients of both decision variables and slack variables in the rows corresponding to each constraint. Zj values are calculated using the sum of the products of CBi and the corresponding aij values. The Cj - Zj row indicates the direction for selecting the entering variable according to the optimality condition .

Sensitivity analysis, applied after finding the optimal solution, examines how changes in objective function coefficients or constraint coefficients affect the optimal solution and objective value. It provides insights on the stability of the solution under potential variations in problem parameters, indicating which constraints or variables are most critical and identifying when re-optimization might be necessary. This is crucial for decision-making and understanding the robustness of solutions .

Optimality conditions in the simplex method ensure that no further improvement can be made to the objective function. For a solution to be optimal in maximization problems, all Cj - Zj values must be less than or equal to zero, indicating that there is no adjacent feasible solution with a higher objective value. Meeting these conditions stops iteration, signaling the best solution has been found .

You might also like