b-1 operations management linear programming module b

69
B-1 Operations Operations Management Management Linear Programming Linear Programming Module B Module B

Post on 20-Dec-2015

226 views

Category:

Documents


3 download

TRANSCRIPT

B-1

Operations Operations ManagementManagement

Linear ProgrammingLinear ProgrammingModule BModule B

B-2

OutlineOutline What is Linear Programming (LP)?

Characteristics of LP.

Formulating LP Problems.

Graphical Solution to an LP Problem.

Formulation Examples.

Computer Solution.

Sensitivity Analysis.

B-3

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

Optimization ModelsOptimization Models

B-4

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.

What is Linear Programming (LP)?What is Linear Programming (LP)?

B-5

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 Examples of Successful LP ApplicationsApplications

B-6

Examples of Successful LP Examples of Successful LP Applications - continuedApplications - 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.

B-7

Characteristics of an LP ProblemCharacteristics of an LP Problem1 Deterministic (no probabilities).

2 Single Objective: maximize or minimize some quantity (the objective function).

3 Continuous decision variables (unknowns to be determined).

4 Constraints limit ability to achieve objective.

5 Objectives and constraints must be expressed as linear equations or inequalities.

B-8

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

Linear Equations and InequalitiesLinear Equations and Inequalities

8 3x

B-9

Formulating LP ProblemsFormulating LP Problems

Word Problem

Mathematical Expressions

Solution

Formulation

Computer

B-10

Formulating LP ProblemsFormulating LP Problems

1. Define decision variables.

2. Formulate objective.

3. Formulate constraints.

4. Nonnegativity (all variables 0).

B-11

Formulation ExampleFormulation 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?

B-12

Formulation ExampleFormulation 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

B-13

Formulation ExampleFormulation ExampleYou 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?

B-14

Formulation Example - ObjectiveFormulation 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

B-15

Formulation Example - Formulation Example - RequirementsRequirements

... 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

B-16

Formulation Example - ResourcesFormulation 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

B-17

Formulation Example - TableFormulation Example - Table

Hours Required toProduce 1 Unit

DepartmentWalkmans Watch-TV’s

Available HoursThis Month

Electronic 4 3 225

Assembly 2 1 100

Profit/unit $7 $5

B-18

Formulation Example - Decision Formulation Example - Decision VariablesVariables

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.

B-19

Formulation Example - ObjectiveFormulation Example - Objective

Hours Required toProduce 1 Unit

DepartmentWalkmans Watch-TV’s

Available HoursThis Month

Electronic 4 3 225

Assembly 2 1 100

Profit/unit $7 $5

x1 x2

B-20

Formulation Example - ObjectiveFormulation Example - Objective

Hours Required toProduce 1 Unit

DepartmentWalkmans Watch-TV’s

Available HoursThis Month

Electronic 4 3 225

Assembly 2 1 100

Profit/unit $7 $5

x1 x2

Objective: Maximize: 7x1 + 5x2

B-21

Formulation Example - 1st Formulation Example - 1st Constraint Constraint

Hours Required toProduce 1 Unit

DepartmentWalkmans Watch-TV’s

Available HoursThis Month

Electronic 4 3 225

Assembly 2 1 100

Profit/unit $7 $5

x1 x2

Objective: Maximize: 7x1 + 5x2

Constraint 1: 4x1 + 3x2 225 (Electronic Time hrs)

B-22

Formulation Example - 2nd Formulation Example - 2nd Constraint Constraint

Hours Required toProduce 1 Unit

DepartmentWalkmans Watch-TV’s

Available HoursThis Month

Electronic 4 3 225

Assembly 2 1 100

Profit/unit $7 $5

x1 x2

Objective: Maximize: 7x1 + 5x2

Constraint 1: 4x1 + 3x2 225 (Electronic Time hrs)Constraint 2: 2x1 + x2 100 (Assembly Time hrs)

B-23

Complete Formulation (4 parts)Complete Formulation (4 parts)

Maximize: 7x1 + 5x2

4x1 + 3x2 225 2x1 + x2 100

x1 = Number of Walkmans to produce each month.x2 = Number of Watch-TVs to produce each month.

