Вы находитесь на странице: 1из 63

Linear Programming Model Formulation and Graphical Solution By Babasab Patil

Part I: Linear Programming Model Formulation and Graphical Solution

Model Formulation
A Maximization Model Example

Graphical Solutions of Linear Programming Models


A Minimization Model Example

Irregular Types of Linear Programming Models


Characteristics of Linear Programming Problems
2

Linear Programming - An Overview


Objectives of business firms frequently include maximizing profit or minimizing costs.
Linear programming is an analysis technique in which linear algebraic relationships represent a firms decisions given a business objective and resource constraints. Steps in application: 1- Identify problem as solvable by linear programming. 2- Formulate a mathematical model of the unstructured problem. 3- Solve the model.

Model Components and Formulation

Decision variables: mathematical symbols representing levels of activity of a firm. Objective function: a linear mathematical relationship describing an objective of the firm, in terms of decision variables, that is maximized or minimized Constraints: restrictions placed on the firm by the operating environment stated in linear relationships of the decision variables. Parameters: numerical coefficients and constants used in the objective function and constraint equations.
4

A Maximization Model Example (1 of 2) Problem Definition

Product mix problem - Beaver Creek Pottery Company How many bowls and mugs should be produced to maximize profits given labor and materials constraints? Product resource requirements and unit profit:
Product Bowl Mug Resource Requirements Labor Clay Profit (hr/unit) (lb/unit) ($/unit) 1 4 40 2 3 50

A Maximization Model Example (2 of 2)


Resource availability: 40 hours of labor per day 120 pounds of clay Decision Variables: x1=number of bowls to produce/day x2= number of mugs to produce/day Objective function maximize Z = $40x1 + 50x2 where Z= profit per day Resource Constraints: 1x1 + 2x2 40 hours of labor 4x1 + 3x2 120 pounds of clay Non-negativity Constraints: x10; x2 0 Complete Linear Programming Model: maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 4x2 + 3x2 120 x1, x2 0

Feasible/Infeasible Solutions
A feasible solution does not violate any of the constraints: Example x1= 5 bowls x2= 10 mugs Z = $40 x1 + 50x2= $700 Labor constraint check: 1(5) + 2(10) = 25 < 40 hours, within constraint Clay constraint check: 4(5) + 3(10) = 70 < 120 pounds, within constraint An infeasible solution violates at least one of the constraints: Example x1 = 10 bowls x2 = 20 mugs Z = $1400 Labor constraint check: 1(10) + 2(20) = 50 > 40 hours, violates constraint

Graphical Solution of Linear Programming Models

Graphical solution is limited to linear programming models containing only two decision variables. (Can be used with three variables but only with great difficulty.) Graphical methods provide visualization of how a solution for a linear programming problem is obtained.

Graphical Solution of a Maximization Model Coordinate Axes

maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x 2 0

Coordinates for graphical analysis

Graphical Solution of a Maximization Model Labor Constraint

maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x 2 0

Graph of the labor constraint line

10

Graphical Solution of a Maximization Model Labor Constraint Area

maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0

The labor constraint area

11

Graphical Solution of a Maximization Model Clay Constraint Area

maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0

The constraint area for clay

12

Graphical Solution of a Maximization Model Both Constraints

maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x 2 0

Graph of both model Constraints

13

Graphical Solution of a Maximization Model Feasible Solution Area

maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x 2 0

The feasible solution area constraints

14

Graphical Solution of a Maximization Model Objective Function = $800

Z= $800 = $40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x 2 0

Objective function line for Z 5 $800

15

Graphical Solution of a Maximization Model Alternative Objective Functions

Z=$800, $1200, $1600 = $40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x 2 0

Alternative objective function lines for profits, Z, of $800, $1,200, and $1,600

16

Graphical Solution of a Maximization Model Optimal Solution

Z= $800 =$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x 2 0

Identification of optimal solution point

17

Graphical Solution of a Maximization Model Optimal Solution Coordinates

maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x 2 0

