3.1 Lecture_remark.pdf

Embed Size (px)

Citation preview

  • 8/9/2019 3.1 Lecture_remark.pdf

    1/25

    Remarks on the Simplex Method

    Jeff Chak-Fu WONG

    Department of Mathematics

    Chinese University of Hong Kong

    MAT581SS

    Mathematics for Logistics

    Produced by Jeff Chak-Fu WONG 1

  • 8/9/2019 3.1 Lecture_remark.pdf

    2/25

    SIMPLEX METHOD

    IMPLEXMETHOD 2

  • 8/9/2019 3.1 Lecture_remark.pdf

    3/25

    Consider the LLP problem

    Maximise z= 4x1+ 3x2

    subject to x1+x2 82x1+x2 10

    and x1, x2 0

    (1)

    IMPLEXMETHOD 3

  • 8/9/2019 3.1 Lecture_remark.pdf

    4/25

    Basic Variables: x3 = 8, x4 = 10

    Non-Basic Variables: x1 = 0, x2 = 0

    Expressing the basic variables in terms of the non-basic variables,

    we have

    x3 = 8 x1 x2

    x4 = 10 2x1 x2(2)

    x3 = 8 (0) (0) = 8 0

    x4 = 10 2(0) (0) = 10 0

    Putting Eq. (2) into the objective function, we have

    z(x1, x2, x3, x4) = 4x1+ 3x2+ 0x3+ 0x4

    = 4x1+ 3x2+ 0

    = 4(0) + 3(0)

    = 0.

    IMPLEXMETHOD 4

  • 8/9/2019 3.1 Lecture_remark.pdf

    5/25

    Clearly,X

    (0) = (x1, x2, x3, x4) = (0, 0, 8, 10)

    is not an optimal solution since from the economical point of view,

    x1 = x2 = 0indicated that no production was made, i.e.,

    z(X(0)) = 0.

    x

    x

    2 x + x = 10

    x + x = 8

    O

    2

    2

    2

    1

    1

    P

    Q

    R

    (0,0)z = 0

    1

    Figure 1: z(0, 0) = 0

    IMPLEXMETHOD 5

  • 8/9/2019 3.1 Lecture_remark.pdf

    6/25

    Consider the objective function:

    z = 4x1+ 3x2

    The main idea is

    x1 (0 ?), x2 (0 ?) z(0 ?).

    We look for a new B.F.S. from X(0). Then, the value of zwill improve.

    Observe that when increasing the values of x1and x2by1unit,

    4x1 >3x2.

    Choosex1as the basic variable, known asan entering variable.

    Known that two basic variables are(x3, x4). Hence one of these

    basic variables will become a non-basic variable, known asa

    leaving variable.

    IMPLEXMETHOD 6

  • 8/9/2019 3.1 Lecture_remark.pdf

    7/25

    Consider the objective function:

    z = 4x1+ 3x2

    The main idea is

    x1 (0 ?), x2 (0 ?) z(0 ?).

    We look for a new B.F.S. from X(0). Then, the value of zwill improve.

    Observe that when increasing the values of x1and x2by1unit,

    4x1 >3x2.

    Choosex1as the basic variable, known asan entering variable.

    Known that two basic variables are(x3, x4). Hence one of these

    basic variables will become a non-basic variable, known asa

    leaving variable.

    IMPLEXMETHOD 7

  • 8/9/2019 3.1 Lecture_remark.pdf

    8/25

    Consider the objective function:

    z = 4x1+ 3x2

    The main idea is

    x1 (0 ?), x2 (0 ?) z(0 ?).

    We look for a new B.F.S. from X(0). Then, the value of zwill improve.

    Observe that when increasing the values of x1and x2by1unit,

    4x1 >3x2.

    Choosex1as the basic variable, known asan entering variable.

    Known that two basic variables are(x3, x4). Hence one of these

    basic variables will become a non-basic variable, known asa

    leaving variable.

    IMPLEXMETHOD 8

  • 8/9/2019 3.1 Lecture_remark.pdf

    9/25

    Consider the objective function:

    z = 4x1+ 3x2

    The main idea is

    x1 (0 ?), x2 (0 ?) z(0 ?).

    We look for a new B.F.S. from X(0). Then, the value of zwill improve.

    Observe that when increasing the values of x1and x2by1unit,

    4x1 >3x2.

    Choosex1as the basic variable, known asan entering variable.

    Known that two basic variables are(x3, x4). Hence one of these

    basic variables will become a non-basic variable, known asa

    leaving variable.

    IMPLEXMETHOD 9

  • 8/9/2019 3.1 Lecture_remark.pdf

    10/25

    Or we consider

    4x1 3x2+z = 0.

    IMPLEXMETHOD 10

  • 8/9/2019 3.1 Lecture_remark.pdf

    11/25

    NBVs: ( x1 an entering variable

    , x2) BVs: (x3, x4)

    a leaving variable

    Consider

    x3 = 8 x1 x2

    x4 = 10 2x1 x2

    Then

    x3 = 8 x1 0

    x4 = 10 2x1 0

    Looking for a leaving variable that will quickly reach to a zero value (i.e., it

    will become a non-basic variable):

    x1 = min

    8

    1,10

    2

    =

    10

    2= 5

    IMPLEXMETHOD 11

  • 8/9/2019 3.1 Lecture_remark.pdf

    12/25

    NBVs : ( x1 an entering variable

    , x2) BVs : (x3, x4)

    a leaving variable

    Consider

    x3 = 8 x1 x2

    x4 = 10 2x1 x2

    Then

    x3 = 8 x1 0

    x4 = 10 2x1 0

    Looking for a leaving variable that will quickly reach to a zero value (i.e., itwill become a non-basic variable):

    x1 = min

    8

    1,10

    2

    =

    10

    2 = 5

    Thereforex4will change a basic variable to a non-basic variable.

    IMPLEXMETHOD 12

  • 8/9/2019 3.1 Lecture_remark.pdf

    13/25

    Thereforex4will change a basic variable to a non-basic variable.

    x3 = 8 x1 x2

    x4 = 10 2x1 x2(3)

    We expect to get:

    x3 = ?

    x1 = ?(4)

    (x1, x3)will become basic variables.

    IMPLEXMETHOD 13

  • 8/9/2019 3.1 Lecture_remark.pdf

    14/25

    x3 = 8 x1 x2

    x4 = 10 2x1 x2

    x3 + x1 = 8 x2

    2x1 = 10 x2 x4(5)

    x3 + x1 = 8 x2

    x1 = 5 1

    2x2

    12

    x4

    12

    Eq.(5)[2]

    (6)

    x3 = 3 1

    2x2 +

    12

    x4 Eq.(6)[1] Eq.(6)[2]

    x1 = 5 1

    2x2

    12

    x4

    (7)

    IMPLEXMETHOD 14

  • 8/9/2019 3.1 Lecture_remark.pdf

    15/25

    x3 = 3

    1

    2

    x2 + 1

    2

    x4

    x1 = 5 1

    2x2

    12

    x4

    Tableau 3(cf. Lecture Note1d)

    cj : (4 3 0 0)

    y1 y2 y3 y4

    CB XB x1 x2 x3 x4 Min. Ratio

    0 x3 3 0 1/2 1 -1/2

    4 x1 5 1 1/2 0 1/2zj cj z(XB) = 20 0 -1 0 2

    IMPLEXMETHOD 15

  • 8/9/2019 3.1 Lecture_remark.pdf

    16/25

    x3 = 3 1

    2x2 +

    12

    x4 = 3 0

    x1 = 5 1

    2x2

    12

    x4 = 5 0

    Note that

    Basic Variables: x1 = 5, x3 = 3

    Non-Basic Variables: x2 = 0, x4 = 0

    Putting Eq. (7) into the objective function, we have

    z(x1, x2, x3, x4) = 4x1+ 3x2+ 0x3+ 0x4

    = 4

    5 12

    x2+12

    x4

    + 3x2+ 0

    = 20 2x2+ 2x4+ 3x2

    = 20 +x2+ 2x4

    IMPLEXMETHOD 16

  • 8/9/2019 3.1 Lecture_remark.pdf

    17/25

    Clearly,X

    (1) = (x1, x2, x3, x4) = (5, 0, 3, 0)

    is a new B.F.S with

    z(X

    (1)

    ) = 20 > z(X

    (0)

    ) = 0.

    x

    x

    2 x + x = 10

    x + x = 8

    O

    2

    2

    2

    1

    1

    P

    Q

    R

    (0,0)z = 0

    (5,0)

    z = 20 1

    Figure 2: z(5, 0) = 20

    IMPLEXMETHOD 17

  • 8/9/2019 3.1 Lecture_remark.pdf

    18/25

    Canzbe increased further?

    IMPLEXMETHOD 18

  • 8/9/2019 3.1 Lecture_remark.pdf

    19/25

    NBVs: ( x2 an entering variable

    , x4) BVs: (x1, x3)

    a leaving variable

    x3 = 3 1

    2 x2 + 1

    2 x4x1 = 5

    12

    x2 1

    2x4

    x3 = 3

    12

    x2 + 1

    2(0)

    x1 = 5 1

    2x2

    12

    (0)

    x3 = 3 1

    2x2

    x1 = 5 1

    2x2

    Looking for a leaving variable that will quickly reach to a zero value (i.e., itwill become a non-basic variable):

    x2 = min

    3

    1/2,

    5

    1/2

    =

    3

    1/2 = 6

    Thereforex3will change a basic variable to a non-basic variable.

    IMPLEXMETHOD 19

  • 8/9/2019 3.1 Lecture_remark.pdf

    20/25

    NBVs: ( x2 an entering variable

    , x4) BVs: (x1, x3)

    a leaving variable

    x3 = 3 1

    2 x2 + 1

    2 x4x1 = 5

    12

    x2 1

    2x4

    x3 = 3

    12

    x2 + 1

    2(0)

    x1 = 5 1

    2x2

    12

    (0)

    x3 = 3 1

    2x2

    x1 = 5 1

    2x2

    Looking for a leaving variable that will quickly reach to a zero value (i.e., itwill become a non-basic variable):

    x2 = min

    3

    1/2,

    5

    1/2

    =

    3

    1/2 = 6

    Thereforex3will change a basic variable to a non-basic variable.

    IMPLEXMETHOD 20

  • 8/9/2019 3.1 Lecture_remark.pdf

    21/25

    x3 = 3 1

    2x2 +

    12

    x4

    x1 = 5 1

    2x2

    12

    x4

    We expect to get:

    x2 = ?

    x1 = ?(8)

    (x1, x2)will become basic variables.

    IMPLEXMETHOD 21

  • 8/9/2019 3.1 Lecture_remark.pdf

    22/25

    12

    x2 = 3 x3 + 1

    2x4

    12

    x2 + x1 = 5 1

    2x4

    (9)

    x2 = 6 2x3 + x4 2 Eq.(9)[1]

    x2 + 2x1 = 10 x4 2 Eq.(9)[2](10)

    x2 = 6 2x3 + x4

    2x1 = 4 + 2x3 2x4 Eq.(10)[2] Eq.(10)[1]

    (11)

    x2 = 6 2x3 + x4

    x1 = 2 + x3 x4

    12

    Eq.(11)[2](12)

    IMPLEXMETHOD 22

  • 8/9/2019 3.1 Lecture_remark.pdf

    23/25

    x2 = 6 2x3 + x4

    x1 = 2 + x3 x4

    Tableau 5(cf. Lecture Note1d)

    cj : (4 3 0 0)

    y1 y2 y3 y4

    CB XB x1 x2 x3 x4 Min. Ratio

    3 x2 6 0 1 2 -1

    4 x1 2 1 0 -1 0zj cj z(XB) = 26 0 0 2 1

    IMPLEXMETHOD 23

  • 8/9/2019 3.1 Lecture_remark.pdf

    24/25

    x2 = 6 2x3 + x4 = 6 0

    x1 = 2 + x3 x4 = 2 0

    Note that

    Basic Variables: x1 = 2, x2 = 6

    Non-Basic Variables: x3 = 0, x4 = 0

    Putting Eq. (12) into the objective function, we have

    z(x1, x2, x3, x4) = 4x1+ 3x2+ 0x3+ 0x4

    = 4(2 +x3 x4)+ 3(6 2x3+x4)+ 0

    = 8 + 4x3 4x4+ 18 6x3+ 3x4

    = 26 2x3 x4

    Clearly,

    X(2) = (x1, x2, x3, x4) = (2, 6, 0, 0)

    is a new B.F.S with

    z(X(2)

    ) = 26 > z(X(1)

    ) = 20.

    IMPLEXMETHOD 24

  • 8/9/2019 3.1 Lecture_remark.pdf

    25/25

    x

    x

    2 x + x = 10

    x + x = 8

    O

    2

    2

    2

    1

    1

    P

    Q

    R

    (0,0)z = 0

    (2,6)

    z = 26

    (5,0)

    z = 20 1

    Figure 3: z(2, 6) = 26

    The optimal solution isx1 = 2,x2 = 6with maximum ofz

    = 26.

    IMPLEXMETHOD 25