Simplex Method
Simplex Method
Method
Eng. Shimaa Abouelenein
Simplex Method
• A linear programming algorithm that can solve problems having more than 2
decision variables.
2
Simplex Method
3
Simplex Method (Standard Form)
• Solution:
4
Simplex Method (Initial Table)
• Solution:
S1 1 0 1 0 0 4
S2 0 2 0 1 0 12
S3 3 2 0 0 1 18
Leaving
variable
Pivot column
Pivot value Pivot row
5
Simplex Method (Initial Table)
Note that:
• Pivot column: smallest negative value in Z-row.
• Pivot row: divide the solution column values by the corresponding pivot
column values then determine the row which has the smallest value greater
than zero.
• By investigating the first row (Z-row) of the initial table, we find that there are
some negative values. Therefore, the current solution is not optimal.
6
Simplex Method (Iteration)
• Solution:
3. Iteration
▪ Determine the entering variable by selecting the most negative value in the Z-row,
therefore, the most negative is -5. Consequently, X2 is the entering variable.
▪ Determine the leaving variable by using the minimum ratio test as following:
• Solution:
3. Iteration
▪ Solving for new solutions by using the eliminatory row operation as following:
1. New pivot row = Old pivot row / Pivot value
Basic X1 X2 S1 S2 S3 Solution
Variables
Z
S1
X2 0 1 0 1/2 0 6
S3
• Solution:
3. Iteration
▪ For the other row apply this rule:
2. New row = Old row - (the coefficient of the row in the pivot column * (new pivot
row)).
For S1:
1 0 1 0 0 4
- (0) 0 1 0 ½ 0 6
________________________
1 0 1 0 0 4
9
Simplex Method (Iteration)
• Solution:
3. Iteration
▪ For the other row apply this rule:
2. New row = Old row - (the coefficient of the row in the pivot column * (new pivot
row)).
For S3:
3 2 0 0 1 18
- (2) 0 1 0 ½ 0 6
________________________
3 0 0 -1 1 6
10
Simplex Method (Iteration)
• Solution:
3. Iteration
▪ For the other row apply this rule:
2. New row = Old row - (the coefficient of the row in the pivot column * (new pivot
row)).
For Z:
-3 -5 0 0 0 0
- (-5) 0 1 0 ½ 0 6
________________________
-3 0 0 5/2 0 30
11
Simplex Method (Iteration)
• Solution:
The solution is not optimal, since there is a negative values in the first row.
Basic X1 X2 S1 S2 S3 Solution
Variables
Z -3 0 0 5/2 0 30
S1 1 0 1 0 0 4
X2 0 1 0 1/2 0 6
S3 3 0 0 -1 1 6
• Solution:
Apply the same rules, we will obtain this solution:
Basic X1 X2 S1 S2 S3 Solution
Variables
Z 0 0 0 3/2 1 36
S1 0 0 1 1/3 -1/3 2
X2 0 1 0 1/2 0 6
X1 1 0 0 -1/3 1/3 2
This solution is optimal; since there is no negative value in the first row.
Basic variables are X1 = 2, X2 = 6 and S1 = 2
Non-basic variables are S2 = S3 = 0
Z=36
13