29
Linear Programming (LP)

201502271502001 INTRO TO LP.ppt

Embed Size (px)

Citation preview

  • Linear Programming (LP)

  • LP ProblemThe maximization or minimization of some quantity is the objective in all linear programming problems.All LP problems have constraints that limit the degree to which the objective can be pursued.A feasible solution satisfies all the problem's constraints.

  • LP ProblemAn optimal solution is a feasible solution that results in the largest possible objective function value when maximizing (or smallest when minimizing).

    A graphical solution method can be used to solve a linear program with two variables.

  • LP ProblemIf both the objective function and the constraints are linear, the problem is referred to as a linear programming problem.

    Linear functions are functions in which each variable appears in a separate term raised to the first power and is multiplied by a constant (which could be 0).

  • LP ProblemLinear constraints are linear functions that are restricted to be "less than or equal to", "equal to", or "greater than or equal to" a constant.

  • Guidelines for Model FormulationUnderstand the problem thoroughly.Define the decision variables.Write the objective in terms of the decision variables.Write the constraints in terms of the decision variables.Identify any upper or lower bounds on the decision variables.

  • MAX (or MIN): c1X1 + c2X2 + + cnXn

    Subject to:a11X1 + a12X2 + + a1nXn b1:ak1X1 + ak2X2 + + aknXn bk :am1X1 + am2X2 + + amnXn = bm General form of a LP problemX1 0, X2 0, X3 0, . . . , Xn 0.

  • Problem: Cempaka ToursCempaka Tours has RM420,000 that may be used to purchase new rental boats for hire. The boats can be purchased from two different manufacturers.

  • Problem: Cempaka ToursCempaka Tours would like to purchase at least 50 boats and would like to purchase the same number from Gagah Sdn Bhd as from Anggun Sdn Bhd to maintain goodwill.

  • Problem: Cempaka ToursAt the same time, Cempaka Tours wishes to have a total seating capacity of at least 200. Pertinent data concerning the boats are summarized on the next slide. Formulate this problem as a linear program.

  • Problem: Cempaka ToursData Maximum Expected Boat Builder Cost Seating Daily Profit

    Speedhawk Gagah RM6,000 3 RM70Silverbird Gagah RM7,000 5 RM80Catman Anggun RM5,000 2 RM50Classy Anggun RM9,000 6 RM110

  • Problem: Cempaka ToursDefine the decision variables x1 = number of Speedhawks ordered x2 = number of Silverbirds ordered x3 = number of Catmans ordered x4 = number of Classys ordered

    Define the objective function Maximize total expected daily profit: Max: (Expected daily profit per unit) x (Number of units) Max: 70x1 + 80x2 + 50x3 + 110x4

  • Problem: Cempaka ToursDefine the constraints(1) Spend no more than RM420,000: 6000x1 + 7000x2 + 5000x3 + 9000x4 < 420,000

    (2) Purchase at least 50 boats: x1 + x2 + x3 + x4 > 50

    (3) Number of boats from Gagah equals number of boats from Anggun: x1 + x2 = x3 + x4 or x1 + x2 - x3 - x4 = 0

  • Problem: Cempaka ToursDefine the constraints (continued) (4) Capacity at least 200: 3x1 + 5x2 + 2x3 + 6x4 > 200

    Nonnegativity of variables: xj > 0, for j = 1,2,3,4

  • Problem: Cempaka ToursThe Complete Model Max 70x1 + 80x2 + 50x3 + 110x4 subject to 6000x1 + 7000x2 + 5000x3 + 9000x4 < 420,000 x1 + x2 + x3 + x4 > 50 x1 + x2 - x3 - x4 = 0 3x1 + 5x2 + 2x3 + 6x4 > 200 x1, x2, x3, x4 > 0

  • Problem: Cempaka ToursCempaka Tours problem can be solved by usingSimplex Method (Tablo)DS For WindowsTORAExcel SolverGraphs? (4 dimensions! Possible?)Etc.

  • Problem: Cempaka ToursThe Model Output

    OBJECTIVE FUNCTION VALUE = 5040.000

    Variable Value Reduced Cost x1 28.000 0.000 x2 0.000 2.000 x3 0.000 12.000 x4 28.000 0.000 Constraint Slack/Surplus Dual Price 1 0.000 0.012 2 6.000 0.000 3 0.000 -2.000 4 52.000 0.000

  • Problem: Cempaka ToursSolution SummaryPurchase 28 Speedhawks from Gagah.Purchase 28 Classys from Anggun.Total expected daily profit is RM5,040.00.The minimum number of boats was exceeded by 6 (surplus for constraint 2).The minimum seating capacity was exceeded by 52 (surplus for constraint 4).

  • LP ProblemIn the next class we will discuss how to solve LP by many different ways.Choose an example of LP problem.Find out how to solve the problem by using tablo (simplex method).

    Ill pick someone and ask him/her to explain his/her example to the class.

  • Blending ProblemPeto Sdn Bhd receives four raw grains from which it blends its dry pet food. The pet food advertises that each 500g can meets the minimum daily requirements for vitamin C, protein and iron.

  • Blending ProblemPeto is interested in producing the 500g mixture at minimum cost while meeting the minimum daily requirements of 6 units of vitamin C, 5 units of protein, and 5 units of iron.

  • Blending ProblemThe cost of each raw grain as well as the vitamin C, protein, and iron units per kg of each grain are summarized on the next slide.

  • Blending Problem

    Vitamin C Protein Iron Grain Units/kg Units/kg Units/kg Cost/kg

    1 9 12 0 .75 2 16 10 14 .90 3 8 10 15 .804 10 8 7 .70

  • Blending ProblemDefine the decision variables

    xj = the weight (kg) of grain j (j = 1, 2, 3, 4) used in the 500g mixture

    Define the objective function Minimize the total cost for a 500g mixture:

    MIN 0.75x1 + 0.90x2 + 0.80x3 + 0.70x4

  • Blending ProblemDefine the constraints

    Total weight of the mix is 500g (0.5kg): (1) x1 + x2 + x3 + x4 = 0.5Total amount of Vitamin C in the mix is at least 6 units: (2) 9x1 + 16x2 + 8x3 + 10x4 > 6Total amount of protein in the mix is at least 5 units: (3) 12x1 + 10x2 + 10x3 + 8x4 > 5Total amount of iron in the mix is at least 5 units: (4) 14x2 + 15x3 + 7x4 > 5 Nonnegativity of variables: xj > 0 for all j

  • The complete model subject to x1 + x2 + x3 + x4 = 0.5 9x1 + 16x2 + 8x3 + 10x4 > 6 12x1 + 10x2 + 10x3 + 8x4 > 5 14x2 + 15x3 + 7x4 > 5x1 >, x2, x3, x4 > 0 MIN 0.75x1 + 0.90x2 + 0.80x3 + 0.70x4

  • The Model Output

    OBJECTIVE FUNCTION VALUE = 0.406

    VARIABLE VALUE REDUCED COSTS X1 0.099 0.000 X2 0.213 0.000 X3 0.088 0.000 X4 0.099 0.000

    Thus, the optimal blend is about 0.10 kg of grain 1, 0.21 kg of grain 2, 0.09 kg of grain 3, and 0.10 kg of grain 4. The mixture costs Peto 40.6 cents.Blending Problem

  • Solution Summary Thus, the optimal blend is about 0.10kg of grain 1, 0.21kg of grain 2,0.09kg of grain 3, and 0.10kg of grain 4.

    The mixture costs Peto 40.6 cents.Blending Problem

  • Food of thoughtGo down deep enough into anything and you will find mathematics.

    ***********************