Linear Programming Modelling Examples (1)
Linear Programming Modelling Examples (1)
Modelling Examples
Chapter Topics
=D7*B14+E7*B15+F7*B16+G7*B17
=J7-H7
These cells have no
effect; added for
“cosmetic”
purposes.
Model formulation
=F11*B16+G11*B17 included on all
Excel files on
Exhibit 4.1 Companion Web
site
A Product Mix Example
Solution with Excel Solver Window (6 of 8)
Includes all
five
constraints.
Exhibit 4.2
A Product Mix Example
Solution with QM for Windows (7 of 8)
Exhibit 4.4
A Diet Example
Data and Problem Definition (1 of 5)
Breakfast Food Fat Cholesterol Iron Calcium Protein Fiber Cost
Cal (g) (mg) (mg) (mg) (g) (g) ($)
1. Bran cereal (cup) 90 0 0 6 20 3 5 0.18
2. Dry cereal (cup) 110 2 0 4 48 4 2 0.22
3. Oatmeal (cup) 100 2 0 2 12 5 3 0.10
4. Oat bran (cup) 90 2 0 3 8 6 4 0.12
5. Egg 75 5 270 1 30 7 0 0.10
6. Bacon (slice) 35 3 8 0 0 2 0 0.09
7. Orange 65 0 0 1 52 1 1 0.40
8. Milk-2% (cup) 100 4 12 0 250 9 0 0.16
9. Orange juice (cup) 120 0 0 0 3 1 0 0.50
10. Wheat toast (slice) 65 1 0 1 26 3 3 0.07
=SUMPRODUCT(C5:C14,F5:F14)
or
=C5*F5+C6*F6+C7*F7+C8*F8+C9*
F9+C10*F10+C11*F11+C12*F12+C
13*F13+C14*F14
Constraint value,
420, typed in cell
F17
=SUMPRODUCT(C5:C14,E5:E14)
Decision or
variable, =C5*E5+C6*E6+C7*E7+C8*E8+C9
C5:C14 *E9+C10*E10+C11*E11+C12*E12
+C13*E13+C14*E14
Exhibit 4.5
A Diet Example
Solution with Excel Solver Window (5 of 5)
Decision
variables;
“servings” in
column C
Constraint for “calories” in column F;
SUMPRODUCT (C5:C14,F5:F14)<420
Exhibit 4.6
An Investment Example
Model Summary (1 of 5)
An investor has $70,000 to divide among several
instruments. Municipal bonds have an 8.5% return, CD’s
a 5% return, t-bills a 6.5% return, and growth stock 13%.
First
guideline,
=D6*B13
Exhibit 4.7
An Investment Example
Solution with Excel Solver Window (3 of 4)
Guideline
constraints
Exhibit 4.8
An Investment Example
Sensitivity Report (4 of 4)
Exhibit 4.9
A Marketing Example
Data and Problem Definition (1 of 7)
Exposure
(people/ad or Cost
commercial)
Television Commercial 20,000 $15,000
Objective
function
=F6*D6+F7*D7+F8*D8
or
=SUMPRODUCT(D6:D8,F6:F8)
A Marketing Example
Solution with Excel Solver Window (4 of 7)
Exhibit 4.11
A Marketing Example
Integer Solution with Excel (5 of 7)
Decision variables
Exhibit 4.12
A Marketing Example
Integer Solution with Excel (6 of 7)
Integer
restriction
Exhibit 4.13
A Marketing Example
Integer Solution with Excel (7 of 7)
Better solution—17,000
Integer solution more total exposures—
than rounded-down
solution
Exhibit 4.14
Copyright © 2016 Pearson Education, Inc.
A Transportation Example
Problem Definition and Data (1 of 3)
Warehouse supply of Retail store demand
Television Sets: for television sets:
1 - Cincinnati 300 A - New York 150
2 - Atlanta 200 B - Dallas 250
3 - Pittsburgh 200 C - Detroit 200
Total 700 Total 600
Unit Shipping Costs:
To Store
From Warehouse
A B C
1 $16 $18 $11
2 14 12 13
3 13 15 17
A Transportation Example
Model Summary (2 of 4)
Minimize Z = $16x1A + 18x1B + 11x1C + 14x2A + 12x2B + 13x2C +
13x3A + 15x3B + 17x3C
subject to:
x1A + x1B+ x1C 300
x2A+ x2B + x2C 200
x3A+ x3B + x3C 200
x1A + x2A + x3A = 150
x1B + x2B + x3B = 250
x1C + x2C + x3C = 200
All xij 0
A Transportation Example
Solution with Excel (3 of 4)
=C5+D5+E5
=C5+C6+C7
Exhibit 4.15
A Transportation Example
Solution with Solver Window (4 of 4)
Decision variables
Demand
constraints
Supply constraints
Exhibit 4.16
A Blend Example
Problem Definition and Data (1 of 7)
Maximum Barrels
Component Cost/barrel
Available/day
1 4,500 $12
2 2,700 10
3 3,500 14
At least 50% of 1
Super $23
Not more than 30% of 2
At least 40% of 1
Premium
Not more than 25% of 3 20
At least 60% of 1
Extra 18
At least 10% of 2
Copyright © 2016 Pearson Education, Inc.
A Blend Example
Problem Statement and Variables (2 of 7)
=B7+B10+B13
=B7+B8+B9 =0.5*B7-0.5*B8-0.5*B9
Decision variables - B7:B15
Exhibit 4.17
A Blend Example
Solution with Solver Window (6 of 7)
Exhibit 4.18
A Blend Example
Sensitivity Report (7 of 7)
Exhibit 4.19
Decision Variables:
rj = regular production of computers in week j
(j = 1, 2, …, 6)
oj = overtime production of computers in week j
(j = 1, 2, …, 6)
ij = extra computers carried over as inventory in week j
(j = 1, 2, …, 5)
A Multi-Period Scheduling Example
Model Summary (3 of 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 computers in week j (j = 1, 2, 3, 4, 5, 6)
oj 150 computers in week j (j = 1, 2, 3, 4, 5, 6)
r1 + o1 - i1 = 105 week 1
r2 + o2 + i1 - i2 = 170 week 2
r3 + o3 + i2 - i3 = 230 week 3
r4 + o4 + i3 - i4 = 180 week 4
r5 + o5 + i4 - i5 = 150 week 5
r6 + o6 + i5 = 250 week 6
A Multi-Period Scheduling Example
Solution with Excel (4 of 5)
G7-H7
B7+D7+I6; regular
Decision variables for Decision variables for production + overtime
regular production – overtime production – production + inventory
B6:B11 D6:D11 from previous week
Exhibit 4.20
Copyright © 2016 Pearson Education, Inc.
A Multi-Period Scheduling Example
Solution with Solver Window (5 of 5)
Exhibit 4.21
A Data Envelopment Analysis (DEA) Example
Problem Definition (1 of 5)
Inputs Outputs
School 1 2 3 1 2 3
Delancey
.06 460 13.1 81 73 69
A Data Envelopment Analysis (DEA) Example
Decision Variables and Model Summary (3 of 5)
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
A Data Envelopment Analysis (DEA) Example
Solution with Excel (4 of 5)
=E8*D12+F8*D13+G8*D14
=B5*B12+C5*B13+D5*B14
Exhibit 4.22
A Data Envelopment Analysis (DEA) Example
Solution with Solver Window (5 of 5)
Scaling constraint
Constraint for
outputs < inputs
Exhibit 4.23
Example Problem Solution
Problem Statement and Data (1 of 5)
Canned cat food, Meow Chow; dog food, Bow Chow.
■ Ingredients/week: 600 lb. 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.
Can Content: xhm + xfm + xcm + xhb + xfb+ xcb 36,000 ounces
Example Problem Solution
Model Summary (4 of 5)
Solution to the Bark’s Pet Food Company problem using QM for Windows