Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lecture 2 & 3 Linear Programming and Transportation Problem.

Similar presentations


Presentation on theme: "1 Lecture 2 & 3 Linear Programming and Transportation Problem."— Presentation transcript:

1 1 Lecture 2 & 3 Linear Programming and Transportation Problem

2 2  George Dantzig – 1914 -2005  Concerned with optimal allocation of limited resources such as  Materials  Budgets  Labor  Machine time  among competitive activities  under a set of constraints Linear Programming

3 3 Maximize 60X 1 + 50X 2 Subject to 4X 1 + 10X 2 <= 100 2X 1 + 1X 2 <= 22 3X 1 + 3X 2 <= 39 X 1, X 2 >= 0 Linear Programming Example Variables Objective function Constraints What is a Linear Program? A LP is an optimization model that has A LP is an optimization model that has continuous variables continuous variables a single linear objective function, and a single linear objective function, and (almost always) several constraints (linear equalities or inequalities) (almost always) several constraints (linear equalities or inequalities) Non-negativity Constraints

4 4  Decision variables  unknowns, which is what model seeks to determine  for example, amounts of either inputs or outputs  Objective Function  goal, determines value of best (optimum) solution among all feasible (satisfy constraints) values of the variables  either maximization or minimization  Constraints  restrictions, which limit variables of the model  limitations that restrict the available alternatives  Parameters: numerical values (for example, RHS of constraints)  Feasible solution: is one particular set of values of the decision variables that satisfies the constraints  Feasible solution space: the set of all feasible solutions  Optimal solution: is a feasible solution that maximizes or minimizes the objective function  There could be multiple optimal solutions Linear Programming Model

5 5 Another Example of LP: Diet Problem  Energy requirement : 2000 kcal  Protein requirement : 55 g  Calcium requirement : 800 mg FoodEnergy(kcal)Protein(g)Calcium(mg) Price per serving($) Oatmeal110423 Chicken205321224 Eggs160135413 Milk16082859 Pie42042224 Pork260148013

6 6 Example of LP : Diet Problem  oatmeal: at most 4 servings/day  chicken: at most 3 servings/day  eggs: at most 2 servings/day  milk: at most 8 servings/day  pie:at most 2 servings/day  pork: at most 2 servings/day Design an optimal diet plan which minimizes the cost per day

7 7 Step 1: define decision variables  x 1 = # of oatmeal servings  x 2 = # of chicken servings  x 3 = # of eggs servings  x 4 = # of milk servings  x 5 = # of pie servings  x 6 = # of pork servings Step 2: formulate objective function In this case, minimize total cost minimize z = 3x 1 + 24x 2 + 13x 3 + 9x 4 + 24x 5 + 13x 6

8 8 Step 3: Constraints  Meet energy requirement 110x 1 + 205x 2 + 160x 3 + 160x 4 + 420x 5 + 260x 6  2000  Meet protein requirement 4x 1 + 32x 2 + 13x 3 + 8x 4 + 4x 5 + 14x 6  55  Meet calcium requirement 2x 1 + 12x 2 + 54x 3 + 285x 4 + 22x 5 + 80x 6  800  Restriction on number of servings 0  x 1  4, 0  x 2  3, 0  x 3  2, 0  x 4  8, 0  x 5  2, 0  x 6  2

9 9 So, how does a LP look like? minimize 3x 1 + 24x 2 + 13x 3 + 9x 4 + 24x 5 + 13x 6 subject to 110x 1 + 205x 2 + 160x 3 + 160x 4 + 420x 5 + 260x 6  2000 4x 1 + 32x 2 + 13x 3 + 8x 4 + 4x 5 + 14x 6  55 2x 1 + 12x 2 + 54x 3 + 285x 4 + 22x 5 + 80x 6  800 0  x 1  4 0  x 2  3 0  x 3  2 0  x 4  8 0  x 5  2 0  x 6  2

10 10 Guidelines for Model Formulation  Understand the problem thoroughly.  Describe the objective.  Describe each constraint.  Define the decision variables.  Write the objective in terms of the decision variables.  Write the constraints in terms of the decision variables  Do not forget non-negativity constraints