Optimal solution coordinates

18

Graphical Solution of a Maximization Model Corner Point Solutions

maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x 2 0

Solutions at all corner points

19

Graphical Solution of a Maximization Model Optimal Solution for New Objective Function

maximize Z=$40x1 + 50x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x 2 0

The optimal solution with Z 5 70x1 1 20x2

20

Slack Variables Standard form requires that all constraints be in the form of equations. A slack variable is added to a constraint to convert it to an equation (=). A slack variable represents unused resources. A slack variable contributes nothing to the objective function value.

21

Complete Linear Programming Model in Standard Form

maximize Z=$40x1 + 50x2 + 0s1 + 0s2 subject to 1x1 + 2x2 + s1 = 40 4x2 + 3x2 + s2 = 120 x1,x2,s1,s2 = 0 where x1 = number of bowls x2 = number of mugs s1, s2 are slack variables

Solutions at points A, B, and C with slack

22

A Minimization Model Example Problem Definition


Two brands of fertilizer available - Super-gro, Crop-quick. Field requires at least 16 pounds of nitrogen and 24 pounds of phosphate. Super-gro costs $6 per bag, Crop-quick $3 per bag. Problem : How much of each brand to purchase to minimize total cost of fertilizer given following data ?
Chemical Contribution Nitrogen (lb/bag) 2 4 Phosphate (lb/bag) 4 3

Brand Super-gro Crop-quick

23

A Minimization Model Example Model Construction


Decision variables x1 = bags of Super-gro
x2 = bags of Crop-quick The objective function:

minimize Z = $6x1 + 3x2


where $6x1 = cost of bags of Super-gro 3x2 = cost of bags of Crop-quick Model constraints: 2x1 + 4x2 16 lb (nitrogen constraint) 4x1 + 3x2 24 lb (phosphate constraint) x1, x2 0 (nonnegativity constraint)

24

A Minimization Model Example Complete Model Formulation and Constraint Graph

Complete model formulation: minimize Z = $6x1 + 3x2 subject to

2x1 + 4x2 16 lb of nitrogen


4x1 + 3x2 24 lb of phosphate x1 , x2 0

25

A Minimization Model Example Feasible Solution Area

minimize Z = $6x1 + 3x2 subject to 2x1 + 4x2 16 lb of nitrogen

4x1 + 3x2 24 lb of phosphate


x1, x2 0

Feasible solution area

26

A Minimization Model Example Optimal Solution Point

minimize Z = $6x1 + 3x2 subject to 2x1 + 4x2 16 lb of nitrogen 4x1 + 3x2 24 lb of phosphate x1, x2 0

The optimal solution point

27

A Minimization Model Example Surplus Variables


A surplus variable is subtracted from a constraint to convert it to an equation (=). A surplus variable represents an excess above a constraint requirement level. Surplus variables contribute nothing to the calculated value of the objective function. Subtracting slack variables in the farmer problem constraints: 2x1 + 4x2 - s1 = 16 (nitrogen) 4x1 + 3x2 - s2 = 24 (phosphate)

28

A Minimization Model Example Graphical Solutions

minimize Z = $6x1 + 3x2 + 0s1 + 0s2 subject to 2x1 + 4x2 - s1 = 16 4x1 + 3x2 - s2 = 24 x1, x2, s1, s2 = 0

Graph of the fertilizer example

29

Irregular Types of Linear Programming Problems

For some linear programming models, the general rules do not apply.
Special types of problems include those with: 1. Multiple optimal solutions 2. Infeasible solutions 3. Unbounded solutions

30

Multiple Optimal Solutions

Objective function is parallel to a constraint line: maximize Z=$40x1 + 30x2 subject to 1x1 + 2x2 40 hours of labor 4x2 + 3x2 120 pounds of clay x1, x2 0 where x1 = number of bowls x2 = number of mugs

Graph of the Beaver Creek Pottery Company example with multiple optimal solutions

31

An Infeasible Problem
Every possible solution violates at least one constraint:

