Professional Documents
Culture Documents
The Simplex Algorithm: Prof. Dr. M. Arslan ÖRNEK
The Simplex Algorithm: Prof. Dr. M. Arslan ÖRNEK
1
2
ISE203/IE251 3
ISE203/IE251 4
ISE203/IE251 5
ISE203/IE251 6
ISE203/IE251 7
ISE203/IE251 8
ISE203/IE251 9
ISE203/IE251 10
ISE203/IE251 11
ISE203/IE251 12
ISE203/IE251 13
ISE203/IE251 14
ISE203/IE251 15
ISE203/IE251 16
ISE203/IE251 17
ISE203/IE251 18
4.6 – The Simplex Algorithm (min LPs)
Method 1
19
4.6 – The Simplex Algorithm (min LPs)
Use –z as the basic variable in row 0.
Initial Tableau
Row -z x1 x2 s1 s2 rhs BVs
0 1 2 -3 0 0 0 -z=0
1 0 1 1 1 0 4 s1 =4
2 0 1 -1 0 1 6 s2 = 6
ero1 -z x1 x2 s1 s2 rhs
0 1 2 -3 0 0 0
1 0 1 1 1 0 4
2 0 2 0 1 1 10
ero 2 -z x1 x2 s1 s2 rhs BVs
0 1 5 0 3 0 12 - z = 12
1 0 1 1 1 0 4 x2 = 4
2 0 2 0 1 1 10 s2 = 10
20
4.6 – The Simplex Algorithm (min LPs)
In summary, multiply the objective function for the min problem by -1 and
solve the problem as a maximization problem with the objective function –z.
(optimal z-value for the min problem) = - (optimal z-value for the max
problem).
21
4.6 – The Simplex Algorithm (min LPs)
Method 2
A simple modification of the simplex algorithm can be used to
solve min problems directly.
22
4.7 – Alternative Optimal solutions
23
ISE203/IE251 24
25
4.8 – Unbounded LPs
26
ISE203/IE251 27
Example 3: Breadco Bakeries-An Unbounded LP
28
Solution:
29
30
31
4.11 Degeneracy and the Convergence of the
Simplex Algorithm
Theoretically, the simplex algorithm can fail to find an
optimal solution to an LP.
The following are facts (for Max LP):
– If (value of entering variable in new bfs) > 0, then (z-value for
new bfs) > (z-value for current bfs).
– If (value of entering variable in new bfs) = 0, then (z-value for
new bfs) = (z-value for current bfs).
Up to now, we have seen that in each of the LP’s BFS, all
basic variables are positive.
32
An LP with this property is a nondegenerate LP.
An LP is degenerate if it has at least one bfs in which
a basic variable is equal to zero.
Any bfs that has at least one basic variable equal to
zero is a degenerate bfs.
When the same bfs is encountered twice it is called
cycling (looping).
– If cycling occurs, then we will loop, or cycle, forever among
a set of basic feasible solutions and never get to an optimal
solution.
33
ISE203/IE251 34
4.12 The Big M Method
35
Example 4: Bevco (A Blending Problem)
36
Example 4: Bevco
Letting x1 = number of ounces of orange soda in a bottle of Oranj
x2 = number of ounces of orange juice in a bottle of Oranj
The LP is:
37
4.10 – The Big M Method
Row 0: z - 2x1 - 3x2 =0
What will be the BV in row 2? Row 3?
Row 1: 0.5x1 + 0.25x2 + s1 = 4
Row 2 would violate sign restrictions
Row 2: x1 + 3x2 - e2 = 20
Row 3 no readily apparent basic variable.
Row 3: x1 + x2 = 10
38
4.10 – The Big M Method
In the optimal solution, all artificial variables must be equal to zero. To
accomplish this, in a min LP, a term +Mai is added to the objective function for
each ai. For a max LP, the term –Mai is added to the objective function for each
ai. M represents some very large number.
The modified Bevco LP in standard form then becomes:
Modifying the objective function this way makes it extremely costly for an
artificial variable to be positive. The optimal solution should force a2 = a3 =0.
39
4.10 – The Big M Method
Description of the Big M Method:
40
4.10 – The Big M Method
Row z x1 x2 s1 e2 a2 a3 rhs
0 1.00 -2.00 -3.00 -M -M 0.00
1 0.50 0.25 1.00 4.00
2 1.00 3.00 -1.00 1.00 20.00
3 1.00 1.00 1.00 10.00
41
4.10 – The Big M Method
Pivot 1 z x1 x2 s1 e2 a2 a3 rhs ratio ero
0 1,00 2m - 2 4M -3 -M 30M Row 0 + M(Row 2) + M(Row 3)
42
4.10 – The Big M Method
Pivot 2 z x1 x2 s1 e2 a2 a3 rhs ratio
0 1.00 (2M-3)/3 (M-3)/3 (3-4M)/3 (60+10M)/3
1 0.42 1.00 0.08 -0.08 2.33 5.60
2 0.33 1 -0.33 0.33 6.67 20.00
3 0.67 0.33 -0.33 1.00 3.33 5.00
ero 1 z x1 x2 s1 e2 a2 a3 rhs ero
0 1.00 (2M-3)/3 (M-3)/3 (3-4M)/3 (60+10M)/3
1 0.42 1.00 0.08 -0.08 2.33
2 0.33 1 -0.33 0.33 6.67
3 1.00 0.50 -0.50 1.50 5.00 (Row 3)*(3/2)
ero 2 z x1 x2 s1 e2 a2 a3 rhs ero
0 1.00 -0.50 (1-2M)/2 (3-2M)/2 25.00 Row 0 + (3-2M)*(Row 3)/3
1 0.42 1.00 0.08 -0.08 2.33
2 0.33 1.00 -0.33 0.33 6.67
3 1.00 0.50 -0.50 1.50 5.00
ero 3 z x1 x2 s1 e2 a2 a3 rhs ero
0 1.00 -0.50 (1-2M)/2 (3-2M)/2 25.00
1 1.00 -0.13 0.13 -0.63 0.25 Row 1 - (5/12)*Row 3)
2 0.33 1.00 -0.33 0.33 6.67
3 1.00 0.50 -0.50 1.50 5.00
ero 4 z x1 x2 s1 e2 a2 a3 rhs ero
0 1.00 -0.50 (1-2M)/2 (3-2M)/2 25.00 Optimal Solution
1 1.00 -0.13 0.13 -0.63 0.25
2 1.00 -0.50 0.50 -0.50 5.00 Row 2 -(1/3)*Row 3
3 1.00 0.50 -0.50 1.50 5.00
43
Wyndor Problem - modified
ISE203/IE251 44
Nonzero
coefficient of x5 in
the objective
function row.
We should make
it zero.
ISE203/IE251 45
ISE203/IE251 46
ISE203/IE251 47
ISE203/IE251 48
ISE203/IE251 49
ISE203/IE251 50
ISE203/IE251 51
ISE203/IE251 52
ISE203/IE251 53
4.14 Unrestricted-in-Sign Variables
55
Example 8 (Using urs Variables):
56
Solution:
57
58
59