Slide3d Simplex Method

download Slide3d Simplex Method

of 6

Transcript of Slide3d Simplex Method

  • 8/12/2019 Slide3d Simplex Method

    1/6

    1

    Reference: Decision Maths 2 textbook,chapter 1, section 1

    3/2/20129:14:46 AM

    2

    Simplex Algorithm1. Construct system of equations from LP inequalities

    1.1 rewrite objective formula to be equal to zero.1. remove the inequalities from the constraints b! a""ing slac#

    variables. Place s!stem of equations in a tableau

    $. %epeat the following until solution is optimal$.1 &"entif! the pivot column

    'he pivot column is the column with the largest negative value inthe objective equation

    $. &"entif! the pivot element using ratio test.Compute ratios of %(S to the correspon"ing entr! in the pivotcolumn'he minimum of these ratios "efines the pivot element.

    $.$ )a#ing the pivotManipulate the system of equations so that* pivot element becomes 1* all remaining element in pivot column become +

    $., Chec# if the solution is optimal.Solution is optimal if there is no negative entr! in objective row.

    LP xample

    0

    160

    320

    480

    640

    800

    960

    0 160 32 0 480 640 800 960

    x

    y

    )aximise P- x +./!

    subject to x ! 1+++

    x ! 10++

    $x ! ,++

    &nitial solution

    P ! "

    at 2+3 +4

    )aximise P - x +./!

    subject to x ! 1+++

    x ! 10++

    $x ! ,++

    )aximise P

    where P *x *+./! - +subject to x ! s1 - 1+++

    x ! s - 10++

    $x ! s$ - ,++Constraintequations

    Constraintequations

    5bjective equation5bjective equation

    Slac# variablesSlac# variables

    LP xample

    2#""1++$+

    1$""+1+1+

    1"""++111+

    "+++*+./*11

    %(Ss$ss1!xP

    %&MPL' ()*L)+

    x ! ", y ! "3 P- +3s1

    - 1+++3 s

    - 10++3 s$

    - ,++

    &nitial solution:

    1

    ,++1++$+

    10+++1+1+

    1+++++111+

    ++++*+./*11

    %(Ss$ss1!xP

    P&-( 1 .hoosin/ the pivot columnChoose the column withthe most negative number in objective row

    pivot column

    1

  • 8/12/2019 Slide3d Simplex Method

    2/6

    2

    ,++6$

    -/++,++1++$+

    10++6

    -70+10+++1+1+

    1+++61

    -1+++1+++++111+

    ++++*+./*11

    %(Ss$ss1!xP

    P&-( 1 .hoosin/ the pivot element

    %atio test )in. of $ ratios gives 2 as pivot element

    pivot ro0 pivot element

    1

    3/2/20129:14:46 AM

    8

    ,++1++$+

    10+++1+1+

    1+++++111+

    ++++*+./*11

    %(Ss$ss1!xP

    P&-( 1

    pivot ro0 pivot element

    1

    8ext operation9ivi"e through the pivot row b! the pivot element

    3/2/20129:14:46 AM

    9

    ,++1++$+

    $"""$""$1"

    1+++++111+

    ++++*+./*11

    %(Ss$ss1!xP

    P&-( 12

    After "ivi"e through the pivot row b! the pivot element

    8ext operation 5bjective row pivot row

    70+++.0++.01+

    $"""$"3"4"1

    %(Ss$ss1!:P

    P&-( 1After objective row pivot row

    3

    8ext operation ;irst constraint row * pivot row

    70+++.0++.01+

    2$""3"$1"$""

    70+++.0+*+.$+1

    %(Ss$ss1!xP

    P&-( 1 After first constraint row * pivot row

    3

    8ext operation 'hir" constraint row < $ x pivot row1$"131$""$""

    70+++.0++.01+

    0++*+.01+.0++

    70+++.0+*+.$+1

    %(Ss$ss1!xP

    P&-( 1After thir" constraint row < $ x pivot row

    3

  • 8/12/2019 Slide3d Simplex Method

    3/6

    3

    3/2/20129:14:46 AM

    13

    10+1*1.0++.0++

    70+++.0++.01+

    0++*+.01+.0++

    70+++.0+*+.$+1

    %(Ss$ss1!xP

    n5 of P&-( 13

    1$"1*1.0++.0++

    $"++.0++.01+

    2$"+*+.01+.0++

    $"++.0+*+.$+1

    %(Ss$ss1!xP

    n5 of P&-( 1 6e0 solution

    P - 70+3 x ! $", y ! "3 s1 - 0+3 s - +3 s$ - 10+

    P -0.3y +0.5s2 = 750

    0.5y +s1 + = 250

    x +0.5y +0.5s2 = 750

    0.5y -1.5s2 +s3 = 150

    P -0.3y +0.5s2 = 750

    0.5y +s1 + = 250

    x +0.5y +0.5s2 = 750

    0.5y -1.5s2 +s3 = 150

    0

    160

    320

    480

    640

    800

    960

    0 160 3 20 48 0 6 4 0 80 0 9 60

    x

    y

    7raphical equivalent

    )aximise P- x +./!

    subject to x ! 1+++

    x ! 10++

    $x ! ,++

    Solution after

    pivot 1P ! $"

    at 270+3 +410+1*1.0++.0++

    70+++.0++.01+

    0++*+.01+.0++

    70+++.0+*+.$+1

    %(Ss$ss1!xP

    P&-( 2

    )ost negative number in objective row

    .hoosin/ the pivot column3

    10+6+.0-$++

    10+1*1.0++.0++

    70+6+.0-10++70+++.0++.01+

    0+6+.0

    -0++0++*+.01+.0++

    70+++.0+*+.$+1

    %(Ss$ss1!xP

    P&-( 2 .hoosin/ the pivot element

    %atio test )in. of $ ratios gives "$ as pivot element

    3

    4""234"1""

    70+++.0++.01+

    0++*+.01+.0++

    70+++.0+*+.$+1

    %(Ss$ss1!xP

    P&-( 2 Makin/ the pivot

    9ivi"e through the pivot row b! the pivot element

    4

  • 8/12/2019 Slide3d Simplex Method

    4/6

    4

    $++*$+1++

    8#""93"#"""1

    %(Ss$ss1!xP

    P&-( 2 Makin/ the pivot

    5bjective row +.$ x pivot row

    5

    $++*$+1++

    1""3111"""

    /,++.=*+.,+++1

    %(Ss$ss1!xP

    P&-( 2 Makin/ the pivot

    ;irst constraint row < +.0 x pivot row

    5

    $++*$+1++

    9""312""1"

    1++*111+++

    /,++.=*+.,+++1

    %(Ss$ss1!xP

    P&-( 2 Makin/ the pivot

    Secon" constraint row < +.0 x pivot row

    5

    3/2/20129:14:46 AM

    22

    $++*$+1++

    =++*1++1+

    1++*111+++

    /,++.=*+.,+++1

    %(Ss$ss1!xP

    n5 of P&-( 25

    4""*$+1++

    9""*1++1+

    1""*111+++

    8#"+.=*+.,+++1

    %(Ss$ss1!xP

    n5 of P&-( 2 6e0 solutionP - /,+3 x ! 9"", y ! 4""3 s1 - 1++3 s - +3 s$ - +

    5

    0

    160

    320

    480

    640

    800

    960

    0 160 3 20 4 80 640 800 960

    x

    y

    )aximise P- x +./!

    subject to x ! 1+++

    x ! 10++

    $x ! ,++

    Solution afterpivot

    P ! 8#"

    at 2=++3 $++4

    7raphical equivalent

  • 8/12/2019 Slide3d Simplex Method

    5/6

    5

    $++*$+1++

    =++*1++1+

    1++*111+++

    /,++.=*+.,+++1

    %(Ss$ss1!xP

    P&-( 4 .hoosin/ the pivot column

    )ost negative number in objective row

    5

    $++*$+1++

    =++6=++*1++1+

    1++611++*111+++

    /,++.=*+.,+++1

    %(Ss$ss1!xP

    P&-( 4 .hoosin/ the pivot element

    %atio test )in. of ratios gives 1 as pivot element

    5

    $++*$+1++

    =++*1++1+

    1""3111"""

    /,++.=*+.,+++1

    %(Ss$ss1!xP

    P&-( 4 Makin/ the pivot

    9ivi"e through the pivot row b! the pivot element

    6

    1++*111+++

    88""2""#""1

    %(Ss$ss1!xP

    P&-( 4 Makin/ the pivot

    5bjective row +., x pivot row

    7

    #""1"32"1"

    1++*111+++

    //++.++.,++1

    %(Ss$ss1!xP

    P&-( 4 Makin/ the pivot

    Secon" constraint row < x pivot row

    7

    9""31"41""

    ,++1+*+1+

    1++*111+++

    //++.++.,++1

    %(Ss$ss1!xP

    P&-( 4 Makin/ the pivot

    'hir" constraint row $ x pivot row

    7

  • 8/12/2019 Slide3d Simplex Method

    6/6

    6

    3/2/20129:14:46 AM

    31

    =++*1+$1++

    ,++1+*+1+

    1++*111+++

    //++.++.,++1

    %(Ss$ss1!xP

    n5 of P&-( 47

    9""*1+$1++

    #""1+*+1+

    1""*111+++

    88"+.++.,++1

    %(Ss$ss1!xP

    n5 of P&-( 4 -ptimal solution

    P - //+3 x ! #"", y ! 9""3 s1 - +3 s - 1++3 s$ - +

    8o more negative entries in 5bjective %ow8o more negative entries in 5bjective %ow

    7

    0

    160

    320

    480

    640

    800

    960

    0 160 320 4 80 64 0 80 0 9 60

    x

    y

    )aximise P- x +./!

    subject to x ! 1+++

    x ! 10++

    $x ! ,++

    5ptimal solution

    after pivot $P ! 88"

    at 2,++3 =++4

    7raphical equivalent

    3/2/20129:14:46 AM

    34

    $*variable LP Problem

    > ?xample from 9 ?x 1A @$ 2page 14)aximise P - x1+!=z

    Subject to

    x $! ,z B $

    =x =! z B /x3 !3 z +