maximize Z = 5x1 + 3x2 subject to 4x1 + 2x2 8 x1 4

x2 6
x1, x2 0

Graph of an infeasible problem

32

An Unbounded Problem
Value of objective function increases indefinitely:

maximize Z = 4x1 + 2x2


subject to x1 4 x2 2 x1, x2 0

An unbounded problem

33

Characteristics of Linear Programming Problems


A linear programming problem requires a decision - a choice amongst alternative courses of action. The decision is represented in the model by decision variables. The problem encompasses a goal, expressed as an objective function, that the decision maker wants to achieve. Constraints exist that limit the extent of achievement of the objective. The objective and constraints must be definable by linear mathematical functional relationships.

34

Properties of Linear Programming Models

Proportionality - The rate of change (slope) of the objective function and constraint equations is constant. Additivity - Terms in the objective function and constraint equations must be additive. Divisability -Decision variables can take on any fractional value and are therefore continuous as opposed to integer in nature. Certainty - Values of all the model parameters are assumed to be known with certainty (non-probabilistic).

QP5013 LINEAR PRORAMMING

35

Example Problem No. 1 Problem Statement

- Hot dog mixture in 1000-pound batches.


- Two ingredients, chicken ($3/lb) and beef ($5/lb), - Recipe requirements:

at least 500 pounds of chicken


at least 200 pounds of beef. - Ratio of chicken to beef must be at least 2 to 1. - Determine optimal mixture of ingredients that will minimize costs.

36

Example Problem No. 1 Solution

Step 1: Identify decision variables. x1 = lb of chicken x2 = lb of beef

Step 2: Formulate the objective function.


minimize Z = $3x1 + 5x2 where Z = cost per 1,000-lb batch $3x1 = cost of chicken 5x2 = cost of beef

37

Example Problem No.1 Solution (continued)


Step 3: Establish Model Constraints x1 + x2 = 1,000 lb x1 500 lb of chicken x2 200 lb of beef x1/x2 2/1 or x1 - 2x2 0 x1,x2 0 The model: minimize Z = $3x1 + 5x2 subject to x1 + x2 = 1,000 lb x1 50 x2 200 x1 - 2x2 0 x1,x2 0

38

Example Problem No.2

Solve the following model graphically: maximize Z = 4x1 + 5x2 subject to x1 + 2x2 10 6x1 + 6x2 36 x1 4 x1,x2 0 Step 1: Plot the constraint s as equations:

The constraint equations

39

Example Problem No.2


maximize Z = 4x1 + 5x2 subject to x1 + 2x2 1 6x1 + 6x2 36 x1 4 x1,x2 0 Step 2: Determine the feasible solution area:

The feasible solution space and extreme points

40

Example Problem No.2


maximize Z = 4x1 + 5x2 subject to x1 + 2x2 10

6x1 + 6x2 36
x1 4 x1,x2 0 Steps 3 and 4:

Determine the solution points and optimal solution.

Optimal solution point

41

Part II: Linear Programming Modeling Examples

A Product Mix Example A Diet Example An Investment Example A Marketing Example A Transportation Example A Blend Example A Multiperiod Scheduling Example A Data Envelopment Analysis Example
42

Product Mix Example Problem Definition


- Four-product T-shirt/sweatshirt manufacturing company.

- Must complete production within 72 hours


- Truck capacity = 1,200 standard sized boxes. - Standard size box holds12 T-shirts. - One-dozen sweatshirts box is three times size of standard box. - $25,000 available for a production run. - 500 dozen blank T-shirts and sweatshirts in stock. - How many dozens (boxes) of each type of shirt to produce?
43

Product Mix Example Data


Processing Time (hr) Per dozen Sweatshirt - F Sweatshirt B/F T-shirt - F T-shirt - B/F 0.10 0.25 Cost ($) per dozen 36 48 Profit ($) per dozen 90 125

0.08 0.21

25 35

45 65

44

Product Mix Example Model Construction


Decision variables: x1 = sweatshirts, front printing x2 = sweatshirts, back and front printing

