03 linear programming

Upload: faisal-anggarda

Post on 04-Jun-2018

237 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 03 Linear Programming

    1/31

    Operations Research

    Introduction toLinear Programming

    1

  • 8/14/2019 03 Linear Programming

    2/31

    Linear Programming

    A linear programming (LP) is a tool for solvingoptimization problems.The founders of the subject are Leonid Kantorovich, aRussian mathematician who developed linearprogramming problems in 1939.

    George Dantzig (1947) developed an efficientmethod, simplex algorithm for solving LP.

    Since the development of the simplex algorithm, LPproven to be one of the most effective operationsresearch tools.

    LP has been used to solve optimization problems inthe following areas: military, industry, agriculture,transportation, economics, health systems, and evenbehavioral and social sciences.

    2

  • 8/14/2019 03 Linear Programming

    3/31

    Linear Programming

    A linear programming problem (LP) is anoptimization problem for which wedo thefollowing:

    1. We attempt to maximize (or minimize) a linearfunction(called the objective function) of the

    decision variables.2. The values of the decision variables must satisfy a set

    of constraints. Each constraint must be a linearequation or linear inequality.

    3. A sign restriction is associated with each variable. Forany variablexi, the sign restriction specifies thatximust be either nonnegative (xi 0) or unrestricted insign (URS).

    3

  • 8/14/2019 03 Linear Programming

    4/31

    Concept of Linear Function and Linear

    Inequality

    For example,f(x1,x2) = 2x1+ x2is a linear function ofx1andx2,

    butf(x1,x2) =x1x2is not a linear function ofx1andx22

    Thus, 2x1+ 3x2 3 and 2x1+ x2 3 are linear inequalities,

    Butx1x2 3is not a linear inequality2

    4

  • 8/14/2019 03 Linear Programming

    5/31

    Example 1: GiapettosWoodcarving

    GiapettosWoodcarving, Inc., manufactures twotypes of wooden toys: soldiers and trains.

    Each soldier built: Sells for $27 and uses $10 worth of raw materials.

    Labor and overhead costs by $14.

    A soldier requires 2 hours of finishing labor and 1 hour ofcarpentry labor.

    Each train built: Sells for $21 and uses $9 worth of raw materials.

    Labor and overhead costs by $10.

    A train requires 1 hour of finishing labor and 1 hour ofcarpentry labor.

    5

  • 8/14/2019 03 Linear Programming

    6/31

    Example 1 continued

    Each week, Giapetto can obtain all the neededraw material but only 100 finishing hours and 80carpentry hours.

    Demand for trains is unlimited, but at most 40

    soldiers are bought each week.Giapetto wants to maximize weekly profit(revenues - costs).

    Formulate a mathematical model of Giapettossituation that can be used to maximize Giapettos

    weekly profit.

    6

  • 8/14/2019 03 Linear Programming

    7/31

    Example 1 continued

    In developing the Giapetto model, we explore characteristics

    shared by all linear programming problems.

    Decision Variablesx1 = number of soldiers produced each week

    x2 = number of trains produced each week

    Objective Function

    Giapettosweekly revenues and costs can be expressed in terms ofthe decision variablesx1andx2

    Giapettosobjective function is:

    Maximizez = 3x1+ 2x2

    7

  • 8/14/2019 03 Linear Programming

    8/31

    Example 1 continued

    Constraints:Each week, no more than 100 hours of finishing

    time may be used.

    2x1

    +x2

    100

    Each week, no more than 80 hours of carpentry

    time may be used.

    x1+x2 80

    Because of limited demand, at most 40 soldiersshould be produced.

    x1 40

    8

  • 8/14/2019 03 Linear Programming

    9/31

    Nonnegativity/URS

    To complete the formulation of a linear programmingproblem, the following question must be answered for eachdecision variable:

    Can the decision variable only assume nonnegative

    values, or is the decision variable allowed to assume bothpositive and negative values?

    oIf a decision variablexican only assume nonnegative values,then we add the sign restrictionxi 0.

    oIf a variablexi can assume both positive and negative (orzero) values,then we say thatxiisunrestricted in sign (oftenabbreviated urs).

    9

  • 8/14/2019 03 Linear Programming

    10/31

    Example 1 continued

    Complete optimization model for GiapettosWoodcarving:

    Maximizez= 3x1+ 2x2

    Subject to (s.t.)2x1+x2 100

    x1+x2< 80

    x1 40

    x1, x2 0

    (objective function)

    (finishing constraint)

    (carpentry constraint)

    (constraint on demand for soldiers)

    (sign restriction)

    10

  • 8/14/2019 03 Linear Programming

    11/31

    Assumptions

    The fact that the objective function for an LP must bea linear function of the decision variables has twoimplications:

    The contribution of the objective function from each

    decision variable is proportional to the value of thedecision variable. For example, the contribution to theobjective function for 4 soldiers is exactly four times thecontribution of 1 soldier.

    The contribution to the objective functionfor anyvariable is independent of the other decision variables.For example, no matter what the value ofx2,themanufacture ofx1soldiers will always contribute 3x1dollars to the objective function.

    11

  • 8/14/2019 03 Linear Programming

    12/31

    Assumptions

    Analogously, the fact that each LP constraint must bea linear inequality or linear equation has twoimplications:

    The contribution of each variable to the left-hand side of

    each constraint is proportional to the value of thevariable. For example, it takes exactly 3 times as manyfinishing hours to manufacture 3 soldiers as it does 1soldier.

    The contribution of a variable to the left-hand side ofeach constraint is independent of the values of thevariable. For example, no matter what the value ofx1, themanufacture ofx2trains usesx2finishing hours andx2carpentry hours.

    12

  • 8/14/2019 03 Linear Programming

    13/31

    Assumptions

    The first item in each list is called theProportionality Assumption of Linear

    Programming.

    The second item in each list is called theAdditivity Assumption of Linear

    Programming.

    The divisibility assumption requires that

    each decision variable be permitted to

    assume fractional values.

    13

  • 8/14/2019 03 Linear Programming

    14/31

    Assumptions

    The certainty assumption is that eachparameter (objective function coefficients,right hand side, and technologicalcoefficients) are known with certainty.

    The feasible region of an LP is the set of allpoints satisfying all the LPs constraints andsign restrictions.

    For a maximization (minimization) problem,an optimal solution to an LP is a point in thefeasible region with the largest (smallest)objective function value.

    14

  • 8/14/2019 03 Linear Programming

    15/31

    Example 2: Diet Problem

    My diet requires that all the food I get comefrom one of the four basic food groups.

    At present, the following four foods are available

    for consumption: brownies, chocolate ice cream,cola and pineapple cheesecake.

    Each brownie costs 50, each scoop of ice cream

    costs 20 , each bottle of cola costs 30 , and

    each piece of pineapple cheesecake costs 80 .

    15

  • 8/14/2019 03 Linear Programming

    16/31

    Example 2 continued

    Each day, I need at least 500 calories, 6 oz of chocolate, 10

    oz of sugar, and 8 oz of fat.The nutritional content per unit of each food as follows:

    Formulate a linear programming model that can be used to

    satisfy my daily nutritional requirements at minimum cost. 16

  • 8/14/2019 03 Linear Programming

    17/31

    Example 2 continued

    Determining the decisions that must be made

    by the decision maker: how much of each type

    of food should be eaten daily.

    Decision variables:

    x1 = number of brownies eaten daily

    x2 = number of scoops of chocolate ice cream

    eaten daily

    x3 = bottles of cola drunk daily

    x4 = pieces of pineapple cheesecake eaten daily

    17

  • 8/14/2019 03 Linear Programming

    18/31

    Example 2 continued

    Objective is to minimize the cost of diet. The total

    cost of any diet may be determined from the

    following relation:

    (total cost of diet) = (cost of brownies) + (cost of ice

    cream) + (cost of cola) + (cost of

    cheesecake)

    Min 50x1+ 20x2+ 30x3+ 80x4

    18

  • 8/14/2019 03 Linear Programming

    19/31

    Example 2 continued

    The decision variables must satisfy the following constraints +nonnegativity (xi 0, i=1,2,3,4)

    Daily calorie intake must at least 500 calories

    400x1+ 200x2+ 150x3+ 500x4 500Daily chocolate intake must be at least 6 oz.

    3x1+ 2x2 6

    Daily sugar intake must be at least 10 oz.

    2x1+ 2x2+ 4x3+ 4x4 10

    Daily fat intake must be at least 8 oz.2x1+ 4x2+x3+ 5x4 819

  • 8/14/2019 03 Linear Programming

    20/31

    Example 3: Work- Scheduling Problem

    Many applications of LP involve determining theminimum-cost method for satisfying workforcerequirements.

    One type of work scheduling problem is a staticscheduling problem.

    In reality, demands change over time, workers

    take vacations in the summer, and so on, so thepost office does not face the same situationeach week. This is a dynamic schedulingproblem.

    20

  • 8/14/2019 03 Linear Programming

    21/31

    Example 3 continued

    A post office requires different

    numbers of full-time employeeson different days of the week.

    Union rules state that each

    fulltime employee must five

    consecutive days and then twodays off.

    The post office wants to meet its

    daily requirements using only full-

    time employees.

    Formulate an LP that the post

    office can use to minimize the

    number of full time employees

    who must be hired.

    Day # Required

    1: Monday 17

    2: Tuesday 13

    3: Wednesday 15

    4: Thursday 19

    5: Friday 14

    6: Saturday 16

    7: Sunday 11

    21

  • 8/14/2019 03 Linear Programming

    22/31

    Example 3 continued

    Letxibe the number of employees working on day i.

    Minimizez=x1+x2 + x3 + x4+x5 + x6 + x7Subject to (s.t.)

    x1 17

    x2 13x3 15

    x4 19

    x5 14

    x6 16

    x7 11

    xi 0, i= 1,2,..,7

    Wrong constraints, currentobjective function counts each

    Employee five times, not once.

    Interrelated variables, working

    consecutively

    22

  • 8/14/2019 03 Linear Programming

    23/31

    Example 3 continuedLetxibe the number of employees working on day i.

    Minimizez=x1+x2 + x3 + x4+x5 + x6 + x7Subject to (s.t.)

    x1 +x4+x5 + x6 + x7 17x1+x2 +x5 + x6 + x7 13

    x1+x2 + x3 + x6 + x7 15

    x1+x2 + x3 + x4 + x7 19

    x1+x2 + x3 + x4+x5 14

    x2 + x3 + x4+x5 + x6 16

    x3 + x4+x5 + x6 + x7 11

    xi 0, i= 1,2,..,7

    23

  • 8/14/2019 03 Linear Programming

    24/31

    Example 3 continued

    The optimal solution is x1=4/3, x

    2=10/3, x

    3=2, x

    4=22/3, x

    5=0,

    x6=10/3, x

    7=5

    z= 67/3

    Minimizez=x1+x2 + x3 + x4+x5 + x6 + x7

    Subject to (s.t.)

    x1 +x4+x5 + x6 + x7 17

    x1+x2 +x5 + x6 + x7 13

    x1+x2 + x3 + x6 + x7 15x1+x2 + x3 + x4 + x7 19

    x1+x2 + x3 + x4+x5 14

    x2 + x3 + x4+x5 + x6 16

    x3 + x4+x5 + x6 + x7 11

    xi 0, i= 1,2,..,7

    24

  • 8/14/2019 03 Linear Programming

    25/31

    Example 3 continued

    If we round up the solution of the LP: x1=2, x

    2=4, x

    3=2, x

    4=4,

    x5=0, x

    6=4, x

    7=5

    z= 25

    Minimizez=x1+x2 + x3 + x4+x5 + x6 + x7

    Subject to (s.t.)

    x1 +x4+x5 + x6 + x7 17

    x1+x2 +x5 + x6 + x7 13

    x1+x2 + x3 + x6 + x7 15x1+x2 + x3 + x4 + x7 19

    x1+x2 + x3 + x4+x5 14

    x2 + x3 + x4+x5 + x6 16

    x3 + x4+x5 + x6 + x7 11

    xi 0, i= 1,2,..,7

    25

  • 8/14/2019 03 Linear Programming

    26/31

    Example 3 continued

    The optimal the solution of the LP: x1=1, x

    2=4, x

    3=2, x

    4=8, x

    5=0,

    x6=3, x

    7=5

    z= 23

    Minimizez=x1+x2 + x3 + x4+x5 + x6 + x7

    Subject to (s.t.)

    x1 +x4+x5 + x6 + x7 17

    x1+x2 +x5 + x6 + x7 13

    x1+x2 + x3 + x6 + x7 15x1+x2 + x3 + x4 + x7 19

    x1+x2 + x3 + x4+x5 14

    x2 + x3 + x4+x5 + x6 16

    x3 + x4+x5 + x6 + x7 11

    xi 0, and integer i= 1,2,..,7

    26

  • 8/14/2019 03 Linear Programming

    27/31

    Works Scheduling Problem LINGO Model

    27

  • 8/14/2019 03 Linear Programming

    28/31

    Works Scheduling Problem LINGO Model

    28

  • 8/14/2019 03 Linear Programming

    29/31

    Works Scheduling Problem Excel Solver Model

    29

  • 8/14/2019 03 Linear Programming

    30/31

    Works Scheduling Problem Excel Solver Model

    30

  • 8/14/2019 03 Linear Programming

    31/31

    References

    Operations Research: Applications and Algorithms,

    Wayne L. Winston

    Introduction to Operations Research, Hillier & Lieberman,

    McGraw-Hill Int.

    Operations ResearchAn Introduction, Hamdy A. Taha,Maxwell Macmillan Int. Edition.

    31