Escolar Documentos
Profissional Documentos
Cultura Documentos
Mjdah Al Shehri
Mute ur call
3 3
ST
2x1 + x2 + 3x3 3000 3x1 + 4x2 + 5x3 60x4 2400 [2] x4 32 X2 200 X1 + x2 + x3 800 X1 x2 x3 =0 Xj 0 for all J [1]
[3] [4] [5] [6]
4 4
ST
2x1 + x2 + 3x3 3000 3x1 + 4x2 + 5x3 60x4 2400 x4 32 X2 200 X1 + x2 + x3 800 X1 x2 x3 =0 Xj 0 for all J
We assign a very large negative objective function coefficient , -M , ( +M for minimization problem) to each artificial variable [1] [2] [3] [4] We add artificial : [5] R4, R5, R6, respectively [6] to the fourth, fifth, and sixth equations.
5 5
ST
2x1 + x2 + 3x3 + s1= 3000 3x1 + 4x2 + 5x3 60x4 + s2 = 2400 x4 + s3 = 32 X2 s4 + R4 = 200 X1 + x2 + x3 s5 + R5 = 800 X1 x2 x3 + R6= 0 Xj 0 , Sj 0, Rj 0 for all J
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall
Solving For the optimal solution of [Maximization] when there are artificial variables
Example # 1:
MAX 2x1+ 5x2
ST
X1 4 x1 + 4x2 32 3x1+ 2x2 = 24
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall 7 7
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.)
The Solution By adding the appropriate slack, surplus, and artificial variables, we obtain the following:
MAX 2x1 + 5x2 MR1 MR3
ST
X1 s1 + R1 =4 X1 + 4x2 + s2 = 32 3x1 + 2x2 + R3= 24 X1,x2,s1,s2,R1,R3 0
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall 8 8
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.)
The initial table :
Basis X1 X2 S1 S2 R1 R3 RHS
R1 S2
R3 Z
1 1
3 -2
0 4
2 -5
-1 0
0 0
0 1
0 0
1 0
0 +M
0 0
1 +M
4 32
24 0
R1, S2, R3 are basic variables.
Make z consistent; (R1, R3) in z-row coefficient (+M,+M) it must be zero; By apply:
MAX objective function MIN objective function
9 9
New z-row = old z-row + ( -M * R1 row M * R3 row) New z-row = old z-row + ( M * R1 row +M * R3 row)
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.)
Starting table:
Basis R1 S2 R3 Z X1 1 1 3 -2-4M X2 0 4 2 -5-2M S1 -1 0 0 +M S2 0 1 0 0 R1 1 0 0 -M R3 0 0 1 -M RHS 4 32 24 -28M
10 10
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.)
To determine Entering Variable; We should look to the largest negative number in z-row.
Entering Variable Basis X1 X2 S1 S2 R1 R3 RHS
R1
S2 R3 Z
1
1 3 -2-4M
0
4 2 -5-2M
-1
0 0 +M
0
1 0 0
1
0 0 -M
0
0 1 -M
4
32 24 -28M
11 11
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.)
Calculate the ratio; then, determine the smallest positive number as Leaving Variable Leaving Variable
Basis R1 S2 R3 Z X1 1 1 3 -2-4M X2 0 4 2 -5-2M S1 -1 0 0 +M S2 0 1 0 0 R1 1 0 0 -M R3 0 0 1 -M RHS 4 32 24 -28M Ratio 4 32 8
Pivot element = ( 1, 0, -1, 0, 1, 0, 4)/ (1) ( 1, 0, -1, 0, 1, 0, 4) Hamdy A. Taha, Operations Research: An introduction, Prentice Hall
12 12
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.)
First iteration
Entering Variable Basis X1 S2 R3 Z X1 1 0 0 0 X2 0 4 2 -5-2M S1 -1 1 3 -2-3M S2 0 1 0 0 R1 1 -1 -3 2+3M R3 0 0 1 -M RHS 4 28 12 8-12M Leaving Variable Ratio . 28 4
13 13
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.)
Second iteration
Entering Variable Basis X1 S2 S1 Z X1 1 0 0 0 X2 2/3 10/3 2/3 -11/3 S1 0 0 1 0 S2 0 1 0 0 R1 0 0 -1 0 R3 1/3 -1/3 1/3 2/3 RHS 8 24 4 +16 Leaving Variable Ratio 12 7.2 6
14 14
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.)
Third iteration
Basis X1 X1 1 X2 0 S1 -1 S2 0 R1 1 R3 0 RHS 4 Ratio
S2
X2
0
0
0
1
-5
3/2
1
0
5
-3/2
-2
1/2
4
6
11/3
-11/2
5/2
38
15 15
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.)
points X1=0, X2=0 X1=4, X2=0 Classification Not Feasible Not Feasible Reason R1, R3 both Positive (4, 24) R3 positive= 12
16 16
Solving For the optimal solution of [Minimization] when there are artificial variables
Example # 2:
Min 4x1 + x2
ST
3x1+ x2 = 3 4x1 + 3x2 6 X1+ 2x2 4 X1, x2 0
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall 17 17
Solving For the optimal solution of [Minimization] when there are artificial variables (cont.)
The Solution By adding the appropriate slack, surplus, and artificial variables, we obtain the following:
Min 4x1 + x2 + MR1 + MR2
ST
3x1+ x2 + R1= 3 4x1 + 3x2 s1 + R2 = 6 X1+ 2x2 + s2 = 4 X1, x2 , s1, s2, R1, R2 0
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall 18 18
Solving For the optimal solution of [Minimization] when there are artificial variables (cont.)
R1 R2
S2 Z
3 4
1 -4
1 3
2 -1
0 -1
0 0
1 0
0 -M
0 1
0 -M
0 0
1 0
3 6
4 0
Solving For the optimal solution of [Minimization] when there are artificial variables (cont.)
Entering Variable
Basis R1 R2 S2
Starting table:
X1 3 4 1 X2 1 3 2 S1 0 -1 0 R1 1 0 0 R2 0 1 0 S2 0 0 1
Leaving Variable
RHS 3 6 4
-4+7M
-1+4M
-M
9M
20 20
Solving For the optimal solution of [Minimization] when there are artificial variables (cont.)
(1+5M)/3
-M
(4-7M)/3
4+2M
21 21
Solving For the optimal solution of [Minimization] when there are artificial variables (cont.)
1/5
8/5 - M
-1/5 -M
18/5
22 22
Solving For the optimal solution of [Minimization] when there are artificial variables (cont.)
Third iteration
Basis X1 X2 s1 X1 1 0 0 X2 0 1 0 S1 0 0 1 R1 2/5 -1/5 1 R2 0 0 -1 S2 -1/5 3/5 1 RHS 2/5 9/5 1
7/5 M
-M
-1/5
17/5
ST
X1 + 4x2 8 X1 + 2x2 4 X1, x2 0
26 26
27 27
-3
-9
28 28
-3/4
2/4
18
29 29
Basis X2 X1
X1 0 1
X2 1 0
S1 -1
S2 -1/2 2
RHS 2 0
Same objective
3/2
3/2
18
Same objective no change and improve ( cycle) It is possible to have no improve and no termination for computation.
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall 30 30
31 31
ST
X1 + 2x2 5 X1 + x2 4 X1, x2 0
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall 32 32
ST
X1 + 2x2 + s1= 5 X1 + x2 + s2 = 4 X1, x2, s1, s2 0
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall 33 33
-2
-4
34 34
x2
s2 Z
1/2
1/2 0
1
0 0
1/2
-1/2 2
0
1 0
5/2
3/2 10
s2
Z
1/2
0
0
0
-1/2
2
1
0
3/2
10
The coefficient for x1 is 0, which indicates that x1 can enter the basic solution without changing the value of z.
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall 36 36
x2
x1 Z
0
1 0
1
0 0
1
-1 2
-1
2 0
1
3 10
38 38
All value if x2( nonbasic variable) either zero or negative. So, solution space is unbounded
Hamdy A. Taha, Operations Research: An introduction, Prentice Hall 41 41
42 42