x3 = T-shirts, front printing


x4 = T-shirts, back and front printing Objective function: maximize Z = $90x1 + 125x2 + 45x3 + 65x4

Model constraints:
0.10x1 + 0.25x2+ 0.08x3 + 0.21x4 72 hr 3x1 + 3x2 + x3 + x4 1,200 boxes $36x1 + 48x2 + 25x3 + 35x4 $25,000

x1 + x2 500 dozen sweatshirts


x3 + x4 500 dozen T-shirts

45

Product Mix Example Computer Solution with QM for Windows


maximize Z = $90x1 + 125x2 + 45x3 + 65x4 subject to: 0.10x1 + 0.25x2+ 0.08x3 + 0.21x4 72 3x1 + 3x2 + x3 + x4 1,200 boxes $36x1 + 48x2 + 25x3 + 35x4 $25,000 x1 + x2 500 dozed sweatshirts x3 + x4 500 dozen T-shirts x1, x2, x3, x4 0

46

Product Mix Example Computer Solution with QM for Windows (continued)


maximize Z = $90x1 + 125x2 + 45x3 + 65x4 subject to: 0.10x1 + 0.25x2+ 0.08x3 + 0.21x4 72 3x1 + 3x2 + x3 + x4 1,200 boxes $36x1 + 48x2 + 25x3 + 35x4 $25,000 x1 + x2 500 dozed sweatshirts x3 + x4 500 dozen T-shirts x1, x2, x3, x4 0

47

Diet Example Data and Problem Definition


Breakfast Food 1. Bran cereal (cup) 2. Dry cereal (cup) 3. Oatmeal (cup) 4. Oat bran (cup) 5. Egg 6. Bacon (slice) 7. Orange 8. Milk-2% (cup) 9. Orange juice (cup) 10.Wheat toast (slice) Fat Calories (g) 90 0 110 2 100 2 90 2 75 5 35 3 65 0 100 4 120 0 65 1 Cholesterol (mg) 0 0 0 0 270 8 0 12 0 0 Iron Calcium Protein Fiber (mg) (mg) (g) (g) 6 20 3 5 4 48 4 2 2 12 5 3 3 8 6 4 1 30 7 0 0 0 2 0 1 52 1 1 0 250 9 0 0 3 1 0 1 26 3 3 Cost ($) 0.18 0.22 0.10 0.12 0.10 0.09 0.40 0.16 0.50 0.07

Breakfast to include at least 420 calaries, 5 milligrams of iron, 400 milligrams of calcium, 20 grams of protein, 12 grams of fiber, and must have no more than 20 grams of fat and 30 milligrams of cholesterol.

48

Diet Example Model Construction: Decision Variables


x1 = cups of bran cereal x2 = cups of dry cereal x3 = cups of oatmeal x4 = cups of oat bran x5 = eggs x6 = slices of bacon x7 = oranges x8 = cups of milk x9 = cups of orange juice x10 = slices of wheat toast
49

Diet Example Model Summary

minimize Z =0.18x1 + 0.22x2 + 0.10x3 + 0.12x4 + 0.10x5 + 0.09x6+ 0.40x7 + 0.16x8 + 0.50x9 0.07x10 subject to 90x1 + 110x2 + 100x3 + 90x4 + 75x5 + 35x6 + 65x7 + 100x8 + 120x9 + 65x10 420 2x2 + 2x3 + 2x4 + 5x5 + 3x6 + 4x8 + x10 20

270x5 + 8x6 + 12x8 30


6x1 + 4x2 + 2x3 + 3x4+ x5 + x7 + x10 5 20x1 + 48x2 + 12x3 + 8x4+ 30x5 + 52x7 + 250x8 + 3x9 + 26x10 400 3x1 + 4x2 + 5x3 + 6x4 + 7x5 + 2x6 + x7+ 9x8+ x9 + 3x10 20 5x1 + 2x2 + 3x3 + 4x4+ x7 + 3x10 12 xi 0
50

An Investment Example Model Summary