x1, x2 0

B-24

Formulation Example - Max ProfitFormulation 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

B-25

Formulation Example - Optimal Formulation Example - Optimal SolutionSolution

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!)

B-26

Draw graph with vertical & horizontal axes (1st quadrant only).

Plot constraints as lines, then as planes.

Find feasible region.

Find optimal solution. It will be at a corner point of feasible region!

Graphical Solution Method - Only Graphical Solution Method - Only with 2 Variables!with 2 Variables!

B-27

Formulation Example GraphFormulation Example Graph

0

20

40

60

80

100

0 20 40 60 80

4x1+3x2 225 (electronics)

2x1+x2 100 (assembly)

Number of Walkmans (X1)

Num

ber o

f Wat

ch-T

Vs (X

2)

B-28

Feasible RegionFeasible Region

0

20

40

60

80

100

0 20 40 60 80

Feasible Region

4x1+3x2 225 (electronics)

2x1+x2 100 (assembly)

Number of Walkmans (X1)

Num

ber o

f Wat

ch-T

Vs (X

2)

B-29

Possible Solution PointsPossible Solution Points

0

20

40

60

80

100

0 20 40 60 80X1

X 2

Feasible Region

4x1+3x2 225 (electronics)

2x1+x2 100 (assembly)

Corner Point Solutions

B-30

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

Opitmal SolutionOpitmal Solution

0

20

40

60

80

100

0 20 40 60 80X1

X 2

Feasible Region

B-31

Formulation #1Formulation #1A 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.

B-32

Formulation #1Formulation #1How many products?

How many ingredients?

How many attributes of products/ingredients?

B-33

Formulation #1Formulation #1How 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?

B-34

Formulation #1Formulation #1

40

Ingredient cost protein calories

A $0.2/oz 82

Snack food

carbo.

B C

$0.1/oz$0.15/oz 5

376

150 80100

20 900

B-35

Formulation #1Formulation #1

Variables:: xi = Number of ounces of ingredient i used in snack food.i = 1 is A; i = 2 is B; i = 3 is C

40

Ingredient cost protein calories

A $0.2/oz 82

Snack food

carbo.

B C

$0.1/oz$0.15/oz 5

376

150 80100

20 900

B-36

Formulation #1Formulation #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

xi = Number of ounces of ingredient i used in snack food.

B-37

Formulation #1 - Additional Formulation #1 - Additional ConstraintsConstraints

xi = Number of ounces of ingredient i used in snack food.

1. At most 20% of the calories can come from ingredient A.

B-38

Formulation #1 - Additional Formulation #1 - Additional ConstraintsConstraints

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

020x16x120x

0.2 100x 80x 150x

150x

321

32 1

1

or

B-39

Formulation #1 - Additional Formulation #1 - Additional ConstraintsConstraints

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.

B-40

Formulation #1 - Additional Formulation #1 - Additional ConstraintsConstraints

xi = Number of ounces of ingredient i used in snack food.

2x1x 21

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.

21 2xx

B-41

Formulation #1 - Additional Formulation #1 - Additional ConstraintsConstraints

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.

B-42

Formulation #1 - Additional Formulation #1 - Additional ConstraintsConstraints

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

B-43

Formulation #2Formulation #22. 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:

B-44

Formulation #2 - continuedFormulation #2 - continued

IngredientAmount Available

(tons/month)Cost

($/ton)Nitrogen (N) 20 300

200Phosphate (Ph) Potash (Po)

3040 400

Inert (In) unlimited 100

Formulate an LP to determine how many bags of each type of fertilizer NuGrow should make next month to maximize profit.

B-45

Formulation #2Formulation #2Produce 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.

B-46

Formulation #2 - continuedFormulation #2 - continued

ProductMinimum

req’d (bags) N Ph Po In20-10-40 3000 8 4 16 12

4 4 4 2810-10-10 30-30-10 4000 12 12 4 12

Price($/bag)

846

lbs. of ingredient per bag

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

B-47

Formulation #2 - ConstraintsFormulation #2 - ConstraintsProduce 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?

B-48

Formulation #2 - ConstraintsFormulation #2 - ConstraintsProduce 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