11 11 Transportation Problem  Objective:  determination of a transportation plan of a single commodity  from a number of sources  to a number of destinations,  such that total cost of transportation is minimized  Sources may be plants, destinations may be warehouses  Question:  how many units to transport  from source i  to destination j  such that supply and demand constraints are met, and  total transportation cost is minimized

12 12 A Transportation Table Warehouse 47 7 1 100 12 3 8 8 200 8 1016 5 150 450 8090120160 1234 1 2 3 Factory Factory 1 can supply 100 units per period Demand Table 8S.1 Warehouse B’s demand is 90 units per period Total demand per period Total supply capacity per period

13 13 LP Formulation of Transportation Problem  minimize 4x11+7x12+7x13+x14+12x21+3x22+8x23+8x24+8x31+10x32 +16x33+5x34 Subject to  x11+x12+x13+x14=100  x21+x22+x23+x24=200  x31+x32+x33+x34=150  x11+x21+x31=80  x12+x22+x32=90  x13+x23+x33=120  x14+x24+x34=160  xij>=0, i=1,2,3; j=1,2,3,4 Supply constraint for factories Demand constraint of warehouses Minimize total cost of transportation

14 14 Assignment Problem  Special case of transportation problem  When # of rows = # of columns in the transportation tableau  All supply and demands =1  Objective: Assign n jobs/workers to n machines such that the total cost of assignment is minimized  Plenty of practical applications  Job shops  Hospitals  Airlines, etc.

15 15 Cost Table for Assignment Problem 1234 1 1463 2 97109 3 45117 4 8785 Worker (i) Machine (j)

16 16 LP Formulation of Assignment Problem  minimize x11+4x12+6x13+3x14 + 9x21+7x22+10x23+9x24 + 4x31+5x32+11x33+7x34 + 8x41+7x42+8x43+5x44 subject to  x11+x12+x13+x14=1  x21+x22+x23+x24=1  x31+x32+x33+x34=1  x41+x42+x43+x44=1  x11+x21+x31+x41=1  x12+x22+x32+x42=1  x13+x23+x33+x43=1  x14+x24+x34+x44=1  xij = 1, if worker i is assigned to machine j, i=1,2,3,4; j=1,2,3,4 0 otherwise

17 17 Product Mix Problem Floataway Tours has $420,000 that can be used to purchase new rental boats for hire during the summer. The boats can be purchased from two different manufacturers. Floataway Tours would like to purchase at least 50 boats. They would also like to purchase the same number from Sleekboat as from Racer to maintain goodwill. At the same time, Floataway Tours wishes to have a total seating capacity of at least 200. Formulate this problem as a linear program

18 18 Maximum Expected Daily Boat Builder Cost Seating Profit Speedhawk Sleekboat $6000 3 $ 70 Silverbird Sleekboat $7000 5 $ 80 Catman Racer $5000 2 $ 50 Classy Racer $9000 6 $110 Product Mix Problem

19 19  Define the decision variables x 1 = number of Speedhawks ordered x 2 = number of Silverbirds ordered x 3 = number of Catmans ordered x 4 = number of Classys ordered  Define the objective function Maximize total expected daily profit: Max: (Expected daily profit per unit) x (Number of units) Max: 70x 1 + 80x 2 + 50x 3 + 110x 4 Product Mix Problem

20 20  Define the constraints (1) Spend no more than $420,000: 6000x 1 + 7000x 2 + 5000x 3 + 9000x 4 < 420,000 (2) Purchase at least 50 boats: x 1 + x 2 + x 3 + x 4 > 50 (3) Number of boats from Sleekboat equals number of boats from Racer: x 1 + x 2 = x 3 + x 4 or x 1 + x 2 - x 3 - x 4 = 0 (4) Capacity at least 200: 3x 1 + 5x 2 + 2x 3 + 6x 4 > 200 Nonnegativity of variables: x j > 0, for j = 1,2,3,4 Product Mix Problem

21 21 Max 70x 1 + 80x 2 + 50x 3 + 110x 4 s.t. 6000x 1 + 7000x 2 + 5000x 3 + 9000x 4 < 420,000 x 1 + x 2 + x 3 + x 4 > 50 x 1 + x 2 - x 3 - x 4 = 0 3x 1 + 5x 2 + 2x 3 + 6x 4 > 200 x 1, x 2, x 3, x 4 > 0 Product Mix Problem - Complete Formulation

