Vous êtes sur la page 1sur 51

Linear

Programming:
Modeling Examples

Chapter 4

Copyright 2016 Pearson Education, Inc. 4-1


Chapter Topics

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

Copyright 2016 Pearson Education, Inc. 4-2


Product Mix Example (1 of 5)

Figure 4.1
Quick-Screen
Shirts
Copyright 2016 Pearson Education, Inc. 4-3
A Product Mix Example
Problem Definition (2 of 5)
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
& 500 sweatshirts in stock
Maximize Profit

4-4
A Product Mix Example
Model Construction (3 of 5)
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
Copyright 2016 Pearson Education, Inc. 4-5
A Product Mix Example
Computer Solution with Excel (4 of
5)
Objective
function
Click on Data
tab to access
Solver

=D7*B14+E7*B15+F7*B16+G
7*B17
=J7-
H7 These cells
have no effect;
added for
cosmetic
purposes.
Model
=F11*B16+G11* formulation
B17 included on all
Excel files on
Exhibit Companion
4.1 Web site
Copyright 2016 Pearson Education, Inc. 4-6
A Product Mix Example
Solution with Excel Solver Window
(5 of 5)

Includes all
five
constraints.

Exhibit
Copyright 2016 Pearson Education, Inc. 4.2 4-7
A Diet Example
Data and Problem Definition (1 of 5)

Breakfast to include at least 420 calories, 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
30milligrams
Copyright 2016 Pearson Education,of
Inc. cholesterol. 4-8
A Diet Example
Model Construction Decision
Variables (2 of 5)
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
Copyright 2016 Pearson Education, Inc. 4-9
A Diet Example
Model Summary (3 of 5)
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
calories
2x2 + 2x3 + 2x4 + 5x5 + 3x6 + 4x8 + x10 20 g fat
270x5 + 8x6 + 12x8 30 mg cholesterol
6x1 + 4x2 + 2x3 + 3x4+ x5 + x7 + x10 5 mg iron
20x1 + 48x2 + 12x3 + 8x4+ 30x5 + 52x7 + 250x8
+ 3x9 + 26x10 400 mg of calcium
3x1 + 4x2 + 5x3 + 6x4 + 7x5 + 2x6 + x7
Copyright 2016 Pearson Education, Inc. 4-10
A Diet Example
Computer Solution with Excel (4 of
5)
=SUMPRODUCT(C5:C14,
F5:F14)
or
=C5*F5+C6*F6+C7*F7+C
8*F8+C9*F9+C10*F10+C
11*F11+C12*F12+C13*F1
3+C14*F14
Constraint
value, 420,
typed in cell
=SUMPRODUCT(C5:C14,
Decisi F17
E5:E14)
on or
variabl =C5*E5+C6*E6+C7*E7+
e, C8*E8+C9*E9+C10*E10+
C5:C1 C11*E11+C12*E12+C13*
4 E13+C14*E14 Exhibit 4.5
Copyright 2016 Pearson Education, Inc. 4-11
A Diet Example
Solution with Excel Solver Window
(5Decision
of 5)
variables;
servings in
column C
Constraint for calories in
column F;
SUMPRODUCT
(C5:C14,F5:F14)<420

Exhibit 4.6
Copyright 2016 Pearson Education, Inc. 4-12
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,
CDs a 5% return, t-bills a 6.5% return, and growth
stock 13%.

The following guidelines have been established:


1. No more than 20% in municipal bonds
2. Investment in CDs should not exceed the other three
alternatives
3. At least 30% invested in treasury bills and CDs
4. More should be invested in CDs and treasury bills
than in municipal bonds and growth stocks by a ratio
of 1.2 to 1
5. All $70,000 should be invested.
Copyright 2016 Pearson Education, Inc. 4-13
An Investment Example
Model Summary (2 of 5)
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, x2, x3, x4 0
where
x1 = amount ($) invested in municipal bonds
x2 = amount ($) invested in certificates of
deposit
xPearson
Copyright 2016 = amount
Education, Inc. ($) invested in treasury bills 4-14
An Investment Example
Computer Solution with Excel (3 of
5) Objective
function, Z, for
total return

First
guideline,
=D6*B13

Total investment requirement,


=D10*B13+E10*B14+F10*B15+
G10*B16
Exhibit 4.7