B-49

Formulation #2 - ObjectiveFormulation #2 - Objective

xi = Number of bags of fertilizer type i to make next month.

: Maximize Profit = Revenue - Cost

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.

B-50

Formulation #2 - CostsFormulation #2 - Costs

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

xi = Number of bags of fertilizer type i to make next month.

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

B-51

Formulation #2 - ObjectiveFormulation #2 - Objective

xi = Number of bags of fertilizer type i to make next month.

: Maximize Profit = Revenue - Cost

Revenue = 8x1 + 4x2 + 6x3

Cost = 5.4x1 + 3.2x2 + 4.4x3

Maximize 2.6x1 + 0.8x2 + 1.6x3

B-52

Formulation #2Formulation #2

Maximize: 2.6x1 + 0.8x2 + 1.6x3

xi = Number of bags of fertilizer type i to make next month.

8x1 + 4x2 + 12x3 40000 (N) 4x1 + 4x2 + 12x3 60000 (Ph) 16x1 + 4x2 + 4x3 80000 (Po)

x1, x2, x3 0

x1 3000 (20-10-40) x3 4000 (30-30-10)

B-53

Formulation #2 - Additional Formulation #2 - Additional ConstraintsConstraints

1. NuGrow can produce at most 4000 lbs. of 10-10-10 fertilizer next month.

2. The 20-10-40 fertilizer should be at least 50% of the total production.

xi = Number of bags of fertilizer type i to make next month.

B-54

Formulation #2 - Additional Formulation #2 - Additional ConstraintsConstraints

100x2

1. NuGrow can produce at most 4000 lbs. of 10-10-10 fertilizer next month.

2. The 20-10-40 fertilizer should be at least 50% of the total production.

