341-l06 revised simplex

Upload: sugi-arto

Post on 06-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 341-l06 Revised Simplex

    1/7

    Revised simplex method

    Matrix representation of the simplex tableSuppose that we have a LP model in the standard form:

    Max z= c1x1 + c2x2 + ` + cnxn

    Subject to

    a11x1 + a12x2 + ` + a1nxn b1

    a21x1 + a22x2 + ` + a2nxn b2

    _

    am1x1 + am2x2 + ` + amnxn bm

    O

    and

    x1,x2,...,xn 0

    Its augmented form is

    Max z= c1x1 + c2x2 + ` + cnxn

    Subject to

    a11x1 + a12x2 + ` + a1nxn + xn + 1 = b1

    a21x1 + a22x2 + ` + a2nxn + xn + 2 = b2

    _

    am1x1 + am2x2 + ` + amnxn + xn+ m = bm

    A

    and

    x1,x2,...,xn,

    slack variables

    xn + 1,...,xn + m 0

    Let

  • 8/2/2019 341-l06 Revised Simplex

    2/7

    c = c1 c2 ` cn 0 ` 0

    A =

    a11 a12 ` a1n 1 0 0

    a21 a22 ` a2n 0 1 0

    _am1 am2 amn 0 0 1

    x =

    x1

    x2

    _

    xn

    , xs =

    xn + 1

    xn + 2

    _

    xn + m

    , b =

    b1

    b2

    _

    bm

    .

    Then the system (O) can be written as

    Max z= cx

    s.t. Ax b

    x 0

    The system (A) can be written as

    Max z= cx

    s.t. A Ix

    xs

    = b

    x

    xs

    0

    The first row of the initial table of the simplex method can be written in the matrix form

    z ? cx = 0

    or

    1 ?c 0

    z

    x

    xs

    = 0

    The initial table of the simplex method is

  • 8/2/2019 341-l06 Revised Simplex

    3/7

    z x1 ` xn xn + 1 ` xn+ m RHS

    1 ?c1 ` ?cn 0 ` 0 0

    xn+ 1 0 a11 ` a1n 1 ` 0 b1

    _ 0 _ _ _ _ _

    xn+ m 0 am1 ` amn 0 ` 1 bm

    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

    z

    x

    xs

    =

    0

    b . M

    Example Consider the system

    Max z= 2x1 + 3x2

    s.t.

    x1 + 2x2 6

    2x1 + x2 9

    x1,x2 0

    Its augmented form is

    Max z= 2x1 + 3x2

    s.t.

    x1 + 2x2 + x3 = 6

    2x1 + x2 + x4 = 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.

  • 8/2/2019 341-l06 Revised Simplex

    4/7

    1 ?c 0

    z

    x

    xs

    = 1 ?2 ?3 0 0

    z

    x1

    x2

    x3

    x4

    = z ? 2x1 ? 3x2

    0 A I

    z

    x

    xs

    =

    0 1 2 1 0

    0 2 1 0 1

    z

    x1

    x2

    x3

    x4

    =

    x1 + 2x2 + x3

    2x1 + x2 + x4

    Revised Simplex MethodIn the iterations of simplex method, the most important information is the choice of basicvariables.. Once we know what are the basic variables, all the other information can be figured outfrom the initial table (M). For example, suppose we chose x2,x4 to be our basic variables after some

    iteration.

    A Ix

    xs

    =

    1 2 1 0

    2 1 0 1

    x1

    x2

    x3

    x4

    (Let x1,x3 be 0) =1 2 1 0

    2 1 0 1

    0

    x2

    0

    x4

    = x22

    1+ x4

    0

    1

    =

    2 0

    1 1

    x2

    x4

    We know that the effect of the row operation can be represented by multiplying a matrix from the

    left. If after one iteration, x2,x4 are the current basic variable, then all the row operations up to thatpoint will change the columns ofx2,x4 into an identity matrix. Therefore all those operation is

    equivalent to multiplying the inverse ofB =2 0

    1 1.

  • 8/2/2019 341-l06 Revised Simplex

    5/7

    B ? 1 =2 0

    1 1

    ? 1

    =

    12

    0

    ?12

    1

    Therefore the lower part of the new simplex table should be

    B ? 1 0 A I =

    12

    0

    ?12

    1

    0 1 2 1 0

    0 2 1 0 1=

    0 12

    1 12

    0

    0 32

    0 ? 12

    1

    Because the same operation is applied to the right hand side, we have the new lower part of the righthand side

    B ? 1b =

    12

    0

    ?12

    1

    6

    9=

    3

    6=

    x2

    x4= xB

    That gives us x2 = 3 and x4 = 9, so z =

    cB

    3 0

    1

    2 0?

    12

    169

    = 3 3 + 0 6 = 9.

    In general, suppose that B is formed by the columns ofA that correspond to the basic variables,and we define xB and cB similarly. Then initially, the simplex table in the matrix form is

    1 ?c 0

    0 A I

    z

    x

    xs

    =

    0

    b

    After some iteration, we get

    z

    xB

    =

    cBB? 1b

    B ? 1b=

    1 cBB? 1

    0 B ? 1

    0

    b

    Therefore,1 cBB

    ? 1

    0 B ? 1is the matrix representing all the row operations and the matrix for the

    simplex table after the iteration is

    1 cBB? 1

    0 B? 1

    1 ?c 0

    0 A I

    z

    x

    xs

    =

    1 cBB? 1

    0 B? 1

    0

    b

    1 cBB? 1A ? c cBB

    ? 1

    0 B ? 1A B ? 1

    z

    x

    xs

    =

    cBB? 1b

    B ? 1b.

    In our example, we have

  • 8/2/2019 341-l06 Revised Simplex

    6/7

    cBB? 1= 3 0

    12

    0

    ?12

    1=

    32

    0

    cBB? 1A ? c = 3

    20

    1 2

    2 1?

    2 3= ?

    1

    20

    So the complete table would be

    1 ? 12

    0 32

    0 9

    0 1/2 1 1/2 0 3

    0 3/2 0 ?1/2 1 6

    Next step: x1 would be the entering basic variable and x4 would be the leaving basic variable.

    xB =x2

    x1, B =

    2 1

    1 2

    . We have

    B ? 1 =

    23

    ?13

    ?13

    23

    , cB = 3 2 , cBB? 1=

    43

    13

    cBB? 1A ? c = 3 2

    23

    ?13

    ?13

    23

    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. Thesolution is

    xB =x2

    x1= B ? 1b =

    23

    ?13

    ?13

    23

    6

    9=

    1

    4

    The steps of the Revised Simplex Method:

    1. Initialization. Same as before.

    2. Optimality test: Calculate cBB ? 1 and cBB ? 1A ? c for the nonbasic variables. If the solution is notoptimal, find the entering basic variable.

    3. Determine the leaving basic variable: calculate only the column of the entering basic variable,say it is xj, and then the ratios bi/aij for the positive entries aij.

    The column ofxj can be calculated by multiplying B? 1 to that column in A.

    Bnew? 1

    = E6 Bold? 1

    where Eis the matrix corresponding to the row operations used. For example:

    Bold? 1

    =

    12

    0

    ?12

    1

    The row operations we are going to use are:

    a. Multiply row 2 with 2/3;

  • 8/2/2019 341-l06 Revised Simplex

    7/7