Week 10
Week 10
Week 10
Week 10
Arora 8.4-8.6
Calculation of Basic Solutions and
the Simplex Method
1
Tableau: Representation of all necessary
information related to an LP problem
Example 1:
𝑥1 + 𝑥2 + 𝑥3 = 10
2𝑥1 + 1.25𝑥2 + 𝑥4 = 14 Form: 𝑨𝒙 = 𝒃
5𝑥1 + 2𝑥2 + 𝑥5 = 30
Basic x1 x2 x3 x4 x5 RS:b
1. x3 1 1 1 0 0 10
2. x4 2 1.25 0 1 0 14
3. x5 5 2 0 0 1 30
2
Calculation of Basic Solutions using the Tableau
3
Example 2:
Maximize
𝑧 = 4𝑥1 + 5𝑥2
Subject to
−𝑥1 + 𝑥2 ≤4
𝑥1 + 𝑥2 ≤ 6
𝑥1 , 𝑥2 ≥ 0
4
Introduction to Optimum Design 3e. Copyright © 2012 Elsevier, Inc. All rights reserved.
Example 2:
Minimize
𝑓 = −4𝑥1 − 5𝑥2
Subject to
−𝑥1 + 𝑥2 + 𝑥3 =4
𝑥1 + 𝑥2 + 𝑥4 = 6
𝑥𝑖 ≥ 0, i = 1 to 4
Basic x1 x2 x3 x4 b
1. x3 -1 1 1 0 4
2. x4 1 1 0 1 6
5
Introduction to Optimum Design 3e. Copyright © 2012 Elsevier, Inc. All rights reserved.
Example 2: Interchange roles of x1 and x4
Initial tableau
Basic x1 x2 x3 x4 b
1. x3 -1 1 1 0 4
2. x4 1 1 0 1 6
Second tableau
Basic x1 x2 x3 x4 b
1. x3 0 2 1 1 10
2. x1 1 1 0 1 6
6
Example 3:
Minimize
16
𝑓 = −40𝑥1 − 60𝑥2
Subject to 14
𝑥1 + 𝑥2 ≤ 10
12
2𝑥1 + 1.25𝑥2 ≤ 14
5𝑥1 + 2𝑥2 ≤ 30 10
𝑥1 , 𝑥2 ≥ 0
x2
8
𝑥1 + 𝑥2 + 𝑥3 = 10 2 -600
2𝑥1 + 1.25𝑥2 + 𝑥4 = 14 -200
5𝑥1 + 2𝑥2 + 𝑥5 = 30 0
0 5 10 15
𝑥𝑖 ≥ 0, i = 1 to 5 x1
Initial tableau
Basic x1 x2 x3 x4 x5 RS:b
1. x3 1 1 1 0 0 10
2. x4 2 1.25 0 1 0 14
3. x5 5 2 0 0 1 30
7
Example 3: Interchange roles of x1 and x4
Initial tableau
Basic x1 x2 x3 x4 x5 RS:b
1. x3 1 1 1 0 0 10
2. x4 2 1.25 0 1 0 14
3. x5 5 2 0 0 1 30
Nonbasic variables: x1 = x2 = 0, Basic variables: x3 = 10, x4 = 14, x5 = 30
Second tableau
Basic x1 x2 x3 x4 x5 RS:b
4. x3 0 0.375 1 -0.5 0 3
5. x1 1 0.625 0 0.5 0 7
6. x5 0 -1.125 0 -2.5 1 -5
Nonbasic variables: x2 = x4 = 0, Basic variables: x1 = 7, x3 = 3, x5 = -5
8
Example 3
16
14
12
10
x2
8
6 -400
-800
4
2 -600
-200
0
0A 5 B 10 15
x1
* Convex hull – The smallest convex set containing all specified points
10
The Simplex Method
Cost function
• To initialize the Simplex method, the cost function must be in
terms of the nonbasic variables only
• Cost coefficients of nonbasic variables are called the reduced
cost coefficients, c’j
• At the end of each Simplex iteration, the cost function must
again be in terms of the nonbasic variables only
– Write 𝑓 = 𝒄𝑻 x as the last row of the tableau
– Coefficients of nonbasic columns of last row are c’j
• If all of the reduced cost coefficients are non-negative (c’j ≥ 0),
then the current basic feasible solution is optimum
• If not, a negative coefficient c’j determines which nonbasic
variable needs to become basic to reduce the cost function
11
Example 3: Solution by Simplex method
Minimize
16
𝑓 = −40𝑥1 − 60𝑥2
Subject to 14
𝑥1 + 𝑥2 ≤ 10
12
2𝑥1 + 1.25𝑥2 ≤ 14
5𝑥1 + 2𝑥2 ≤ 30 10
𝑥1 , 𝑥2 ≥ 0
x2
8
𝑥1 + 𝑥2 + 𝑥3 = 10 2 -600
2𝑥1 + 1.25𝑥2 + 𝑥4 = 14 -200
5𝑥1 + 2𝑥2 + 𝑥5 = 30 0
0A 5 B 10 15
𝑥𝑖 ≥ 0, i = 1 to 5 x1
Initial tableau
Basic x1 x2 x3 x4 x5 RS:b
1. x3 1 1 1 0 0 10
2. x4 2 1.25 0 1 0 14
3. x5 5 2 0 0 1 30
4. Cost -40 -60 0 0 0 f 12
Example 3: Solution by Simplex method
13
Example 3: Solution by Simplex method
16
14
12
10
x2 C
8
6 -400
-800
4
2 -600
-200
0
0A 5 10 15
x1
15
Introduction to Optimum Design 3e. Copyright © 2012 Elsevier, Inc. All rights reserved.
The Two-Phase Simplex Method
16
Example 4: Introduction of Artificial Variables
Maximize
z = 𝑥1 + 4𝑥2
Subject to
𝑥1 + 2𝑥2 ≤ 5
2𝑥1 + 𝑥2 = 4
−𝑥1 + 𝑥2 ≤ −1
𝑥1 , 𝑥2 ≥ 0
Minimize
f = −𝑥1 − 4𝑥2
Subject to
𝑥1 + 2𝑥2 + 𝑥3 = 5
2𝑥1 + 𝑥2 = 4 Not in canonical form!
𝑥1 − 𝑥2 − 𝑥4 = 1
𝑥𝑖 ≥ 0; 𝑖 = 1 to 4
17
Example 4: Introduction of Artificial Variables
Re-write constraints:
𝑥1 + 2𝑥2 + 𝑥3 = 5
2𝑥1 + 𝑥2 + 𝑥5 = 4
𝑥1 − 𝑥2 − 𝑥4 + 𝑥6 = 1
𝑥𝑖 , ≥ 0; 𝑖 = 1 to 4
If we make all artificial variables nonbasic, they have zero value at the basic
solution, so 𝑤 = 0
To initialize the Simplex method, need reduced cost coefficients c’j in terms of
nonbasic variables only.
Minimize 𝑤 = 5 − 3𝑥1 + 𝑥4
When 𝑤 = 0, an extreme point of the original feasible set has been reached
19
Example 4: Introduction of Artificial Variables
20
Example 4: Introduction of Artificial Variables
Basic x1 x2 x3 x4 x5 x6 RS:b
Phase I 12. x3 0 0 1 -1 -1 1 2
third
tableau 12. x2 0 1 0 2/3 1/3 -2/3 2/3
13. x1 1 0 0 -1/3 1/3 1/3 5/3
14. Cost 0 0 0 7/3 5/3 -7/3 f+13/3
15. Artificial 0 0 0 0 1 1 w-0
End of Phase I
Basic feasible solution:
Nonbasic variables: x4 = 0, x5 = 0, x6 = 0
Basic variables: x1 = 5/3, x2 = 2/3, x3 = 2
21
Example 4: Introduction of Artificial Variables
Phase II
Discard artificial cost row and artificial cost columns from final Phase I tableau
Continue Simplex iterations
Basic x1 x2 x3 x4 RS:b
Phase II 12. x3 0 0 1 -1 2
tableau
12. x2 0 1 0 2/3 2/3
13. x1 1 0 0 -1/3 5/3
14. Cost 0 0 0 7/3 f+13/3
Optimum solution:
Nonbasic variable: x4 = 0
Basic variables: x1 = 5/3, x2 = 2/3, x3 = 2
22
Notes on the Two-Phase Simplex Method
23
Conclusions: Features of the Simplex Method
24
Example 5:
Minimize
f = 3𝑥1 + 𝑥2 + 𝑥3
Subject to
2𝑥1 + 𝑥2 − 3𝑥3 − 𝑥4 = 5
−𝑥1 + 2𝑥2 − 3𝑥3 + 𝑥5 =2
𝑥𝑖 ≥ 0; 𝑖 = 1 to 4
25