22 22 Applications of LP  Product mix planning  Distribution networks  Truck routing  Staff scheduling  Financial portfolios  Capacity planning  Media selection: marketing

23 23 Graphical Solution of LPs  Consider a Maximization Problem Max 5x 1 + 7x 2 s.t. x 1 < 6 2x 1 + 3x 2 < 19 x 1 + x 2 < 8 x 1, x 2 > 0

24 24 Slide © 2005 Thomson/South-Western Graphical Solution Example n Constraint #1 Graphed x 2 x 2 x1x1x1x1 x 1 < 6 (6, 0) 87654321 1 2 3 4 5 6 7 8 9 10

25 25 Slide © 2005 Thomson/South-Western Graphical Solution Example n Constraint #2 Graphed 2 x 1 + 3 x 2 < 19 x 2 x 2 x1x1x1x1 (0, 6 1/3 ) (9 1/2, 0) 87654321 1 2 3 4 5 6 7 8 9 10

26 26 Slide © 2005 Thomson/South-Western Graphical Solution Example n Constraint #3 Graphed x 2 x 2 x1x1x1x1 x 1 + x 2 < 8 (0, 8) (8, 0) 87654321 1 2 3 4 5 6 7 8 9 10

27 27 Slide © 2005 Thomson/South-Western Graphical Solution Example n Combined-Constraint Graph 2 x 1 + 3 x 2 < 19 x 2 x 2 x1x1x1x1 x 1 + x 2 < 8 x 1 < 6 87654321 1 2 3 4 5 6 7 8 9 10

28 28 Slide © 2005 Thomson/South-Western 87654321 1 2 3 4 5 6 7 8 9 10 Graphical Solution Example n Feasible Solution Region x1x1x1x1 FeasibleRegion x 2 x 2

29 29 Slide © 2005 Thomson/South-Western 87654321 1 2 3 4 5 6 7 8 9 10 Graphical Solution Example n Objective Function Line x1x1x1x1 x 2 x 2 (7, 0) (0, 5) Objective Function 5 x 1 + 7x 2 = 35 Objective Function 5 x 1 + 7x 2 = 35

30 30 Slide © 2005 Thomson/South-Western 87654321 1 2 3 4 5 6 7 8 9 10 Graphical Solution Example n Optimal Solution x1x1x1x1 x 2 x 2 Objective Function 5 x 1 + 7x 2 = 46 Objective Function 5 x 1 + 7x 2 = 46 Optimal Solution ( x 1 = 5, x 2 = 3) Optimal Solution ( x 1 = 5, x 2 = 3)

31 6s-31Linear Programming 1. Set up objective function and constraints in mathematical format 2. Plot the constraints 3. Identify the feasible solution space 4. Plot the objective function 5. Determine the optimum solution Graphical Linear Programming

32 32 Possible Outcomes of a LP  A LP is either  Infeasible – there exists no solution which satisfies all constraints and optimizes the objective function  or, Unbounded – increase/decrease objective function as much as you like without violating any constraint  or, Has an Optimal Solution  Optimal values of decision variables  Optimal objective function value

33 33 Infeasible LP – An Example  minimize 4x11+7x12+7x13+x14+12x21+3x22+8x23+8x24+8x31+10x32+16 x33+5x34 Subject to  x11+x12+x13+x14=100  x21+x22+x23+x24=200  x31+x32+x33+x34=150  x11+x21+x31=80  x12+x22+x32=90  x13+x23+x33=120  x14+x24+x34=170  xij>=0, i=1,2,3; j=1,2,3,4 Total demand exceeds total supply

34 34 Unbounded LP – An Example maximize 2x 1 + x 2 subject to - x 1 + x 2  1 x 1 - 2x 2  2 x 1, x 2  0 x 2 can be increased indefinitely without violating any constraint => Objective function value can be increased indefinitely

35 35 Multiple Optima – An Example maximize x 1 + 0.5 x 2 subject to 2x 1 + x 2  4 x 1 + 2x 2  3 x 1, x 2  0 x 1 = 2, x 2 =0, objective function = 2 x 1 = 5/3, x 2 =2/3, objective function = 2

36 36 Practice Example


Download ppt "1 Lecture 2 & 3 Linear Programming and Transportation Problem."

Similar presentations


Ads by Google