Copyright 2016 Pearson Education, Inc. 4-15


An Investment Example
Solution with Excel Solver Window
(3 of 4)

Guideline
constraints

Exhibit 4.8

Copyright 2016 Pearson Education, Inc. 4-16


An Investment Example
Sensitivity Report (4 of 4)

Shadow price for


the amount
available to invest

Exhibit 4.9
Copyright 2016 Pearson Education, Inc. 4-17
A Marketing Example
Data and Problem Definition (1 of 7)

Budget limit $100,000


Television time for no more than four commercials
Radio time for no more than 10 commercials
Newspaper space for no more than 7 ads
Resources for no more than 15 commercials and/or
ads
Maximize
Copyright Total
2016 Pearson Education, Inc.Exposure 4-18
A Marketing Example
Model Summary (2 of 7)
Maximize Z = 20,000x1 + 2,000x2 + 9,000x3
subject to:
15,000x1 + 6,000x 2+ 4,000x3 100,000
x1 4
x2 10
x3 7
x1 + x2 + x3 15
x1, x2, x3 0
where
x1 = number of television commercials
x2 = number of radio commercials
x3 = number of newspaper ads

Copyright 2016 Pearson Education, Inc. 4-19


A Marketing Example
Solution with Excel (3 of 7)
Exhibit
4.10

Objective
function

=F6*D6+F7*D7+F8*D8
or
=SUMPRODUCT(D6:D8,
F6:F8)
Copyright 2016 Pearson Education, Inc. 4-20
A Marketing Example
Solution with Excel Solver Window
(4 of 7)

Includes all
five
constraints

Exhibit
Copyright 2016 Pearson Education, Inc. 4.11 4-21
A Marketing Example
Integer Solution with Excel (5 of 7)

Decision
variables

Click on int
for integer.

Exhibit 4.12
Copyright 2016 Pearson Education, Inc. 4-22
A Marketing Example
Integer Solution with Excel (6 of 7)

Integer
restriction

Exhibit 4.13
Copyright 2016 Pearson Education, Inc. 4-23
A Marketing Example
Integer Solution with Excel (7 of 7)

Better solution
Integer solution 17,000 more total
exposuresthan
rounded-down
solution
Exhibit
Copyright 2016 Pearson Education, Inc. 4-24
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

Copyright 2016 Pearson Education, Inc. 4-25


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

Copyright 2016 Pearson Education, Inc. 4-26


A Transportation Example
Solution with Excel (3 of 4)

=C5+D5+E5
=C5+C6+C
7
Exhibit
4.15
Copyright 2016 Pearson Education, Inc. 4-27
A Transportation Example
Solution with Solver Window (4 of 4)

Decision variables

Demand
constraints

Supply constraints

Exhibit
Copyright 2016 Pearson Education, Inc.
4.16 4-28
A Blend Example
Problem Definition and Data (1 of 7)

Copyright 2016 Pearson Education, Inc. 4-29


A Blend Example
Problem Statement and Variables (2
of 7)
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.

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

Copyright 2016 Pearson Education, Inc. 4-30


A Blend Example
Problem Statement and Variables (3
of 7)
Blend specification constraint for super,
which must contain 50% of component 1.

x1s Convert to standard


0.50 form, a linear function
x1s x2 s x3 s
on the left side and
numeric value on the
Multiply both sides by the
right.
denominator and collect
terms
x 0.50( x x x )
1s 1s 2s 3s

0.5 x1s 0.5 x2 s 0.5 x3 s 0


Copyright 2016 Pearson Education, Inc. 4-31
A Blend Example
Model Summary (4 of 7)
Maximize Z = 11x1s + 13x2s + 9x3s + 8x1p + 10x2p
+ 6x3p + 6x1e + 8x2e + 4x3e
subject to:
x1s + x1p + x1e 4,500 bbl.
x2s + x2p + x2e 2,700 bbl.
x3s + x3p + x3e 3,500 bbl.
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 xij 0
0.90x2e - 0.10x1e - 0.10x3e all
x1s + x2s + x3s 3,000 bbl.
Copyright 2016 Pearson Education, Inc. 4-32
A Blend Example
Solution with Excel (5 of 7)

=B7+B10+
B13

