690 likes | 829 Views
Operations Management Linear Programming Module B. Outline. What is Linear Programming (LP)? Characteristics of LP. Formulating LP Problems. Graphical Solution to an LP Problem. Formulation Examples. Computer Solution. Sensitivity Analysis. Optimization Models.
E N D
Outline • What is Linear Programming (LP)? • Characteristics of LP. • Formulating LP Problems. • Graphical Solution to an LP Problem. • Formulation Examples. • Computer Solution. • Sensitivity Analysis.
Optimization Models • Mathematical models designed to have optimal (best) solutions. • Linear and integer programming. • Nonlinear programming. • Mathematical model is a set of equations and inequalities that describe a system. • E = mc2 • Y = 5.4 + 2.6 X
What is Linear Programming (LP)? • Mathematical technique to solve optimization models with linear objectives and constraints. • NOT computer programming! • Allocates scarce resources to achieve an objective. • Pioneered by George Dantzig in World War II.
Examples of Successful LP Applications • Scheduling school buses to minimize total distance traveled. • Allocating police patrols to high crime areas to minimize response time. • Scheduling tellers at banks to minimize total cost of labor.
Examples of Successful LP Applications - continued • Blending raw materials in feed mills to maximize profit while producing animal feed. • Selecting the product mix in a factory to make best use of available machine- and labor-hours available while maximizing profit. • Allocating space for tenants in a shopping mall to maximize revenues to the leasing company.
Characteristics of an LP Problem • Deterministic (no probabilities). • Single Objective: maximize or minimizesome quantity (the objective function). • Continuous decision variables (unknowns to be determined). • Constraints limit ability to achieve objective. • Objectives and constraints must be expressed as linear equations or inequalities.
Linear Equations and Inequalities 4x1 + 6x2 9 4x1 x2+ 6x2 9 3x - 4y + 5z = 8 3x - 4y2 + 5z = 8 3x/4y = 8 3x/4y = 8y same as 3x - 32y = 0 4x1 + 5x3 = 4x1 + 5 = 8
Formulation Computer Formulating LP Problems Word Problem Mathematical Expressions Solution
Formulating LP Problems 1. Define decision variables. 2. Formulate objective. 3. Formulate constraints. 4. Nonnegativity (all variables 0).
Formulation Example You wish to produce two products: (1) Walkman and (2) Watch-TV. Each Walkman takes 4 hours of electronic work and 2 hours of assembly time. Each Watch-TV takes 3 hours of electronic work and 1 hour of assembly time. There are 225 hours of electronic work time and 100 hours of assembly time available each month. The profit on each Walkman is $7; the profit on each Watch-TV is $5. Formulate a linear programming problem to determine how many of each product should be produced to maximize profit?
Formulation Example You wish to produce two products…. Each Walkman takes 4 hours of electronic work and 2 hours of assembly time.… How many of each product should be produced to maximize profit? Producing 2 products from 2 materials. Objective: Maximize profit
Formulation Example You wish to produce two products: (1) Walkman and (2) Watch-TV. Each Walkman takes 4 hours of electronic work and 2 hours of assembly time. Each Watch-TV takes 3 hours of electronic work and 1 hour of assembly time.There are 225 hours of electronic work time and 100 hours of assembly time available each month.The profit on each Walkman is $7; the profit on each Watch-TV is $5. Formulate a linear programming problem to determine how many of each product should be produced to maximize profit?
Formulation Example - Objective .… The profit on each Walkman is $7; the profit on each Watch-TV is $5. Maximize profit: $7 per Walkman $5 per Watch-TV
Formulation Example - Requirements ... Each Walkman takes 4 hours of electronic work and 2 hours of assembly time. Each Watch-TV takes 3 hours of electronic work and 1 hour of assembly time. ... Requirements: Walkman 4 hrs elec. time 2 hrs assembly time Watch-TV 3 hrs elec. time 1 hr assembly time
Formulation Example - Resources ... There are 225 hours of electronic work time and 100 hours of assembly time available each month. … Available resources: electronic work time 225 hours assembly time 100 hours
Hours Required to Produce 1 Unit Department Available Hours Walkmans Watch-TV’s This Month Electronic 4 3 225 Assembly 2 1 100 Profit/unit $7 $5 Formulation Example - Table
Formulation Example - Decision Variables • What are we deciding? What do we control? • Number of products to make? • Amount of each resource to use? • Amount of each resource in each product? • Let: • x1 = Number of Walkmans to produce each month. • x2 = Number of Watch-TVs to produce each month.
Formulation Example - Objective Hours Required to Produce 1 Unit x1 x2 Department Available Hours Walkmans Watch-TV’s This Month Electronic 4 3 225 Assembly 2 1 100 Profit/unit $7 $5
Objective: Maximize: 7x1 + 5x2 Formulation Example - Objective Hours Required to Produce 1 Unit x1 x2 Department Available Hours Walkmans Watch-TV’s This Month Electronic 4 3 225 Assembly 2 1 100 Profit/unit $7 $5
Objective: Maximize: 7x1 + 5x2 Formulation Example - 1st Constraint Hours Required to Produce 1 Unit x1 x2 Department Available Hours Walkmans Watch-TV’s This Month Electronic 4 3 225 Assembly 2 1 100 Profit/unit $7 $5 Constraint 1: 4x1 + 3x2 225 (Electronic Time hrs)
Objective: Maximize: 7x1 + 5x2 Formulation Example - 2nd Constraint Hours Required to Produce 1 Unit x1 x2 Department Available Hours Walkmans Watch-TV’s This Month Electronic 4 3 225 Assembly 2 1 100 Profit/unit $7 $5 Constraint 1: 4x1 + 3x2 225 (Electronic Time hrs) 2x1 + x2 100 (Assembly Time hrs) Constraint 2:
Maximize: 7x1 + 5x2 4x1 + 3x2 225 2x1 + x2 100 Complete Formulation (4 parts) x1 = Number of Walkmans to produce each month. x2 = Number of Watch-TVs to produce each month. x1, x2 0
Formulation Example - Max Profit • Suppose you are not given the profit for each product, but are given: • The selling price of a Walkman is $60 and the selling price of a Watch-TV is $40. • Each hour of electronic time costs $10 and each hour of assembly time costs $8. • Profit = Revenue - Cost Walkman profit = $60 - ($10/hr 4 hr + $8/hr 2 hr) = $4 Watch-TV profit = $40 - ($10/hr 3 hr + $8/hr 1 hr) = $2
Formulation Example - Optimal Solution x1 = 37.5 Walkmans produced each month. x2 = 25 Watch-TVs produced each month. Profit = $387.5/month • Can you make 37.5?? • Can you round to 38?? NO!! That requires 227 hrs of electronic time. 4 38 + 3 25 = 227 (> 225!)
Graphical Solution Method - Only with 2 Variables! • Draw graph with vertical & horizontal axes (1st quadrant only). • Plot constraints as lines, then as planes. • Find feasible region. • Find optimalsolution. • It will be at a corner point of feasible region!
Formulation Example Graph 100 4x1+3x2 225 (electronics) 80 2x1+x2 100 (assembly) 60 Number of Watch-TVs (X2) 40 20 0 0 60 80 40 20 Number of Walkmans (X1)
Feasible Region 100 4x1+3x2 225 (electronics) 80 2x1+x2 100 (assembly) 60 Number of Watch-TVs (X2) 40 20 Feasible Region 0 0 60 80 40 20 Number of Walkmans (X1)
Possible Solution Points 100 4x1+3x2 225 (electronics) 80 2x1+x2 100 (assembly) 60 Corner Point Solutions X2 40 20 Feasible Region 0 0 60 80 40 20 X1
Opitmal Solution 100 Profit = 7 x1 + 5 x2 1. x1 = 0, x2 = 0 profit = 0 2. x1 = 0, x2 = 75 profit = 375 3. x1 = 50, x2 = 0 profit = 350 4. x1 = 37.5, x2 = 25 profit = 387.5 80 60 X2 40 20 Feasible Region 0 0 60 80 40 20 X1
Formulation #1 A company wants to develop a high energy snack food for athletes. It should provide at least 20 grams of protein, 40 grams of carbohydrates and 900 calories. The snack food is to be made from three ingredients, denoted A, B and C. Each ounce of ingredient A costs $0.20 and provides 8 grams of protein, 3 grams of carbohydrates and 150 calories. Each ounce of ingredient B costs $0.10 and provides 2 grams of protein, 7 grams of carbohydrates and 80 calories. Each ounce of ingredient C costs $0.15 and provides 5 grams of protein, 6 grams of carbohydrates and 100 calories. Formulate an LP to determine how much of each ingredient should be used to minimize the cost of the snack food.
Formulation #1 How many products? How many ingredients? How many attributes of products/ingredients?
Formulation #1 How many products? 1 How many ingredients? 3 How many attributes of products/ingredients? 3 Do we know how much of each ingredient (or resource) is in each product?
Ingredient protein carbo. calories cost $0.2/oz 150 A 3 8 $0.1/oz 80 7 2 B 100 6 5 $0.15/oz C 900 20 40 Snack food Formulation #1
Ingredient protein carbo. calories cost $0.2/oz 150 A 3 8 $0.1/oz 80 7 2 B 100 6 5 $0.15/oz C 900 20 40 Snack food Variables:: xi = Number of ounces of ingredient i used in snack food. i = 1 is A; i = 2 is B; i = 3 is C Formulation #1
Minimize: 0.2x1 + 0.1x2 + 0.15x3 8x1 + 2x2 + 5x3 20 (protein) 3x1 + 7x2 + 6x3 40 (carbs.) 150x1 + 80x2 + 100x3 900 (calories) x1, x2, x3 0 Formulation #1 xi = Number of ounces of ingredient i used in snack food.
Formulation #1 - Additional Constraints xi = Number of ounces of ingredient i used in snack food. 1. At most 20% of the calories can come from ingredient A.
Formulation #1 - Additional Constraints xi = Number of ounces of ingredient i used in snack food. 1. At most 20% of the calories can come from ingredient A. calories from A = 150x1 total calories =150x1 + 80x2 + 100x3
Formulation #1 - Additional Constraints xi = Number of ounces of ingredient i used in snack food. 2. The snack food must include at least 1 ounce of A and 2 ounces of B. 3. The snack food must include twice as much A as B.
Formulation #1 - Additional Constraints xi = Number of ounces of ingredient i used in snack food. 2. The snack food must include at least 1 ounce of A and 2 ounces of B. 3. The snack food must include twice as much A as B.
Formulation #1 - Additional Constraints xi = Number of ounces of ingredient i used in snack food. 4. The snack food must include twice as much A as B and C. 5. The snack food must include twice as much A and B as C.
Formulation #1 - Additional Constraints xi = Number of ounces of ingredient i used in snack food. 4. The snack food must include twice as much A as B and C. x1 = 2x2 x1 = 2x3 or x1 = 2(x2 + x3) 5. The snack food must include twice as much A and B as C. x1 = 2x3 x2 = 2x3 or x1 + x2 = 2x3
Formulation #2 2. Plant fertilizers consist of three active ingredients, Nitrogen, Phosphate and Potash, along with inert ingredients. Fertilizers are defined by three numbers representing the percentages of Nitrogen, Phosphate, Potash. For example a 20-10-40 fertilizer includes 20% Nitrogen, 10% Phosphate and 40% Potash. NuGrow makes three different fertilizers, packaged in 40 lb. bags: 20-10-40, 10-10-10 and 30-30-10. The 20-10-40 fertilizer sells for $8/bag and at least 3000 bags must be produced next month. The 10-10-10 fertilizer sells for $4/bag. The 30-30-10 fertilizer sells for $6/bag and at least 4000 bags must be produced next month. The cost and availability of the fertilizer ingredients is as follows:
Formulation #2 - continued Amount Available (tons/month) Cost ($/ton) Ingredient Nitrogen (N) 20 300 30 200 Phosphate (Ph) 400 Potash (Po) 40 100 Inert (In) unlimited Formulate an LP to determine how many bags of each type of fertilizer NuGrow should make next month to maximize profit.
Formulation #2 Produce 3 products (fertilizers) from 4 ingredients. Do we know how much of each ingredient (or resource) is in each product? If ‘YES’, variables are probably amount of each product to produce. If ‘NO’, variables are probably amount of each ingredient (or resource) to use in each product.
Minimum req’d (bags) Price ($/bag) lbs. of ingredient per bag Product N Ph Po In 20-10-40 3000 8 4 16 12 8 10-10-10 4 4 4 4 28 30-30-10 12 12 4 12 4000 6 Formulation #2 - continued xi = Number of bags of fertilizer type i to make next month. i=1: 20-10-40 i=2: 10-10-10 i=3: 30-30-10
Formulation #2 - Constraints Produce 3 products (fertilizers) from 4 ingredients. 3 variables. How many constraints? Usually: - one (or two) for each ingredient - one (or two) for each final product - others?
Formulation #2 - Constraints Produce 3 products (fertilizers) from 4 ingredients. 3 variables. How many constraints? Usually: - one for each ingredient (3, no constraint for Inert) - one for each final product (2, no constraint for type 2) - others? (no) 3 variables, 5 constraints
Revenue = 8x1 + 4x2 + 6x3 Cost = (cost per bag of type 1) x1 + (cost per bag of type 2) x2 + (cost per bag of type 3) x3 Cost per bag is cost of all ingredients in a bag. : Maximize Profit = Revenue - Cost Formulation #2 - Objective xi = Number of bags of fertilizer type i to make next month.
Formulation #2 - Costs xi = Number of bags of fertilizer type i to make next month. Cost for one bag of type 1 (20-10-40) = cost for N 8 0.15 ($300/ton=$0.15/lb) + cost for Ph 4 0.10 ($200/ton=$0.10/lb) + cost for Po 16 0.20 ($400/ton=$0.20/lb) + cost for In 12 0.05 ($100/ton=$0.05/lb) = $5.4 Similarly: Cost for one bag of type 2 (10-10-10) = $3.2 Cost for one bag of type 3 (30-30-10) = $4.4