xi = Number of bags of fertilizer type i to make next month.

)xx(x0.5x 3211

B-55

Formulation #3Formulation #34. NuTree makes two 2 types of paper (P1 and P2) from three grades

of paper stock. Each stock has a different strength, color, cost and (maximum) availability as shown in the table below. Paper P1 must have a strength rating of at least 7 and a color rating of at least 6. Paper P2 must have a strength rating of at least 6 and a color rating of at least 5. Paper P1 sells for $200/ton and the maximum demand is 70 tons/week. Paper P2 sells for $100/ton and the maximum demand is 120 tons/week. NuTree would like to determine how to produce the two paper types to maximize profit.

Paper Stock Strength Color Cost/Ton Availability R1 8 9 $150 40 tons/week R2 6 7 $110 60 tons/week R3 3 4 $ 50 100 tons/week

B-56

Formulation #3Formulation #3

Paper Stock Strength Color Cost/Ton Availability R1 8 9 $150 40 tons/week R2 6 7 $110 60 tons/week R3 3 4 $ 50 100 tons/week

Paper Strength Color Price/Ton Max. Demand P1 7 6 $200 70 tons/week P2 6 5 $100 120 tons/week

Produce 2 products (papers) from 3 ingredients (paper stocks) to maximize profit (= revenue - cost).

Constraints: Availability(3); Demand(2); Strength(2); Color(2)

B-57

Formulation #3 - Decision Formulation #3 - Decision VariablesVariables

Produce 2 products (papers) from 3 ingredients (paper stocks).

Do we know how much of each ingredient is in each product?

B-58

Formulation #3 - Decision Formulation #3 - Decision VariablesVariables

Produce 2 products (papers) from 3 ingredients (paper stocks).

Do we know how much of each ingredient is in each product?

NO!

6 variables for amount of each ingredient in each final product.

B-59

Formulation #3 - Key!Formulation #3 - Key!Produce 2 products (papers: P1 and P2) from 3

ingredients (paper stocks: R1, R2 and R3).

xij = Number of tons of stock i in paper j; i=1,2,3 j=1,2

P1 P2

R1

R2

R3

x11 x12

x21 x22

x31 x32

B-60

Formulation #3Formulation #3

xij = Number of tons of stock i in paper j; i=1,2,3 j=1,2

Tons of stock R1 used = x11 + x12

Tons of stock R2 used = x21 + x22

Tons of stock R3 used = x31 + x32

P1 P2

R1

R2

R3

x11 x12

x21 x22

x31 x32

B-61

Formulation #3Formulation #3

xij = Number of tons of stock i in paper j; i=1,2,3 j=1,2

: Amount of paper P1 produced = x11 + x21 + x31

Amount of paper P2 produced = x12 + x22 + x32

P1 P2

R1

R2

R3

x11 x12

x21 x22

x31 x32

B-62

Paper Stock Strength Color Cost/Ton Availability R1 8 9 $150 40 tons/week R2 6 7 $110 60 tons/week R3 3 4 $ 50 100 tons/week

Formulation #3 - ObjectiveFormulation #3 - Objective

Maximize Profit = Revenue - Cost

Cost = 150(tons of R1) + 110(tons of R2) + 50(tons of R3) Cost = 150(x11 + x12) + 110(x21 + x22) + 50(x31 + x32)

B-63

Formulation #3 - ObjectiveFormulation #3 - Objective

Revenue = 200(tons of P1 made) + 100(tons of P2made)

Revenue = 200(x11 + x21 + x31) + 100(x12 + x22 + x32)

Paper Strength Color Price/Ton Max. Demand P1 7 6 $200 70 tons/week P2 6 5 $100 120 tons/week

B-64

Formulation #3 - ObjectiveFormulation #3 - Objective

Maximize profit = Revenue - Cost

Revenue = 200(x11 + x21 + x31) + 100(x12 + x22 + x32)

Cost = 150(x11 + x12) + 110(x21 + x22) + 50(x31 + x32)

Maximize 50x11 + 90x21 + 150x31 - 50x12 - 10x22 + 50x32

B-65

Paper Stock Strength Color Cost/Ton Availability R1 8 9 $150 40 tons/week R2 6 7 $110 60 tons/week R3 3 4 $ 50 100 tons/week

Formulation #3 - ConstraintsFormulation #3 - Constraints

Availability of each ingredient

x11 + x12 40 (R1) x21 + x22 60 (R2) x31 + x32 100 (R3)

B-66

Formulation #3 - ConstraintsFormulation #3 - Constraints

Paper Strength Color Price/Ton Max. Demand P1 7 6 $200 70 tons/week P2 6 5 $100 120 tons/week

Demand for each product

x11 + x21 + x31 70 (P1) x12 + x22 + x32 120 (P2)

B-67

Paper Stock Strength Color Cost/Ton Availability R1 8 9 $150 40 tons/week R2 6 7 $110 60 tons/week R3 3 4 $ 50 100 tons/week

Formulation #3 - ConstraintsFormulation #3 - Constraints

Paper Strength Color Price/Ton Max. Demand P1 7 6 $200 70 tons/week P2 6 5 $100 120 tons/week

Strength and color are weighted averages, where weights are tons of each ingredient used.

1 ton of R1 + 1 ton of R2 = 2 tons with Strength = 7

2 tons of R1 + 1 ton of R2 = 3 tons with Strength = 7.333

B-68

Paper Stock Strength Color Cost/Ton Availability R1 8 9 $150 40 tons/week R2 6 7 $110 60 tons/week R3 3 4 $ 50 100 tons/week

Formulation #3 - ConstraintsFormulation #3 - Constraints

Paper Strength Color Price/Ton Max. Demand P1 7 6 $200 70 tons/week P2 6 5 $100 120 tons/week

04xxx7xxx3x6x8x

312111312111

312111

or

Strength P1: average strength from ingredients of P1 7

B-69

Formulation #3Formulation #3

Maximize 50x11 + 90x21 + 150x31 - 50x12 - 10x22 + 50x32

xij = Number of tons of stock i in paper j; i=1,2,3 j=1,2

x11, x12, x13, x21, x22, x23 0

x11 + x12 40 x21 + x22 60 x31 + x32 100x11 + x21 + x31 70 x12 + x22 + x32 120

(strength P1) x11 - x21 - 4 x31 0(strength P2) 2x12 - 3x32 0 (color P1) 3x11 + x21 - 2 x31 0(color P2) 4x12 + 2x12 - x32 0