=B7+B8+ =0.5*B7-0.5*B8-
Decision variables -
B9 0.5*B9
B7:B15
Exhibit
Copyright 2016 Pearson Education, Inc. 4-33
A Blend Example
Solution with Solver Window (6 of 7)

Exhibit 4.18

Copyright 2016 Pearson Education, Inc. 4-34


A Blend Example
Sensitivity Report (7 of 7)

Exhibit 4.19

The shadow The upper limit for the


price for sensitivity range for
component 1 is component 1 is
$20.
Copyright 2016 Pearson Education, Inc. 4500+1700=6200. 4-35
A Multiperiod Scheduling Example
Problem Definition and Data (1 of 5)
Production Capacity: 160 computers per week
50 more computers with
overtime
Assembly Costs: $190 per computer regular time;
$260 per computer overtime
Inventory Holding Cost: $10/computer per week
Order schedule:

Copyright 2016 Pearson Education, Inc. 4-36


A Multi-Period Scheduling Example
Decision Variables (2 of 5)

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)

Copyright 2016 Pearson Education, Inc. 4-37


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
r Pearson
Copyright 2016 + oEducation,
+ i Inc.- i = 180 week 4 4-38
A Multi-Period Scheduling Example
Solution with Excel (4 of 5)

G7-
H7

B7+D7+I6; regular
Decision Decision production +
variables for variables for overtime
regular overtime production +
production production inventory from
B6:B11
Copyright
D6:D11
2016 Pearson Education, Inc.
Exhibit 4.20week 4-39
previous
A Multi-Period Scheduling Example
Solution with Solver Window (5 of 5)

Exhibit
Copyright 2016 Pearson Education, Inc. 4-40
A Data Envelopment Analysis (DEA)
Example
Problem Definition (1 of 5)
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
Input 2 = supplementary funds/student
Input 3 = average educational level of parents

Output 1 = average reading SOL score


Output 2 = average math SOL score
Output 3 = average history SOL score

Copyright 2016 Pearson Education, Inc. 4-41


A Data Envelopment Analysis (DEA)
Example
Problem Data Summary (2 of 5)

Copyright 2016 Pearson Education, Inc. 4-42


A Data Envelopment Analysis (DEA)
Example
Decision Variables and Model
Decision Variables:
Summary (3 of 5)
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
81x1Education,
Copyright 2016 Pearson + 73x Inc. 2 + 69x3 .06y1 + 460y2 + 13.1y3 4-43
A Data Envelopment Analysis (DEA)
Example
Solution with Excel (4 of 5)

=E8*D12+F8*D13+G8
*D14
=B5*B12+C5*B13+D
5*B14
Value of outputs, also in
cell H8
Exhibit
Copyright 2016 Pearson Education, Inc. 4-44
A Data Envelopment Analysis (DEA)
Example
Solution with Solver Window (5 of 5)

Scaling
constraint

Constraint
for outputs
< inputs

Exhibit
Copyright 2016 Pearson Education, Inc. 4-45
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.

How many cans of Bow Chow and Meow Chow


should be produced each week in order to
maximize profit?
Copyright 2016 Pearson Education, Inc. 4-46
Example Problem Solution
Model Formulation (2 of 5)

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)

Copyright 2016 Pearson Education, Inc. 4-47


Example Problem Solution
Model Formulation (3 of 5)
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
Copyright 2016 Pearson Education, Inc. 4-48
Example Problem Solution
Model Summary (4 of 5)

Step 4: Model Summary


Maximize Z = $0.05xhm + $0.05xfm + $0.05xcm +
$0.06xhb + 0.06xfb + 0.06xcb
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
Copyright 2016 Pearson Education, Inc. 4-49
Example Problem Solution
Solution with QM for Windows (5 of
5)

Solution to the Barks Pet Food Company problem using


QM for Windows

To determine the number of cans of each flavor, we must


sum the ingredient amounts for each and divide by 16
ounces (the size of a can).

xhm+xfm+xcm=0+8,400+8,400=16,800 oz. of Meow Chow


16,800 / 16 = 1,050 cans of Meow Chow
Copyright 2016 Pearson Education, Inc. 4-50
All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, electronic, mechanical, photocopying,
recording, or otherwise, without the prior written permission of the publisher.
Printed in the United States of America.

Copyright 2016 Pearson Education, Inc. 4-51

Vous aimerez peut-être aussi