0% found this document useful (0 votes)
79 views36 pages

C5 - The Revised Simplex Method

The document summarizes the revised simplex method for solving linear programming problems. It provides the steps to obtain a basic feasible solution, including setting nonbasic variables to zero and solving the system of equations defined by the basic variables. It then gives an example, showing two iterations of the simplex method to arrive at an optimal solution. Matrix notation is introduced to concisely represent the linear program and simplex tableaux.

Uploaded by

Ly Lê
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views36 pages

C5 - The Revised Simplex Method

The document summarizes the revised simplex method for solving linear programming problems. It provides the steps to obtain a basic feasible solution, including setting nonbasic variables to zero and solving the system of equations defined by the basic variables. It then gives an example, showing two iterations of the simplex method to arrive at an optimal solution. Matrix notation is introduced to concisely represent the linear program and simplex tableaux.

Uploaded by

Ly Lê
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

The revised Simplex

method

Ha Thi Xuan Chi, PhD

1
Outline chapter
Intr

2
Revised Simplex
Solving for Basic Feasible Solution

• The n nonbasic variables from the n+m elements


of are set to zero.
x
A, I   b
x s 

x
x   0
 s

3
Revised Simplex
Solving for Basic Feasible Solution

• The set of m equations with m basic variables denoted by BxB=b

where  xB1  x


 
Vector of basic variables xB=  xB 2  obtained by eliminating the nonbasic variables from x 
 xBm 
 s
 B11 B12 B1m 
Basis matrix B = B B22 B2 m 
obtained by eliminating the columns corresponding to
 21 coefficient of nonbasic variables from A, I 
 Bm1 Bm 2 Bmm 

• To solve BxB = b both side are premultiplied by B-1 B-1BxB=B-1b


xB=B-1b
or
then Z = cBxB= cBB-1b

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   182
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    
x0  
 am1 am 2  amn 

The constrains become:


Row vector: c  c1 , c2 ,..., cn 
Column vectors: x  x 
 x   b
A, I x   0
b1   xn 1   s  s
 x1  0 
x  b  0  x 
x   2 b   2 0  xs   n  2 
    
       
 xn  bn  0   xn  m 

9
Simplex tableaux in matrix form

Basic Z Coefficient of: RHS


variable Original Slack
variable variable
Z 1 cB .B-1 .A - c cB .B-1 cB .B-1 .b

xB 0 B-1 .A B-1 B-1 .b

cB : vector whose elements are the objective


function coefficients (including zero for slack variables)
for the corresponding elements of xB
xB : vector of basic variables
B : basis matrix
B-1 : inverse of basis matrix
B : vector of RHS
10
Simplex tableaux in matrix form
Example
Maximize Z = 3x1 + 5x2 Maximize Z = 3x1 + 5x2
Subject to Subject to
x1 ≤4 x1 + s1 =4
2x2 ≤ 12 2x2 + s2 = 12
3x1 + 2x2 ≤ 18 3x1 + 2x2 + s3 = 18
x1 ≥ 0
x1≥ 0, x2 ≥ 0, s1 ≥0, s2 ≥0, s3 ≥0.
x2 ≥ 0.

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 

The coefficients of basic variables (s1, s2, s3) in constraints

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 :

Selecting the variable whose the coefficient value is the

most negative (maximize problem) and the positive

coefficient (minimize problem) in Z-eq.


The coefficients of the nonbasic variables (x1, x2):

cB .B 1. A  c  0, 0  3,5  3, 5

The most negative

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

xB 0 B-1 .A B-1 B-1 .b

 Entering variable is the original variable:

Selecting the minimum ratio: B-1 .b/B-1 .A

 Entering variable is the slack variable

Selecting the minimum ratio: B-1 .b/ B-1


17
Simplex tableaux in matrix form
x2 : entering variable and original variable

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 

The coefficient of basic variables (s1, x2, s3) in objective function


cB  0 5 0 
The coefficients of basic variables (s1, x2, s3) in constraints
1 0 0 
 1 
B  0
1
0
 2 
 0 1 1 
 
19
Simplex tableaux in matrix form
The coefficients of non basic variables (x1, s2) in constraints
1 0 0 
  1 0  1 0 
1
1

B .A  0 0  0 2   0 1
 2 
0 1 1   3 2   3 0 
 
The coefficients of basic variables (s1, x2, s3) in constraints

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

Determine the entering variable :

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

xB 0 B-1 .A B-1 B-1 .b


 If the entering variable is the original variable

Selecting the minimum ratio: B-1 .b/B-1 .A

 If the entering variable is the slack variable

Selecting the minimum ratio: B-1 .b/ B-1


24
Simplex tableaux in matrix form
1 0 0  x2 : entering variable and original variable

  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

Basic variables Basis matrix

 s1  1 0 1 
xB   x2  B  0 2 0 
 x1  0 2 3

26
Simplex tableaux in matrix form

The coefficient of basic variables (s1, x2, x1) in objective function


cB  0 5 3
The coefficients of basic variables (s1, x2, x1) in constraints
 1 
 1 0
3
 
1
B 1  0 0
 2 
 
0 1 1 
 3 

27
Simplex tableaux in matrix form

The coefficients of non basic variables (s1, s2) in constraints


 1 
1 0 3 
  1 0   0 0 
1
1 
B .A  0 0  0 2   0 1 
 2 
   3 2  1 0 
 0 1 1 
 3 

28
Simplex tableaux in matrix form

The coefficients of basic variables (s1, x2, x1) in constraints


 1 
1 0 3  4   2
 
1
1 
B .b  0 0  12   6 
 2 
  18   2 
0 1 1 
 3 

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

Old optimal value:


4 
 3    36
Z *  y1b1  y2b2  y3b3   0 1 12 
 2 
18 
New optimal value:
4 
 3 
Z *  0 1 13   37.5
 2 
18 

Z *  1.5 35
36

You might also like