maximize Z = $0.085x1 + 0.05x2 + 0.065 x3+ 0.130x4 subject to x1 14,000

x2 - x1 - x3- x4 0
x2 + x3 21,000 -1.2x1 + x2 + x3 - 1.2 x4 0 x1 + x2 + x3 + x4 = 70,000

x1, x 2, x3, x4 0
where x1 = amount invested in municipal bonds ($) x2 = amount invested in certificates of deposit ($)

x3 = amount invested in treasury bills ($)


x4 = amount invested in growth stock fund($)

51

A Marketing Example Data and Problem Definition


Exposure (people/ad or commercial) Television commercial Radio commercial Newspaper ad 20,000 12,000 9,000 Cost

$15,000 6,000 4,000

- Budget limit $100,000 - Television time for four commercials - Radio time for 10 commercials

- Newspaper space for 7 ads


- Resources for no more than 15 commercials and/or ads.

52

Transportation Example Problem Definition and Data


Warehouse supply of televisions sets: 1- Cinncinnati 300 Retail store demand for television sets: A. - New York 150

2- Atlanta
3- Pittsburgh total

200
200 700

B. - Dallas
C. - Detroit total

250
200 600

From Warehouse 1 2 3

To Store A $16 14 13 B $18 12 15 C $11 13 17

53

A Blend Example Problem Definition and Data


Determine the optimal mix of the three components in each grade of motor oil that will maximize profit. Company wants to produce at least 3,000 barrels of each grade of motor oil.
Maximum Barrels Available/day 4,500 2,700 3,500

Component 1 2 3

Cost/barrel $12 10 14

Grade

Component Specifications

Selling Price ($/bbl)

Super

At least 50% of 1 Not more than 30% of 2 At least 40% of 1 Not more than 25% of 3 At least 60% of 1 At least 10% of 2

$23

Premium

20

Extra

18

54

A Blend Example Decision Variables and Model Summary


Decision variables: The quantity of each of the three components used in each grade of gasoline (9 decision variables); xij = barrels of component i used in motor oil grade j per day, where i = 1, 2, 3 and j = s (super), p(premium), and e(extra). Model Summary:
maximize Z = 11x1s + 13x2s + 9x3s + 8x1p + 10x2p + 6x3p + 6x1e + 8x2e + 4x3e subject to x1s + x1p + x1e 4,500 x2s + x2p + x2e 2,700 x3s + x3p + x3e 3,500 0.50x1s - 0.50x2s - 0.50x3s 0

0.70x2s - 0.30x1s - 0.30x3s 0


0.60x1p - 0.40x2p - 0.40x3p 0 0.75x3p - 0.25x1p - 0.25x2p 0 0.40x1e- 0.60x2e- - 0.60x3e 0 0.90x2e - 0.10x1e - 0.10x3e 0 x1s + x2s + x3s 3,000 x1p+ x2p + x3p 3,000 x1e+ x2e + x3e 3,000 xij 0

55

A Multiperiod Scheduling Example Problem Definition and Data


Production capacity : 160 computers per week Additional 50 computers with overtime

Assembly costs: $190/comp. regular time; $260/comp. overtime


Inventory cost: $10/comp. per week Order schedule: Week 1 2 3 4 Computer Orders 105 170 230 180

5
6

150
250

56

A Multiperiod Scheduling Example Decision Variables and Model Summary


Decision variables:
rj = regular production of computers per week j (j = 1, 2, 3, 4, 5, 6) oj = overtime production of computers per week j (j = 1, 2, 3, 4, 5, 6) ij = extra computers carried over as inventory in week j (j = 1, 2, 3, 4, 5)

Model summary:
minimize Z = $190(r1 + r2 + r3 + r4 + r5 + r6) + $260(o1 + o2 + o3 + o4 + o5 +o6) + 10(i1, + i2 + i3 + i4 + i5) subject to rj 160 (j = 1, 2, 3, 4, 5, 6) oj 150 (j = 1, 2, 3, 4, 5, 6) r1 + o1 - i1 105 r2 + o2 + i1 - i2 170 r3 + o3 + i2 - i3 230 r4 + o4 + i3 - i4 180 r5 + o5 + i4 - i5 150 r6 + o6 + i5 250 rj, oj, ij 0

