Вы находитесь на странице: 1из 7

Revised simplex method

Matrix representation of the simplex table


Suppose that we have a LP model in the standard form: Max z = c 1 x 1 + c 2 x 2 + ` + c n x n Subject to a 11 x 1 + a 12 x 2 + ` + a 1n x n b 1 a 21 x 1 + a 22 x 2 + ` + a 2n x n b 2 _ a m1 x 1 + a m2 x 2 + ` + a mn x n b m and x 1 , x 2 , ..., x n 0 Its augmented form is Max z = c 1 x 1 + c 2 x 2 + ` + c n x n Subject to a 11 x 1 + a 12 x 2 + ` + a 1n x n + x n+1 = b 1 a 21 x 1 + a 22 x 2 + ` + a 2n x n + x n+2 = b 2 _ a m1 x 1 + a m2 x 2 + ` + a mn x n + x n+m = b m and
slack variables

x 1 , x 2 , ..., x n , x n+1 , ..., x n+m 0 Let

c=

c1 c2 ` cn 0 ` 0 a 11 a 12 ` a 1n 1 0 1 0 0 0 1 b1 , b= b2 _ bm . a 21 a 22 ` a 2n 0 _ a m1 a m2 x1 a mn 0 x n+1 , xs = x n+2 _ x n+m

A=

x=

x2 _ xn

Then the system (O) can be written as Max z = cx s.t. Ax b x0 The system (A) can be written as Max z = cx s.t. A I x xs x xs =b 0

The first row of the initial table of the simplex method can be written in the matrix form z ? cx = 0 or z 1 ?c 0 x xs The initial table of the simplex method is =0

z x1

` xn

x n+1 ` x n+m RHS ` 0 ` 0 _ ` 1 0 b1 _ bm

1 ?c 1 ` ?c n 0 x n+1 0 a 11 ` a 1n 1 _ 0 _ _ _ x n+m 0 a m1 ` a mn 0 can be represented by 1 ?c 0 0 0 A I b which is equivalent to the matrix equation: 1 ?c 0 0 A I Example Consider the system z x xs

0 b

Max z = 2x 1 + 3x 2 s.t. x 1 + 2x 2 6 2x 1 + x 2 9 x1, x2 0 Its augmented form is Max z = 2x 1 + 3x 2 s.t. x 1 + 2x 2 + x 3 = 6 2x 1 + x 2 + x 4 = 9 x1, x2, x3, x4 0 We have c= 2 3 ,A = 1 2 2 1 ,b = 6 9 ,x = x1 x2 , xs = x3 x4 .

z z 1 ?c 0 x xs = 1 ?2 ?3 0 0 x1 x2 x3 x4 z z 0 A I x xs = 0 1 2 1 0 0 2 1 0 1 x1 x2 x3 x4 = x 1 + 2x 2 + x 3 2x 1 + x 2 + x 4 = z ? 2x 1 ? 3x 2

Revised Simplex Method


In the iterations of simplex method, the most important information is the choice of basic variables.. Once we know what are the basic variables, all the other information can be figured out from the initial table (M). For example, suppose we chose x 2 , x 4 to be our basic variables after some iteration. x1 A I x xs = 1 2 1 0 2 1 0 1 x2 x3 x4 0 (Let x 1 , x 3 be 0) = 1 2 1 0 2 1 0 1 x2 0 x4 = x2 = 2 1 2 0 1 1 + x4 x2 x4 0 1

We know that the effect of the row operation can be represented by multiplying a matrix from the left. If after one iteration, x 2 , x 4 are the current basic variable, then all the row operations up to that point will change the columns of x 2 , x 4 into an identity matrix. Therefore all those operation is 2 0 equivalent to multiplying the inverse of B = . 1 1

B ?1

2 0 1 1

?1

1 2 ?1 2

0 1

Therefore the lower part of the new simplex table should be B ?1 0 A I =


1 2 ?1 2

0 1

0 1 2 1 0 0 2 1 0 1

0 0

1 2 3 2

1 0

1 2 ?1 2

0 1

Because the same operation is applied to the right hand side, we have the new lower part of the right hand side B ?1 b =
1 2 ?1 2

0 1

6 9

3 6
1 2 ?1 2

x2 x4 6 9

= x B

That gives us x 2 = 3 and x 4 = 9, so z =

0 1

3 0
cB

= 3 3 + 0 6 = 9.

In general, suppose that B is formed by the columns of A that correspond to the basic variables, and we define x B and c B similarly. Then initially, the simplex table in the matrix form is 1 ?c 0 0 A After some iteration, we get z xB Therefore, 1 c B B ?1 = c B B ?1 b B ?1 b = 1 c B B ?1 0 B ?1 0 b I z x xs = 0 b

is the matrix representing all the row operations and the matrix for the 0 B ?1 simplex table after the iteration is 1 c B B ?1 0 B ?1 1 ?c 0 0 A I z x xs z x xs = = 1 c B B ?1 0 B ?1 0 b

1 c B B ?1 A ? c c B B ?1 0 In our example, we have B ?1 A B ?1

c B B ?1 b B ?1 b

cB

B ?1

3 0

1 2 ?1 2

0 1 ?

3 2

c B B ?1 A ? c = So the complete table would be

3 2

1 2 2 1

2 3

?1 2

1 ?1 2

3 2

0 9 0 3

0 1/2 1 1/2

0 3/2 0 ?1/2 1 6 Next step: x 1 would be the entering basic variable and x 4 would be the leaving basic variable. x2 2 1 xB = ,B = . We have 1 2 x1 B ?1 =
2 3 ?1 3

?1 3
2 3

, cB =
2 3 ?1 3

3 2

, c B B ?1 =

4 3

1 3

c B B ?1 A ? c =

3 2

?1 3
2 3

1 2 2 1

2 3

0 0

The calculation in the second line is not necessary.. That tells us that this is an optimal solution. The solution is xB = x2 x1 = B ?1 b =
2 3 ?1 3

?1 3
2 3

6 9

1 4

The steps of the Revised Simplex Method: 1. Initialization. Same as before. 2. Optimality test: Calculate c B B ?1 and c B B ?1 A ? c for the nonbasic variables. If the solution is not optimal, find the entering basic variable. 3. Determine the leaving basic variable: calculate only the column of the entering basic variable, say it is x j , and then the ratios b i /a ij for the positive entries a ij . The column of x j can be calculated by multiplying B ?1 to that column in A. ?1 ?1 B new = E 6 B old where E is the matrix corresponding to the row operations used. For example: B ?1
old

1 2 ?1 2

0 1

The row operations we are going to use are: a. Multiply row 2 with 2/3;

b. Multiply the new row 2 with ?1/2 and add that to row 1. 1 0 0 1 B ?1 1 0 0 2/3 1 ?1/3 0 2/3
1 2 ?1 2

1 ?1/3 0 0 1 2/3 =

=E
2 3 ?1 3

new

?1 3
2 3

?1 Of course we can also do the row operations on B old :


1 2 ?1 2

0 1

2 3

R2

1 2 ?1 3

0
2 3

? 1 R2+R1 2

2 3 ?1 3

?1 3
2 3

There is a formal description of this on pages 171-172. The vector R mentioned in the book in our example is ?1/3 2/3

Вам также может понравиться