4-optimization linear programming

Upload: aniket-chandorkar

Post on 07-Apr-2018

254 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 4-Optimization Linear Programming

    1/71

    MAE 550 Optimization inEngineering Design

    Linear Programming

  • 8/3/2019 4-Optimization Linear Programming

    2/71

    2011 K. English 2

    FORMULATION OF LINEARPROGRAMMING PROBLEMS

  • 8/3/2019 4-Optimization Linear Programming

    3/71

    2011 K. English 3

    Linearization Methods

    nTwo classes of optimization theory that are mostthoroughly addressed

    Unconstrained problemsCompletely linear problems

    n Efficient solution algorithms exist for eachn If we could transform a nonlinear problem into a linear

    one, we might be able to significantly speed up solution

  • 8/3/2019 4-Optimization Linear Programming

    4/71

    2011 K. English 4

    Linearization Methods

    nLinearize using Taylor series expansion

    n If the function is highly nonlinear, the linear approximationcould result in substantial errors

    n Before linearizing nonlinear problems, we will take a sidestep to linear programming (i.e., solving linear optimizationproblems)

    !f("x) = f(

    "x0 )+!f(

    "x0 )(

    "x "

    "x0 )+O

    "x "

    "x0( )

    2

    +#

    !f("x) = f(

    "x0 )+!f(

    "x0 )(

    "x "

    "x0 )

    "x0 is the linearized point

  • 8/3/2019 4-Optimization Linear Programming

    5/71

    2011 K. English 5

    Linear Programming

    n Linear programming is a subset ofoptimization problemsObjective function is linear function of design

    variables

    Constraints are linear equations or inequalities

  • 8/3/2019 4-Optimization Linear Programming

    6/71

    2011 K. English 6

    Example

    nA company has two grades of inspectors: Grade I andGrade II, who are to be assigned to a quality controlinspection. At least 1800 pieces must be inspected per 8-hr day.

    n Grade I inspectors earn $40/hr and can check pieces at arate of 25 per hour, with an accuracy of 98%

    n Grade II inspectors earn $30/hr and can check pieces at arate of 15 per hour, with an accuracy of 95%

    n Errors cost the company $20 eachn The company has 8 Grade I and 10 Grade 2 inspectorsn Determine the optimal assignment of inspectors that will

    minimize the total cost of inspection.

  • 8/3/2019 4-Optimization Linear Programming

    7/71

    2011 K. English 7

    Example1

    2

    8 (Grade I)

    10 (Grade II)

    x

    x

  • 8/3/2019 4-Optimization Linear Programming

    8/71

    2011 K. English 8

    Example1

    2

    1 2

    8 (Grade I)

    10 (Grade II)

    8(25* ) 8(15* ) 1800 (1800 pieces must be inspected each shift)

    x

    x

    x x

    +

  • 8/3/2019 4-Optimization Linear Programming

    9/71

    2011 K. English 9

    Example

    1

    2

    1 2

    1 2

    1 2

    8 (Grade I)

    10 (Grade II)

    8(25* ) 8(15* ) 1800 (1800 pieces must be inspected each shift)

    200 120 1800

    5 3 45

    x

    x

    x x

    x x

    x x

    +

    +

    +

  • 8/3/2019 4-Optimization Linear Programming

    10/71

    2011 K. English 10

    Example

    1

    2

    1 2

    8 (Grade I)

    10 (Grade II)

    5 3 45

    (Salary) + (Error Charge)*(Parts per hr.)(Error rate) Hourly rate

    $40 $20*(25)*(0.02) $50 (Grade I Hourly rate)

    $30 $20*(15)*(0.05) $45 (Grade II Hourly rate)

    x

    x

    x x

    +

    =

    + =

    + =

  • 8/3/2019 4-Optimization Linear Programming

    11/71

    2011 K. English 11

    Example

    1

    2

    1 2

    8 (Grade I)

    10 (Grade II)

    5 3 45

    (Salary) + (Error Charge)*(Parts per hr.)(Error rate) Hourly rate

    $40 $20*(25)*(0.02) $50 (Grade I Hourly rate)

    $30 $20*(15)*(0.05) $45 (Grade II Hourly rate)

    8 5

    x

    x

    x x

    Z

    +

    =

    + =

    + =

    = ( )1 2 1 20 45 400 360 x x x x+ = +

  • 8/3/2019 4-Optimization Linear Programming

    12/71

    2011 K. English 12

    Example

    1 2

    1 2

    1

    2

    : 400 360

    : 5 3 45

    0 8

    0 10

    Minimize Z x x subject to x x

    xx

    = +

    +

  • 8/3/2019 4-Optimization Linear Programming

    13/71

    2011 K. English 13

    Standard Form

    Minimize : Z= c1x1 + c2x2 +!+ cnxn

    subject to : a11x

    1+ a

    12x

    2+!+ a

    1nx

    n= b

    1

    a21x

    1+ a

    22x

    2+!+ a

    2nx

    n= b

    2

    "

    am1x

    1+ a

    m2x

    2+!+ a

    mnx

    n= b

    m

    x1 ! 0,x2 ! 0 ! xn ! 0

    b1! 0,b

    2! 0 ! b

    m! 0

  • 8/3/2019 4-Optimization Linear Programming

    14/71

    2011 K. English 14

    Standard Form

    Minimize : Z=

    cxsubject to : Ax = b

    x! 0

    b ! 0

  • 8/3/2019 4-Optimization Linear Programming

    15/71

    2011 K. English 15

    Standard Form

    n M constraints, N design variablesn Handling Inequalities Introduce slack variables

    x1+ 2x

    2+ 3x

    3+ 4x

    4! 25

    2x1+x

    2" 3x

    3#12

  • 8/3/2019 4-Optimization Linear Programming

    16/71

    2011 K. English 16

    Standard Form

    n M constraints, N design variablesn Handling Inequalities Introduce slack variables

    1 2 3 4

    1 2 3 4 1

    1 2 3

    1 2 3 2

    2 3 4 25

    2 3 4 25

    2 3 12

    2 3 12

    x x x x

    x x x x S

    x x x

    x x x S

    + + +

    + + + + =

    +

    + =

  • 8/3/2019 4-Optimization Linear Programming

    17/71

    2011 K. English 17

    Standard Form

    n M constraints, N design variablesn Handling Inequalities Introduce slack variables

    n Handling Unrestricted Variables

    1 2 3 4

    1 2 3 4 1

    1 2 3

    1 2 3 2

    2 3 4 25

    2 3 4 25

    2 3 12

    2 3 12

    x x x x

    x x x x S

    x x x

    x x x S

    + + +

    + + + + =

    +

    + =

    1

    1 1 1

    1 1

    unrestricted

    0 0

    x

    x x x

    x x

    +

    +

    =

  • 8/3/2019 4-Optimization Linear Programming

    18/71

    2011 K. English 18

    Convert into Standard Form1 2 3

    1 2 3

    1 2 3

    1 2 3

    1 2

    3

    : 2 3

    : 7

    2

    3 2 5

    , 0unrestricted in sign

    Maximize Z x x x

    subject to x x x

    x x x

    x x x

    x xx

    = +

    + +

    +

    =

  • 8/3/2019 4-Optimization Linear Programming

    19/71

    2011 K. English 19

    Convert into Standard Form1 2 3

    1 2 3

    1 2 3

    1 2 3

    1 2 4 5

    3 4 5

    : 2 3

    : 7

    2

    3 2 5

    , , , 0=

    Maximize Z x x x

    subject to x x x

    x x x

    x x x

    x x x x x x x

    = +

    + +

    +

    =

    Replace x3 with x4-x5

  • 8/3/2019 4-Optimization Linear Programming

    20/71

    2011 K. English 20

    Convert into Standard Form( )

    ( )

    ( )

    ( )

    1 2 4 5

    1 2 4 5

    1 2 4 5

    1 2 4 5

    1 2 4 5

    3 4 5

    : 2 3

    : 7

    2

    3 2 5

    , , , 0

    =

    Maximize Z x x x x

    subject to x x x x

    x x x x

    x x x x

    x x x x

    x x x

    = +

    + +

    +

    =

    Replace x3 with x4-x5

  • 8/3/2019 4-Optimization Linear Programming

    21/71

    2011 K. English 21

    Convert into Standard Form( )

    ( )

    ( )

    ( )

    1 2 4 5

    1 2 4 5

    1 2 4 5

    1 2 4 5

    1 2 4 5

    3 4 5

    : 2 3

    : 7

    2

    3 2 5

    , , , 0

    =

    Maximize Z x x x x

    subject to x x x x

    x x x x

    x x x x

    x x x x

    x x x

    = +

    + +

    +

    =

    Replace x3 with x4-x5 Multiply both sides of the

    third constraint by -1

  • 8/3/2019 4-Optimization Linear Programming

    22/71

    2011 K. English 22

    Convert into Standard Form( )

    ( )

    ( )

    ( )

    1 2 4 5

    1 2 4 5

    1 2 4 5

    1 2 4 5

    1 2 4 5

    3 4 5

    : 2 3

    : 7

    2

    3 2 5

    , , , 0

    =

    Maximize Z x x x x

    subject to x x x x

    x x x x

    x x x x

    x x x x

    x x x

    = +

    + +

    +

    + + =

    Replace x3 with x4-x5 Multiply both sides of the

    third constraint by -1

  • 8/3/2019 4-Optimization Linear Programming

    23/71

    2011 K. English 23

    Convert into Standard Form( )

    ( )

    ( )

    ( )

    1 2 4 5

    1 2 4 5

    1 2 4 5

    1 2 4 5

    1 2 4 5

    3 4 5

    : 2 3

    : 7

    2

    3 2 5

    , , , 0

    =

    Maximize Z x x x x

    subject to x x x x

    x x x x

    x x x x

    x x x x

    x x x

    = +

    + +

    +

    + + =

    Replace x3 with x4-x5 Multiply both sides of the

    third constraint by -1

    Introduce x6 , x7 as slack(and surplus) variables in the

    first and second constraint

  • 8/3/2019 4-Optimization Linear Programming

    24/71

    2011 K. English 24

    Convert into Standard Form( )

    ( )

    ( )

    ( )

    1 2 4 5

    1 2 4 5 6

    1 2 4 5 7

    1 2 4 5

    1 2 4 5 6 7

    3 4 5

    : 2 3

    : 7

    2

    3 2 5

    , , , , , 0

    =

    Maximize Z x x x x

    subject to x x x x x

    x x x x x

    x x x x

    x x x x x x

    x x x

    = +

    + + + =

    + =

    + + =

    Replace x3 with x4-x5 Multiply both sides of the

    third constraint by -1

    Introduce x6 , x7 as slack(and surplus) variables in the

    first and second constraint

  • 8/3/2019 4-Optimization Linear Programming

    25/71

    2011 K. English 25

    Convert into Standard Form

    1 2 4 5

    1 2 4 5 6

    1 2 4 5 7

    1 2 4 5

    1 2 4 5 6 7

    : 2 3 3

    : 7

    2

    3 2 2 5

    , , , , , 0

    Maximize Z x x x x

    subject to x x x x x

    x x x x x

    x x x x

    x x x x x x

    = +

    + + + =

    + =

    + + =

    Replace x3 with x4-x5 Multiply both sides of the

    third constraint by -1

    Introduce x6 , x7 as slack(and surplus) variables in the

    first and second constraint

  • 8/3/2019 4-Optimization Linear Programming

    26/71

    2011 K. English 26

    Convert into Standard Form

    1 2 4 5

    1 2 4 5 6

    1 2 4 5 7

    1 2 4 5

    1 2 4 5 6 7

    : 2 3 3

    : 7

    2

    3 2 2 5

    , , , , , 0

    Maximize Z x x x x

    subject to x x x x x

    x x x x x

    x x x x

    x x x x x x

    = +

    + + + =

    + =

    + + =

    1 2 3

    1 2 3

    1 2 3

    1 2 3

    1 2

    3

    : 2 3

    : 7

    2

    3 2 5

    , 0

    unrestricted in sign

    Maximize Z x x x

    subject to x x x

    x x x

    x x x

    x x

    x

    = +

    + +

    +

    =

  • 8/3/2019 4-Optimization Linear Programming

    27/71

    2011 K. English 27

    Convert into Standard Form (5 min)

    1 2

    1 2

    1 2

    1 2

    : 4 50: 2

    2 8

    , 0

    Minimize Z x x subject to x x

    x x

    x x

    = +

    +

  • 8/3/2019 4-Optimization Linear Programming

    28/71

    2011 K. English 28

    Convert into Standard Form (5 min)

    1 2

    1 2 3

    1 2 4

    1 2 3 4

    : 4 50

    : 2

    2 8

    , , , 0

    Minimize Z x x

    subject to x x x

    x x x

    x x x x

    = +

    + =

    + + =

    1 2

    1 2 3

    1 2 4

    1 2 3 4

    : 4 50

    : 22 8

    , , , 0

    Minimize Z x x

    subject to x x x x x x

    x x x x

    = +

    + =

    + + =

  • 8/3/2019 4-Optimization Linear Programming

    29/71

    2011 K. English 29

    Convert into Standard Form (5 min)

    1 2

    1 2

    1

    : 2 4

    : 2 2

    0

    Minimize f x x subject to x x

    x

    = +

    +

  • 8/3/2019 4-Optimization Linear Programming

    30/71

    2011 K. English 30

    Convert into Standard Form (5 min)

    1 2

    1 2

    1

    : 2 4

    : 2 2

    0

    Minimize f x x

    subject to x x

    x

    = +

    +

    1 3 4

    1 3 4

    1 3 4

    2 3 4

    : 2 4( )

    : 2 ( ) 2

    , , 0

    Minimize f x x x

    subject to x x x

    x x x

    x x x

    = +

    +

    =

  • 8/3/2019 4-Optimization Linear Programming

    31/71

    2011 K. English 31

    Convert into Standard Form (5 min)

    1 2

    1 2

    1

    : 2 4

    : 2 2

    0

    Minimize f x x

    subject to x x

    x

    = +

    +

    1 3 4

    1 3 4 5

    1 3 4 5

    2 3 4

    : 2 4( )

    : 2 ( ) 2

    , , , 0

    Minimize f x x x

    subject to x x x x

    x x x x

    x x x

    = +

    + =

    =

  • 8/3/2019 4-Optimization Linear Programming

    32/71

    2011 K. English 32

    Convert into Standard Form (5 min)

    1 2

    1 2

    1

    : 2 4

    : 2 2

    0

    Minimize f x x

    subject to x x

    x

    = +

    +

    1 3 4

    1 3 4 5

    1 3 4 5

    : 2 4 4

    : 2 2

    , , , 0

    Minimize f x x x

    subject to x x x x

    x x x x

    = +

    + =

  • 8/3/2019 4-Optimization Linear Programming

    33/71

    2011 K. English 33

    SOLUTION OF LINEAR

    PROGRAMMING PROBLEMS

  • 8/3/2019 4-Optimization Linear Programming

    34/71

    2011 K. English 34

    Standard Form

    Minimize : Z=

    c1x1+

    c2x2+!+

    cnxn

    subject to : a11x

    1+ a

    12x

    2+!+ a

    1nx

    n= b

    1

    a21x

    1+ a

    22x

    2+!+ a

    2nx

    n= b

    2

    "

    am1x

    1+ a

    m2x

    2+!+ a

    mnx

    n= b

    m

    x1 ! 0,x2 ! 0 ! xn ! 0

    b1! 0,b

    2! 0 ! b

    m! 0

  • 8/3/2019 4-Optimization Linear Programming

    35/71

    2011 K. English 35

    Principles of the Simplex Method

    n The general form poses the problem as m equations andn variables

    n If there are more variables than equations (i.e., m

  • 8/3/2019 4-Optimization Linear Programming

    36/71

    2011 K. English 36

  • 8/3/2019 4-Optimization Linear Programming

    37/71

    2011 K. English 37

    Example Problem

    X1

    X2

    X3

    X4

    b

    1 -1 1 0 = -5

    1 2 0 1 = 8

    -4 -1 0 0 = f-50

    Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1 + 2x2 " 8x

    1# 0 x

    2# 0

  • 8/3/2019 4-Optimization Linear Programming

    38/71

    2011 K. English 38

    Example Problem

    X1

    X2

    X3

    X4

    b

    1 -1 1 0 = -5

    1 2 0 1 = 8

    -4 -1 0 0 = f-50

    Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1 + 2x2 " 8x

    1# 0 x

    2# 0Not Canonical

  • 8/3/2019 4-Optimization Linear Programming

    39/71

    2011 K. English 39

    Example Problem

    X1

    X2

    X3

    X4

    b

    1 -1 1 0 = -5

    1 2 0 1 = 8

    -4 -1 0 0 = f-50

    Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1 + 2x2 " 8x

    1# 0 x

    2# 0Not Canonical

    Multiply by -1

  • 8/3/2019 4-Optimization Linear Programming

    40/71

    2011 K. English 40

    Example Problem

    X1

    X2

    X3

    X4

    b

    1 -1 1 0 = -5

    1 2 0 1 = 8

    -4 -1 0 0 = f-50

    Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1 + 2x2 " 8x

    1# 0 x

    2# 0Not Canonical

    X1 X2 X3 X4 b

    -1 1 -1 0 = 5

    1 2 0 1 = 8

    -4 -1 0 0 = f-50

    Multiply by -1

  • 8/3/2019 4-Optimization Linear Programming

    41/71

    2011 K. English 41

    Example Problem

    X1

    X2

    X3

    X4

    b

    1 -1 1 0 = -5

    1 2 0 1 = 8

    -4 -1 0 0 = f-50

    Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1 + 2x2 " 8x

    1# 0 x

    2# 0Not Canonical

    X1 X2 X3 X4 b

    -1 1 -1 0 = 5

    1 2 0 1 = 8

    -4 -1 0 0 = f-50

    Multiply by -1Not Canonical

  • 8/3/2019 4-Optimization Linear Programming

    42/71

    2011 K. English 42

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    X1

    X2

    X3

    X4

    b

    -1 1 -1 0 = 5

    1 2 0 1 = 8

    -4 -1 0 0 = f-50

    Not Canonical

    Add artificial variable, X5

    X1

    X2

    X3

    X4 X

    5 b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

  • 8/3/2019 4-Optimization Linear Programming

    43/71

    2011 K. English 43

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    X1

    X2

    X3

    X4

    b

    -1 1 -1 0 = 5

    1 2 0 1 = 8

    -4 -1 0 0 = f-50

    Not Canonical

    Add artificial variable, X5

    X1

    X2

    X3

    X4

    X5

    b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

  • 8/3/2019 4-Optimization Linear Programming

    44/71

    2011 K. English 44

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    X1

    X2

    X3

    X4

    b

    -1 1 -1 0 = 5

    1 2 0 1 = 8

    -4 -1 0 0 = f-50

    Not Canonical

    Add artificial variable, X5Add temporary objective function, w, as a measure of infeasibilityw is the sum of the artificial variables

    X1

    X2

    X3

    X4

    X5

    b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    0 0 0 0 1 = w

  • 8/3/2019 4-Optimization Linear Programming

    45/71

    2011 K. English 45

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    X1

    X2

    X3

    X4

    b

    -1 1 -1 0 = 5

    1 2 0 1 = 8

    -4 -1 0 0 = f-50

    Not Canonical

    X1

    X2

    X3

    X4

    X5

    b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    0 0 0 0 1 = w

    Add artificial variable, X5Add temporary objective function, w, as a measure of infeasibilityw is the sum of the artificial variables

  • 8/3/2019 4-Optimization Linear Programming

    46/71

    2011 K. English 46

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    X1

    X2

    X3

    X4

    b

    -1 1 -1 0 = 5

    1 2 0 1 = 8

    -4 -1 0 0 = f-50

    Not Canonical

    X1

    X2

    X3

    X4

    X5

    b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    0 0 0 0 1 = w

    Not Canonical

    Add artificial variable, X5Add temporary objective function, w, as a measure of infeasibilityw is the sum of the artificial variables

  • 8/3/2019 4-Optimization Linear Programming

    47/71

    2011 K. English 47

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    X1 X2 X3 X4 X5 b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    0 0 0 0 1 = w

    Not Canonical

    Subtract row 1 from row 4 to get canonical formX

    1X

    2X

    3X

    4X

    5b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    0-(-1) 0-1 0-(-1) 0-0 1-1 = w-5

  • 8/3/2019 4-Optimization Linear Programming

    48/71

    2011 K. English 48

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    X1 X2 X3 X4 X5 b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    0 0 0 0 1 = w

    Not Canonical

    Subtract row 1 from row 4 to get canonical formX

    1X

    2X

    3X

    4X

    5b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

  • 8/3/2019 4-Optimization Linear Programming

    49/71

    2011 K. English 49

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    X2 will enter the basis (only negative coefficient and we are minimizing the objective function)

    X1 X2 X3 X4 X5 b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

    X1

    X2

    X3

    X4

    X5

    b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

  • 8/3/2019 4-Optimization Linear Programming

    50/71

    2011 K. English 50

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    X2 will enter the basis (only negative coefficient and we are minimizing the objective function)Calculating the b/a ratios shows that row 2 has the minimum value and X4 will leave the basis

    X1 X2 X3 X4 X5 b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

    X1

    X2

    X3

    X4

    X5

    b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

    5/1=5

    8/2=4

  • 8/3/2019 4-Optimization Linear Programming

    51/71

    2011 K. English 51

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    Divide row 2 by 2 to get the coefficient for X2 to be 1

    X1 X2 X3 X4 X5 b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

    5/1=5

    8/2=4

    X1

    X2

    X3

    X4

    X5

    b

    -1 1 -1 0 1 = 5

    =0.5 2/2=1 0/2=0 =0.5 0/2=0 = 8/2=4

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

  • 8/3/2019 4-Optimization Linear Programming

    52/71

    2011 K. English 52

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    Divide row 2 by 2 to get the coefficient for X2 to be 1

    X1 X2 X3 X4 X5 b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

    5/1=5

    8/2=4

    X1

    X2

    X3

    X4

    X5

    b

    -1 1 -1 0 1 = 5

    0.5 1 2=0 0.5 0 = 4

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

  • 8/3/2019 4-Optimization Linear Programming

    53/71

    2011 K. English 53

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    Divide row 2 by 2 to get the coefficient for X2 to be 1Subtract the new row 2 from row 1

    X1 X2 X3 X4 X5 b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

    5/1=5

    8/2=4

    X1

    X2

    X3

    X4

    X5

    b

    -1-0.5=-1.5 1-1=0 -1-0=-1 0-0.5=-0.5 1-0=1 = 5-4=1

    0.5 1 0 0.5 0 = 4

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

  • 8/3/2019 4-Optimization Linear Programming

    54/71

    2011 K. English 54

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    Divide row 2 by 2 to get the coefficient for X2 to be 1Subtract the new row 2 from row 1Add the new row 2 to row 3

    X1 X2 X3 X4 X5 b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

    5/1=5

    8/2=4

    X1

    X2

    X3

    X4

    X5

    b

    -1.5 0 -1 -0.5 1 = 1

    0.5 1 0 0.5 0 = 4

    -4+0.5=-3.5 -1+1=0 0+0=0 0+0.5=0.5 0+0=0 = f-50+4=f-46

    1 -1 1 0 0 = w-5

  • 8/3/2019 4-Optimization Linear Programming

    55/71

    2011 K. English 55

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    Divide row 2 by 2 to get the coefficient for X2 to be 1Subtract the new row 2 from row 1Add the new row 2 to row 3Add the new row 2 to row 4

    X1 X2 X3 X4 X5 b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

    5/1=5

    8/2=4

    X1

    X2

    X3

    X4

    X5

    b

    -1.5 0 -1 -0.5 1 = 1

    0.5 1 0 0.5 0 = 4

    -3.5 0 0 0.5 0 = f-46

    1+0.5=1.5 -1+1=0 1+0=1 0+0.5=0.5 0+0=0 = w-5+4=w-1

  • 8/3/2019 4-Optimization Linear Programming

    56/71

    2011 K. English 56

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    Divide row 2 by 2 to get the coefficient for X2 to be 1Subtract the new row 2 from row 1Add the new row 2 to row 3Add the new row 2 to row 4

    X1 X2 X3 X4 X5 b

    -1 1 -1 0 1 = 5

    1 2 0 1 0 = 8

    -4 -1 0 0 0 = f-50

    1 -1 1 0 0 = w-5

    5/1=5

    8/2=4

    X1

    X2

    X3

    X4

    X5

    b

    -1.5 0 -1 -0.5 1 = 1

    0.5 1 0 0.5 0 = 4

    -3.5 0 0 0.5 0 = f-46

    1.5 0 1 0.5 0 = w-1

  • 8/3/2019 4-Optimization Linear Programming

    57/71

    2011 K. English 57

    Example Problem Min f (!

    x) = !4x1! x

    2+50

    s.t. g1(!

    x) = x1! x

    2" !5

    g2(!

    x) = x1+ 2x

    2" 8

    x1# 0 x

    2# 0

    All coefficients in row 4 are positive, so w cannot be decreased furtherX5 still has a valueThis tells us that a basic feasible solution to the original problem (without the artificial variable)cannot be found

    X1

    X2

    X3

    X4

    X5

    b

    -1.5 0 -1 -0.5 1 = 1

    0.5 1 0 0.5 0 = 4

    -3.5 0 0 0.5 0 = f-46

    1.5 0 1 0.5 0 = w-1

  • 8/3/2019 4-Optimization Linear Programming

    58/71

    2011 K. English 58

    Simplex Process for minimization

    n Phase I1. Add artificial variables as necessary to achieve canonical form

  • 8/3/2019 4-Optimization Linear Programming

    59/71

    2011 K. English 59

    Simplex Process for minimization

    n Phase I1. Add artificial variables as necessary to achieve canonical form2. Create a new objective function (w) equal to the sum of the

    artificial variables

  • 8/3/2019 4-Optimization Linear Programming

    60/71

    2011 K. English 60

    Simplex Process for minimization

    n Phase I1. Add artificial variables as necessary to achieve canonical form2. Create a new objective function (w) equal to the sum of the

    artificial variables

    3. Minimize using Phase II approaches

  • 8/3/2019 4-Optimization Linear Programming

    61/71

    2011 K. English 61

    Simplex Process for minimization

    n Phase I1. Add artificial variables as necessary to achieve canonical form2. Create a new objective function (w) equal to the sum of the

    artificial variables

    3. Minimize using Phase II approachesn If w cannot be reduced to zero, the solution to

    the original problem does not exist.

    n If w has been reduced to zero, delete theartificial variables and the artificial objective (w)from the system and proceed with Phase II

  • 8/3/2019 4-Optimization Linear Programming

    62/71

    2011 K. English 62

    Simplex Process for minimization

    n Phase II

  • 8/3/2019 4-Optimization Linear Programming

    63/71

    2011 K. English 63

    Simplex Process for minimization

    n Phase II1. Find the minimum ci, i=1,n.

    Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5

  • 8/3/2019 4-Optimization Linear Programming

    64/71

    2011 K. English 64

    Simplex Process for minimization

    n Phase II1. Find the minimum ci, i=1,n.

    Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5

    2. If ck is negative Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element

  • 8/3/2019 4-Optimization Linear Programming

    65/71

    2011 K. English 65

    Simplex Process for minimization

    n Phase II1. Find the minimum ci, i=1,n.

    Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5

    2. If ck is negative Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element

    3. Pivot on ark. Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr

  • 8/3/2019 4-Optimization Linear Programming

    66/71

    2011 K. English 66

    Simplex Process for minimization

    n Phase II1. Find the minimum ci, i=1,n.

    Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5

    2. If ck is negative Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element

    3. Pivot on ark. Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr

    4. Go to step 1 and repeat

  • 8/3/2019 4-Optimization Linear Programming

    67/71

    2011 K. English 67

    Simplex Process for minimization

    n Phase II1. Find the minimum ci, i=1,n.

    Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5

    2. If ck is negative Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element

    3. Pivot on ark. Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr

    4. Go to step 1 and repeat5. The solution is complete

  • 8/3/2019 4-Optimization Linear Programming

    68/71

    2011 K. English 68

    Simplex Process for minimization

    n Phase II1. Find the minimum ci, i=1,n.

    Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5

    2. If ck is negative Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element

    3. Pivot on ark. Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr

    4. Go to step 1 and repeat5. The solution is complete

    a) If all associated with non-basic variables are positive, the solution is unique

  • 8/3/2019 4-Optimization Linear Programming

    69/71

    2011 K. English 69

    Simplex Process for minimization

    n Phase II1. Find the minimum ci, i=1,n.

    Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5

    2. If ck is negative Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element

    3. Pivot on ark. Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr

    4. Go to step 1 and repeat5. The solution is complete

    a) If all associated with non-basic variables are positive, the solution is uniqueb) If some associated with a non-basic variable is zero, the solution is not unique

  • 8/3/2019 4-Optimization Linear Programming

    70/71

    2011 K. English 70

    Simplex Process for minimization

    n Phase II1. Find the minimum ci, i=1,n.

    Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5

    2. If ck is negative Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element

    3. Pivot on ark. Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr

    4. Go to step 1 and repeat5. The solution is complete

    a) If all associated with non-basic variables are positive, the solution is uniqueb) If some associated with a non-basic variable is zero, the solution is not uniquec) If some is negative, the solution is unbounded

  • 8/3/2019 4-Optimization Linear Programming

    71/71

    Group Problem (In-Class)A company has 2 grades of inspectors, who are to be assigned to a

    quality control inspection process. It is required that at least 1800 piecesbe inspected per 8 hour day.

    n Grade 1 inspectors can check pieces at the rate of 25 per hour, with anaccuracy of 98%.

    n Grade 2 inspectors can check pieces at the rate of 15 per hour with anaccuracy of 95%.

    n The wage rate of a Grade 1 inspector is $40 per hour, while a Grade2inspector earns $30 per hour.

    n Each error made by an inspector costs the company $20.n The company has available 8 Grade 1 inspectors and 10 Grade 2

    inspectors.

    What is the optimal assignment of inspectors that will minimize the totalcost of inspection?