Beruflich Dokumente
Kultur Dokumente
We employ a mathematical trick to jumpstart the problem by adding artificial variables to the equations.
22
Example: ST
Max 16x1+15x2+20x3-18x4 2x1 + x2 + 3x3 3000 [1] 3x1 + 4x2 + 5x3 60x4 2400 [2] x4 32 [3] X2 200 [4] X1 + x2 + x3 800 [5] X1 x2 x3 =0 [6] Xj 0 for all J
33
Example:
Max
ST
2x1 + x2 + 3x3 3000 [1] 3x1 + 4x2 + 5x3 60x4 2400 x4 32 [3] X2 200 [4] X1 + x2 + x3 800 [5] X1 x2 x3 =0 [6] Xj 0 for all J
[2]
We add artificial : R4, R5, R6, respectively to the fourth, fifth, and sixth equations.
44
The solution ST
Max 16x1+15x2+20x3-18x4
2x1 + x2 + 3x3 + s1= 3000 [1] 3x1 + 4x2 + 5x3 60x4 + s2 = 2400 [2] x4 + s3 = 32 [3] X2 s4 + R4 = 200 [4] X1 + x2 + x3 s5 + R5 = 800 [5] X1 x2 x3 + R6= 0 [6] Xj 0 , Sj 0, Rj 0 for all J
The simplex algorithm can then be used to solve this 55 problem
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
66
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
77
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.) The initial X2 S1: table Basis X1
R1 S2 R3 Z 1 1 3 -2 0 4 2 -5 -1 0 0 0
S2 0 1 0 0
R1 1 0 0 +M
R3 0 0 1 +M
RHS 4 32 24 0
R1, S2, R3 are basic variables.
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
99
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.
X2 0 4 2
S1 -1 0 0
S2 0 1 0 0
R1 1 0 0 -M
R3 0 0 1 -M
RHS 4 32 24 -28M
1010
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.)
Calculate the ratio; then, determine the Leaving smallest positive number as Leaving Variable Variable X2 S1 S2 R1 R3 RHS Ratio Basis X1
R1 S2 R3 Z 1 1 3 0 4 2 -1 0 0 0 1 0 0 1 0 0 -M 0 0 1 -M 4 32 24 -28M 4 32 8
-2-4M -5-2M +M
1111
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.) First iteration
Entering X1 VariableS1 X2
1 0 0 0 0 4 2 -1 1 3
Basis X1 S2 R3 Z
S2 0 1 0
R1 1 -1 -3
R3 0 0 1
-5-2M -2-3M 0
2+3M -M
1212
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.) Second iteration
Entering Variable X2 Basis X1
X1 S2 S1 Z 1 0 0 0 2/3 10/3 2/3 -11/3
S1 0 0 1 0
S2 0 1 0 0
R1 0 0 -1 0
1313
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.) Third iteration
Basis X1 S2 X2 Z X1 1 0 0 0 X2 0 0 1 0 S1 -1 -5 3/2 11/3 S2 0 1 0 0 R1 1 5 -3/2 -11/2 R3 0 -2 1/2 5/2 RHS 4 4 6 38 Ratio
1414
Solving For the optimal solution of [Maximization] when there are artificial variables (cont.)
points X1=0, X2=0 X1=4, X2=0 X1=8, X2=0 X1=4, X2=6 Classification Not Feasible Not Feasible Feasible but not optimal Feasible and optimal Reason R1, R3 both Positive (4, 24) R3 positive= 12 X2 is negative All x1,X2 0
1515
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
1616
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
1717
Solving For the optimal solution of [Minimization] when there are artificial variables (cont.) The initial table:
Basis X1 R1 R2 S2 3 4 1 X2 1 3 2 S1 0 -1 0 R1 1 0 0 R2 0 1 0 S2 0 0 1 RHS 3 6 4
1818
Solving For the optimal solution of [Minimization] when there are artificial variables (cont.) Starting table: Leaving
Variable
X1 3 4 1 -4+7M X2 1 3 2 -1+4M S1 0 -1 0 -M R1 1 0 0 0 R2 0 1 0 0 S2 0 0 1 0 RHS 3 6 4 9M Basis R1 R2 S2 Z
Entering Variable
1919
Solving For the optimal solution of [Minimization] when there are artificial variables (cont.) First iteration
Entering Variable
X1 1 0 0 0
Leaving Variable
X2 1/3 5/3 5/3 S1 0 -1 0 R1 1/3 -4/3 -1/3 R2 0 1 0 S2 0 0 1 0 RHS 1 2 3 4+2M
Basis X1 R2 S2 Z
(1+5M)/3 -M
(4-7M)/3 0
2020
Solving For the optimal solution of [Minimization] when there are artificial variables (cont.) Second iteration
X1 1 0 0 0
Basis X1 X2 S2 Z
Entering Variable X2
0 1 0 0
S2 0 0 1 0
2121
Solving For the optimal solution of [Minimization] when there are artificial variables (cont.) Third iteration
X1 1 0 0 0 X2 0 1 0 0 S1 0 0 1 0 R1 2/5 -1/5 1 7/5 M R2 0 0 -1 -M S2 -1/5 3/5 1 -1/5 RHS 2/5 9/5 1 17/5
Basis X1 X2 s1 Z
There are four special cases arise in the use of the simplex method.
1. 2. 3. 4.
2323
Degeneracy ( no improve in objective) It typically occurs in a simplex iteration when in the minimum ratio test more than one basic variable determine 0, hence two or more variables go to 0, whereas only one of them will be leaving the basis. This is in itself not a problem, but making simplex iterations from a degenerate 2424
ST
X1 + 4x2 8 X1 + 2x2 4 X1, x2 0
2525
2626
X2 4 2 -9
S1 1 0 0
S2 0 1 0
Leaving Variable
RHS 8 4 0
2727
X2 1 0 0
S2 0 1 0
2828
Basis X1 X2 X1 Z
X2 1 0 0
S1 -1 3/2
S2 -1/2 2 3/2
RHS 2 0 18
0 1 0
Same objective
Same objective no change and improve ( cycle) It is possible to have no improve and no 2929 termination for computation.
Alternative optima If the z-row value for one or more nonbasic variables is 0 in the optimal tubule, alternate optimal solution is exist.
3030
ST
X1 + 2x2 5 X1 + x2 4 X1, x2 0
3131
ST
X1 + 2x2 + s1= 5 X1 + x2 + s2 = 4 X1, x2, s1, s2 0
3232
X2 2 1 -4
S1 1 0 0
S2 0 1 0
3333
The coefficient for x1 is 0, which indicates that x1 can enter the basic solution without changing the value of z.
3535
Unbounded solution It occurs when nonbasic variables are zero or negative in all constraints coefficient (max) and variable coefficient in objective is negative
3737
All value if x2( nonbasic variable) either zero or negative. So, solution space is unbounded
4040
Infeasible solution R coefficient at end 0 This situation can never occur if all the constraints are of the type with nonnegative RHS
4141
Example: Minimize Z= 600X1+500X2 subject to constraints, 2X1+ X2 >or= 80 X1+2X2 >or= 60 and X1,X2 >or= 0
We do this by rewriting the constraint inequalities as equations by subtracting new surplus & artificial variables" and assigning them zero & +M coefficientsrespectively in the objective function as shown below. So the Objective Function would be: Z=600X1+500X2+0.S1+0.S2+MA1+MA2 subject to constraints, 2X1+ X2-S1+A1 = 80 X1+2X2-S2+A2 = 60 X1,X2,S1,S2,A1,A2 >or= 0
These artificial variables are included in the model just to solve the model. Therefore in the final solution, these artificial variables should not be available. This is achieved by including these variables in the objective function with a very high positive coefficient M, since the objective function is a minimization type. Even a small value of A1 or A2 increase the value of the objective function infinitely which is against the objective of minimization. so, the solution procedure should necessarily assign zero value to each of the artificial variables in the final solution , except for the problems which are having infeasible solution.
We do this by putting the decision variables X1=X2=S1=S2=0, so that A1= 80 and A2=60. These are the initial values of artificial variables.
It is clear from the tableau that X2 will enter and A2 will leave the basis. Hence 2 is the key element in pivotal column. Now,the new row operations are as follows: R2(New) = R2(Old)/2 R1(New) = R1(Old) - 1*R2(New)
It is clear from the tableau that X1 will enter and A1 will leave the basis. Hence 2 is the key element in pivotal column. Now,the new row operations are as follows: R1(New) = R1(Old)*2/3 R2(New) = R2(Old) (1/2)*R1(New)
Since all the values of (Cj-Zj) are either zero or positive and also both the artificial variables have been removed, an optimum solution has been arrived at with X1=100/3 , X2=40/3 and Z=80,000/3.