23+ +linear+programming

Upload: gaurav-agarwal

Post on 07-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 23+ +Linear+Programming

    1/28

    Quantitative Methods - 2010

    Linear Programming (LP)

    1QM 2010 - Transcend

    George Dantzig

    Father of Linear Programming

  • 8/3/2019 23+ +Linear+Programming

    2/28

    Preliminary

    Programming in the OR sense means to find

    the values for several variables. (Not to beconfused with computer coding).

    LP is part of a larger field called MathematicalProgramming (MP)

    Objective of LP is to optimize (maximize orminimize) a function of several variables, subject

    to constraints on these variables.

    Huge variety of very large, practical problems canbe expressed and solved as LP problems

    QM 2010 - Transcend 2

  • 8/3/2019 23+ +Linear+Programming

    3/28

    Motivating Scenario

    (Finance)

    An NBFC is considering investing in shares of 2companies, A and B.

    Current price per share: A: Rs.250, B: Rs.160

    Expected annual returns per share are: A: Rs. 45

    B: Rs. 37

    NBFC internal limit for this industry: Rs. 10 L SEBI limits: A 3000 shares; B 4000 shares

    Question: How many shares to buy in A and B?

    QM 2010 - Transcend 3

  • 8/3/2019 23+ +Linear+Programming

    4/28

    Motivating Scenario

    (Advertizing) A marketing manager is considering 2 different

    media, A and B, for promotion of a product.

    Cost per insertion in each is known Medium A: Rs. 25,000; Medium B: Rs. 36,000

    Expected no. of prospects per insertion Medium A: 7 L; Medium B: 9 L

    Ad budget: Rs.350,000

    Ad availability Medium A: 4 insertions; Medium B: 6 insertions

    Question: How many insertions in A, B?

    QM 2010 - Transcend 4

  • 8/3/2019 23+ +Linear+Programming

    5/28

    Motivating Scenario

    (Distribution)

    Product availability (no. of cartons) at our

    warehouses in

    Sangli: 700; Lonavla: 450; Palghar: 800

    Requirements at our customers in

    Vapi: 630; Nasik: 750; Bombay: 570

    Transport costs from each to each are known.

    Question: How much to send from which

    warehouse to which customer?

    QM 2010 - Transcend 5

  • 8/3/2019 23+ +Linear+Programming

    6/28

    General LP Problem

    QM 2010 - Transcend 6

  • 8/3/2019 23+ +Linear+Programming

    7/28

    General Structure

    We have

    n decision variables: x1 --- xn An objective function to be optimized involving the

    decision variables: Z = c1x1 + --- +cnxn A set of constraints involving the decision variables:

    a11x1 + a12x2 - - - +a1nxn b1 a21x1 + a22x2 - - - +a2nxn b2

    - - - - - - - - - -

    am1x1 + am2x2 - - - +amnxn bm

    For solving, we have to add non-negativity constraints:

    All x 0

    QM 2010 - Transcend 7

  • 8/3/2019 23+ +Linear+Programming

    8/28

    Structure for 2 Decision Variables

    We have

    2 decision variables: x1 and x2 An objective function to be optimized involving the 2

    decision variables: Z = c1x1 + c2x2 A set of constraints involving the decision variables:

    a11x1 + a12x2 b1 a21x1 + a22x2 b2

    - - - - - - -

    am1x1 + am2x2 bm

    For solving, we have to add non-negativity constraints:

    All x 0

    QM 2010 - Transcend 8

  • 8/3/2019 23+ +Linear+Programming

    9/28

    Graphical Representation(Maximizing Z - For 2 Decision Variables)

    QM 2010 - Transcend 9

    a11x1 + a12x2 b1

    a21

    x1

    + a22

    x2 b

    2

    a31x1 + a32x2 b3

    x1

    x2

    Z = c1x1 + c2x2

    Feasible Region

    Solution is x1 = x1*, and x2 = x2*

    (x1*, x2*)

  • 8/3/2019 23+ +Linear+Programming

    10/28

    Graphical Representation(Minimizing Z - For 2 Decision Variables)

    QM 2010 - Transcend 10

    x1

    x2

    (x1*, x2*)

    Solution is x1 = x1*, and x2 = x2*

  • 8/3/2019 23+ +Linear+Programming

    11/28

    Formulating A (2 Variable) LP Problem

    Identify your decision variables

    Let x1 = no of shares of A; x2 = no of shares of B

    Write objective function

    Maximize Z = 45x1 + 37x2 Write constraints

    250x1 + 180x2 10 L ---- investment constraint

    X1 + x2 4500 ----- SEBI constraint

    Add non-negativity constraints

    X1, x2 0

    QM 2010 - Transcend 11

  • 8/3/2019 23+ +Linear+Programming

    12/28

    Plotting The Constraints

    Estimate range of variables and draw axes

    X1: 0 to 4500, x2: 0 to 6000

    Take any 2 arbitrary x1 in this range, write

    constraints as equations, solve for x2 (1) 250(1000) + 160(x2) = 10 L; x2 = 4687

    250(3000) + 160(x2) = 10 L; x2 = 1563

    (2) x1 = 3000 (3) x2 = 4000

    Plot the constraints lines

    QM 2010 - Transcend 12

  • 8/3/2019 23+ +Linear+Programming

    13/28

    Feasible Region For NBFC Problem

    QM 2010 - Transcend 13

    x1

    x2

    250(x1) + 160 (x2) = 10 L

    X1 = 3000

    X2 = 4000

    0 1000 2000 3000 6000

    0

    10

    00

    2000

    3000

    6000

  • 8/3/2019 23+ +Linear+Programming

    14/28

  • 8/3/2019 23+ +Linear+Programming

    15/28

    Objective Function

    On Feasible region

    QM 2010 - Transcend 15

    x1

    x2

    250(x1) + 160 (x2) = 10 L

    X1 = 3000

    X2 = 4000

    A

    Z = 85,000

  • 8/3/2019 23+ +Linear+Programming

    16/28

    Final Solution

    Moving the Z line parallely up, we can see that the Zline thru point A will have a higher value than thru anyother point in the Feasible Region.

    Calculate the coordinates of A:

    Clearly, x2 of A = 4000 Put this value in the other line equation, to get x1 for A

    250(x1) + 160(4000) = 10 L, so x1 = 3.60 L/250 = 1440

    Find Z at A, by putting x1 = 1440, x2 = 4000 in Zequation Z = 45(1440) + 40(4000) = 224,800

    Thus Max Z = 224,800, and solution is x1 = 1440, x2 =4000

    QM 2010 - Transcend 16

  • 8/3/2019 23+ +Linear+Programming

    17/28

    Illustrating Final Solution

    QM 2010 - Transcend 17

    x1

    x2

    250(x1) + 160 (x2) = 10 L

    X1 = 3000

    X2 = 4000

    A

    Z = 85,000

    Z = 2,24,800

  • 8/3/2019 23+ +Linear+Programming

    18/28

    Verification Of Final Solution

    Point B has x1 = 3000 and x2 = 1563

    Z at that point = 45(3000) + 40(1563) = 197,520

    This less than the Z at A

    All other points will have even less Z

    So clearly Z at A is the maximum value, and

    coordinates of A is the solution.

    QM 2010 - Transcend 18

  • 8/3/2019 23+ +Linear+Programming

    19/28

    Transportation Problem

    (Special Case Of General LP Problem)

    QM 2010 - Transcend 19

  • 8/3/2019 23+ +Linear+Programming

    20/28

    General Structure

    We have mxn table of m sources and n destinations. Table entries are transportation costs cij (per unit of some

    item) from each destination to each source

    Row totals Ai are availabilities at the sources

    Column totals Rj are requirements at the destinations

    We have mxn decision variables (how much to ship) : x11 --- xmn An objective function to be optimized involving the

    decision variables: Z = c11x11 + --- +cmnxmn Constraints are shipments

    Must not violate any availabilities

    Must meet all requirements

    QM 2010 - Transcend 20

  • 8/3/2019 23+ +Linear+Programming

    21/28

    Transportation LP Table

    QM 2010 - Transcend 21

    Available

    d1 d2 --- --- dn

    s1 c11 c12 c1n A1s2 c21 A2

    Sources --- ---

    --- ---

    sm cm1 cmn Am

    Required R1 R2 --- --- Rm

    Destinations

  • 8/3/2019 23+ +Linear+Programming

    22/28

    Transportation LP Solution Table

    QM 2010 - Transcend 22

    Available

    d1 d2 --- --- dn

    s1 x11 x12 x1n A1

    s2 x21 A2

    Sources --- ---

    --- ---

    sm xm1 xmn Am

    Required R1 R2 --- --- Rm

    Destinations

    X in rows must add up to Availability

    X in columns must add up to Required

    Some X can be zero.

  • 8/3/2019 23+ +Linear+Programming

    23/28

    Try This Yourself

    Cartons of milk powder are stored in 3 warehouses asfollows: Sangli: 700; Lonavla: 450; Palghar: 800

    They are required at 3 customers as follows:

    Vapi: 630; Nasik: 750; Bombay: 570 Transport costs per carton are as follows:

    Suggest 3 distribution plans, and work out total cost foreach plan.

    QM 2010 - Transcend 23

    Vapi Nasik Bombay

    Sangli 5 4 2

    Lonavla 7 5 3

    Palghar 2 8 6

  • 8/3/2019 23+ +Linear+Programming

    24/28

    Assignment Problem

    (Another Special Case Of General LP Problem)

    QM 2010 - Transcend 24

  • 8/3/2019 23+ +Linear+Programming

    25/28

  • 8/3/2019 23+ +Linear+Programming

    26/28

    Assignment Problem Table

    QM 2010 - Transcend 26

    m1 m2 --- --- mmj1 c11 c12 c1n

    j2 c21

    Jobs ---

    ---

    jm cm1 cmn

    Machines

  • 8/3/2019 23+ +Linear+Programming

    27/28

    Assignment Problem Solution Table

    QM 2010 - Transcend 27

    m1 m2 --- --- mm

    j1 x11 x12 x1n

    j2 x21

    Jobs ---

    ---

    jm xm1 xmn

    Machines

    There can be only one 1 in each row

    and in each column.

    All other entries must be 0

  • 8/3/2019 23+ +Linear+Programming

    28/28

    End Of

    Linear Programming

    QM 2010 - Transcend 28