Linear Programming
Linear Programming
1 1
Part I: Linear Programming
Model Formulation and Graphical Solution
• Model Formulation
• 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
Resource Requirements
Product Labor Clay Profit
(hr/unit) (lb/unit) ($/unit)
Bowl 1 4 40
Mug 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
Alternative objective function lines for profits, Z, of $800, $1,200, and $1,600
Graphical Solution of a Maximization Model
Optimal Solution
Chemical Contribution
Nitrogen Phosphate
Brand (lb/bag) (lb/bag)
Super-gro 2 4
Crop-quick 4 3
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)
A Minimization Model Example
Complete Model Formulation and Constraint Graph
Minimize
Z = $6x1 + 3x2 + 0s1 + 0s2
subject to
2x1 + 4x2 - s1 = 16
4x1 + 3x2 - s2 = 24
x1, x2, s1, s2 = 0
An unbounded problem
Characteristics of Linear Programming Problems
43
Product Mix Example
Data
Sweatshirt - F 0.10 36 90
T-shirt - F 0.08 25 45
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.
Diet Example
Model Construction: Decision Variables
Warehouse supply of televisions sets: Retail store demand for television sets:
1- Cinncinnati 300 A. - New York 150
2- Atlanta 200 B. - Dallas 250
3- Pittsburgh 200 C. - Detroit 200
total 700 total 600
From To Store
Warehouse
A B C
1 $16 $18 $11
2 14 12 13
3 13 15 17
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
Component Cost/barrel
Available/day
1 4,500 $12
2 2,700 10
3 3,500 14
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
A Multiperiod Scheduling Example
Problem Definition and Data
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
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 output 2 = average math SOL score
Inputs Outputs
School 1 2 3 1 2 3
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, y i 0
Example Problem Solution
Problem Statement and Data