57

A Data Envelopment Analysis (DEA) Example Problem Definition and Data


DEA compares a number of service units of the same type based on their inputs (resources) and outputs. The result indicates if a particular unit is less productive, or efficient, than other units. Elementary school comparison:
input 1 = teacher to student ratio output 1 = average reading SOL score

input 2 = supplementary $/student


input 3 = parent education level
Inputs School Alton Beeks Carey 1 .06 .05 .08 2 $260 320 340

output 2 = average math SOL score


output 3 = average history SOL score
Outputs 3 11.3 10.5 12.0 1 86 82 81 2 75 72 79 3 71 67 80

Delancey

.06

460

13.1

81

73

69

58

A Data Envelopment Analysis (DEA) Example Decision Variables and Model Summary
Decision variables: xi = a price per unit of each output where i = 1, 2, 3 yi = a price per unit of each input where i = 1, 2, 3 Model summary: maximize Z = 81x1 + 73x2 + 69x3 subject to .06 y1 + 460y2 + 13.1y3 = 1 86x1 + 75x2 + 71x3 .06y1 + 260y2 + 11.3y3 82x1 + 72x2 + 67x3 .05y1 + 320y2 + 10.5y3 81x1 + 79x2 + 80x3 .08y1 + 340y2 + 12.0y3 81x1 + 73x2 + 69x3 .06y1 + 460y2 + 13.1y3 xi, yi 0
59

Example Problem Solution Problem Statement and Data - Canned catfood, Meow Chow; dogfood, Bow Chow. - Ingredients/week: 600lb horse meat; 800 lb fish; 1000 lb cereal. - Recipe requirement: Meow Chow at least half fish; Bow Chow at least half horse meat. - 2,250 sixteen-ounce cans available each week. -Profit /can: Meow Chow $0.80; Bow Chow$0.96. - How many cans of Bow Chow and Meow Chow should be produced each week in order to maximize profit?

60

Example Problem Solution Model Formulation


Step 1: Define the Decision Variables xij = ounces of ingredient i in pet food j per week, where i = h (horse meat), f (fish) and c (cereal), and j = m (Meow chow) and b (Bow Chow).

Step 2: Formulate the Objective Function


maximize Z = $0.05(xhm + xfm + xcm) + 0.06(xhb + xfb + xcb) Step 3: Formulate the Model Constraints Amount of each ingredient available each week:

xhm + xhb 9,600 ounces of horse meat


xfm + xfb 12,800 ounces of fish xcm + xcb 16,000 ounces of cereal additive Recipe requirements:

Meow Chow xfm/(xhm + xfm + xcm) 1/2, or, - xhm + xfm- xcm 0
Bow Chow xhb/(xhb + xfb + xcb) 1/2, or, xhb- xfb - xcb 0 xhm + xfm + xcm + xhb + xfb+ xcb 36,000 ounces
61

Can content constraint:

Example Problem Solution Model Summary and Solution with QM for Windows
Step 4: Model Summary
maximize Z = $0.05 xhm + 0.05 xfm + 0.05 xcm + 0.06 xhb + 0.06 xfb + 0.06 x subject to xhm + xhb 9,600 ounces of horse meat xfm + xfb 12,800 ounces of fish xcm + xcb 16,000 ounces of cereal additive - xhm + xfm- xcm 0 xhb- xfb - xcb 0 xhm + xfm + xcm + xhb + xfb+ xcb 36,000 ounces xij 0

62

Additional Exercises
Chap 2 - No 36 & 38; page 62; Chap 3 No 8, 9, 10, 17, 19; pg 92; Chap 4 - 20, 21; pg 146 Group assignment: Case Problem Summer Sports Camp at State University

Please try these questions & we will discuss it during our class.
63

Вам также может понравиться