2A5 Linear Programming - Simplex Method - Maximization Case
2A5 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:
Formula to find the values for Zj: should be zero or negative number
(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:
Reproduc-
tion of
Table 0 for
illustration
purposes
only.
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
(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.
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 ②
= 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
(1) 4 /
(2) 0 /
(3) -2 / 5 /
(4) 1 /
(5) 32 /
(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