C5 - The Revised Simplex Method
C5 - The Revised Simplex Method
method
1
Outline chapter
Intr
2
Revised Simplex
Solving for Basic Feasible Solution
x
x 0
s
3
Revised Simplex
Solving for Basic Feasible Solution
4
Revised Simplex
Solving for Basic Feasible Solution
Max Z = 3x1 + 5x2 1 0 1 0 0
[ A, I ] 0 2 0 1 0
s.t: x ≤4
1
2x2 ≤ 12 3 2 0 0 1
3x1 + 2x2 ≤ 18 4
x1, x2 ≥ 0 x3
x b 12
x1 xs =
4 18
In this case x=
x x5
c = [3, 5] 2
5
Revised Simplex Solving for Basic Feasible Solution
• Iteration x3 1 0 0 4
4
1 0 0
0 x 0 1 0 12 12
0
B 1 0 =B-1 s 4
0 0 1 x5 0 0 1 18 18
o
4
x3 12
x Z = [0, 0, 0] =0
4 18
xB = x5
cB = [0, 0, 0]
6
Revised Simplex Solving for Basic
Feasible Solution
• Iteration 1
x3 1 0 0 1 0 0
xB = x B 0 2 0 B-1 0 1 / 2 0
2
x5 0 2 1 0 1 1
cB = [0, 5, 0]
x3 1 0 0 4 4
x 0 1 / 2 0 12 6
so 2
x5 0 1 1 18 6
4
6
so Z = [0, 5, 0] = 30
6
7
Revised Simplex Solving for Basic
Feasible Solution
• Iteration 2
x3 4 2
x3 1 0 1 1 1 / 3 1 / 3 1 1 / 3 1 / 3
xB = B 0 2 0 B-1 0 1 / 2 0 so x2 0 1 / 2 0 12 6
x2 0 1 / 3 1 / 3
x1 0 2 3 0 1 / 3 1 / 3 x1 182
cB = [0, 5, 3] 2
6
so Z = [0, 5, 3] = 36
2
8
Matrix Notation
Maximize Z= cx a11 a12 a1n
Matrix: a a22 a2 n
subject to A 21
Ax = b
x0
am1 am 2 amn
9
Simplex tableaux in matrix form
4 1 0
c 3, 5 b 12 A 0 2
18 3 2
11
Simplex tableaux in matrix form
Iteration 0
Basic variables Basis matrix
s1 1 0 0
xB s2 B 0 1 0
s3 0 0 1
The coefficients of basic variables (s1, s2, s3) in constraints
The coefficient of basic variables (s1, s2, s3) in objective function
C B 0 0 0 1 0 0
B 1 0 1 0
0 0 1
12
Simplex tableaux in matrix form
The coefficients of non basic variables (x1, x2) in constraints
1 0 0 1 0 1 0
B 1. A 0 1 0 0 2 0 2
0 0 1 3 2 3 2
1 0 0 4 4
B 1.b 0 1 0 12 12
0 0 1 18 18
13
Simplex tableaux in matrix form
The coefficients of the basis variables (s1, s2, s3) in objective function
1 0 0
cB .B 1 0 0 0 0 1 0 0 0 0
0 0 1
14
Simplex tableaux in matrix form
The coefficients of the non basic variables (x1, x2) in objective function
1 0
cB .B 1. A c 0 0 0 0 2 3 5 3 5
3 2
Negative
4 Solution is not optimal
Z cB .B 1.b 0 0 0 12 0
18
15
Simplex tableaux in matrix form
Determine the entering variable :
x2 : entering variable
16
Simplex tableaux in matrix form
Determine the leaving variable:
Basic Z Coefficient of: RHS
variable Original Slack
variable variable
Z 1 cB .B-1 .A - c cB .B-1 cB .B-1 .b
1 0 0 1 0 1 0
B 1. A 0 1 0 0 2 0 2
0 0 1 3 2 3 2
Coefficient values of x2
12
Min ratio 4
1 0 0 4 4 2
8 s2 : leaving variable
B 1.b 0 1 0 12 12
2
0 0 1 18 18
18
Simplex tableaux in matrix form
Iteration 1
Basic variables Basis matrix
s1 1 0 0
xB x2 B 0 2 0
s3 0 2 1
1 0 0
4 4
1
1
B .b 0 0 12 6
2
0 1 1 18 6
20
Simplex tableaux in matrix form
The coefficients of the basis variables (s1, x2, s3) in objective function
1 0 0
1
5
cB .B 0 5 0 0
1
0 0 0
2 2
0 1 1
21
Simplex tableaux in matrix form
The coefficients of the non basic variables (x1, s2) in objective function
1 0
5
1
cB .B . A c 0 0 0 2 3 5 3 5
2
3 2
Negative
4
1 5 Solution is not optimal
Z cB .B .b 0 0 12 30
2
18
22
Simplex tableaux in matrix form
The coefficients of the non basic variables (x1, s2) in objective function
1 0
5
1
cB .B . A c 0 0 0 2 3 5 3 5
2
3 2
The most negative
x1 : entering variable
23
Simplex tableaux in matrix form
Determine the leaving variable:
Basic Z Coefficient of: RHS
variable Original Slack
variable variable
Z 1 cB .B-1 .A - c cB .B-1 cB .B-1 .b
1 0 1 0
1
1
B .A 0 0 0 2 0 1
2
0 1 1 3 2 3 0
1 0 0 Coefficient values of x1
4 4
1
1
B .b 0 0 12 6
2 4
0 1 1 18 6 1
Min ratio 2
6 s3 : leaving variable
3 25
Simplex tableaux in matrix form
Iteration 2
s1 1 0 1
xB x2 B 0 2 0
x1 0 2 3
26
Simplex tableaux in matrix form
27
Simplex tableaux in matrix form
28
Simplex tableaux in matrix form
29
Simplex tableaux in matrix form
The coefficients of the basis variables (s1, x2, x1) in objective function
1
1 0
3
1 3
cB .B 1 0 5 3 0 0 0 1
2 2
0 1 1
3
Non-
negative
30
Simplex tableaux in matrix form
The coefficients of the non basic variables (s1, s2) in objective function
1 0
cB .B 1. A c 0 5 3 0 2 3 5 0 0
3 2
Non- negative
4
1 3
Z cB .B .b 0 1 12 36
2
18
Solution is optimal
31
Fundamental Insight
Initial Z Decision variables Slack variables RHS
Table
Z x1 x2 s1 s2 s3 rhs
1 -3 -5 0 0 0 0
t= -c 0
0 1 0 1 0 0 4
0 0 2 0 1 0 12
T= A I b
0 3 2 0 0 1 18
t 1 -c 0 0
=
T 0 A I b
1 1 1
1 cb B A c cb B cb B b
= 1 1
0 B A B B 1b Foundations-32
Fundamental Insight
Final Z Decision variables Slack variables rhs
Table
Z x1 x2 s1 s2 s3 Rhs
t* = 1 0 0 0 3/2 y* 1 36 Z*
z*-c
0 0 0 1 1/3 -1/3 2
T* = 0 0 A* 1 0 ½ 0 6 b*
S*
0 1 0 0 -1/3 1/3 2
t* 1 z*-c y* Z*
=
T* 0 A* S* b*
1 y*A-c y* y*b
=
0 S*A S* S*b
Fundamental Insight
Z Decision variables Slack rhs
variables
* * *
1 y A c y yb
* * *
0 SA S Sb
We can use the fundamental insight for sensitivity analysis.
Vector y* plays a very special role. These are shadow prices.
Fundamental Insight
Optimal value: m
Z * y * b yi *bi
i 1
Z * 1.5 35
36