Im423 - or - Lec03
Im423 - or - Lec03
A Diet Example
Data and Problem Definition (1 of 5)
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
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
• 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
• 2x2 + 2x3 + 2x4 + 5x5 + 3x6 + 4x8 + x10 20
• 270x5 + 8x6 + 12x8 30
• xi 0, for all i
10
A Diet Example
Computer Solution with Excel (4 of 5)
11
A Diet Example
Solution with Excel Solver Window (5 of 5)
12
A Marketing Example
Data and Problem Definition (1 of 4)
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
13
A Marketing Example
Model Summary (2 of 4)
Maximize Z = 20,000x1 + 12,000x2 + 9,000x3
subject to:
• 15,000x1 + 6,000x2 + 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
14
A Marketing Example
Solution with Excel (3 of 4)
15
A Marketing Example
Solution with Excel Solver Window (4 of 4)
16
LP Applications
17
LP Applications
18
LP Applications
Decision Variables
• X1 = number of pounds of stock X purchased per cow each month
• X2 = number of pounds of stock Y purchased per cow each month
• X3 = number of pounds of stock Z purchased per cow each month
Objective Function
• Minimize cost = 0.02X1 + 0.04X2 + 0.025X3
Constraints
• Ingredient A requirement: 3X1 + 2X2 + 4X3 ≥ 64
• Ingredient B requirement: 2X1 + 3X2 + 1X3 ≥ 80
• Ingredient C requirement: 1X1 + 0X2 + 2X3 ≥ 16
• Ingredient D requirement: 6X1 + 8X2 + 4X3 ≥ 128
• Stock Z limitation: X3 ≤ 8
• Non-negativity: X1, X2, X3 ≥ 0
19
A Transportation Example
Problem Definition and Data (1 of 3)
Warehouse supply of TVs: Retail store demand for TVs:
1 - Cincinnati 300 A - New York 150
2 - Atlanta 200 B - Dallas 250
3 - Pittsburgh 200 C - Detroit 200
Total 700 Total 600
20
A Transportation Example
Model Summary (2 of 4)
Decision variables: subject to:
Xij: number of TVs to ship from • Capacity Constraints
warehouse i to retail store j x1A + x1B + x1C 300
• i= 1,2,3 and j=A, B, C x2A+ x2B + x2C 200
x3A+ x3B + x3C 200
• Demand Constraints
Minimize Z = $16x1A + 18x1B
x1A + x2A + x3A = 150
+ 11x1C + 14x2A + 12x2B +
x1B + x2B + x3B = 250
13x2C + 13x3A + 15x3B + 17x3C
x1C + x2C + x3C = 200
• Non-negativity Constraints
All xij 0
21
A Transportation Example
Solution with Excel (3 of 4)
22
A Transportation Example
Solution with Solver Window (4 of 4)
23
A Blend Example
Problem Definition and Data (1 of 5)
Maximum Barrels
Component Cost/barrel
Available/day
1 4,500 $12
2 2,700 10
3 3,500 14
24
A Blend Example
Problem Statement and Variables (2 of 5)
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 gasoline.
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).
25
A Blend Example
Model Summary (3 of 5)
Max 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
26
A Blend Example
Solution with Excel (4 of 5)
27
A Blend Example
Solution with Solver Window (5 of 5)
28
29
30
31
Decision variables:
• Xij : the kilowatt-hour used from source i for purpose j
Objective function:
Minimize 𝑧 = 0.4 (𝑥 + 𝑥 + 𝑥 ) + 0.3 (𝑥 +𝑥 +𝑥 )
+ 0.05 (𝑥 + 𝑥 + 𝑥 )
Constraints:
• 𝑥 +𝑥 +𝑥 ≥1,800,000 • 𝑥 + 𝑥 + 𝑥 ≥1,075,000
• 𝑥 +𝑥 +𝑥 ≥1,200,000 • 𝑥 + 𝑥 + 𝑥 ≥1,900,000
• 𝑥 + 𝑥 + 𝑥 ≥950,000
• 𝑥 +𝑥 +𝑥 ≥900,000
• 𝑥 ≥ 0 , 𝑖, 𝑗 = 1,2,3
• 6(𝑥 + 𝑥 + 𝑥 ) ≥600,000
• 3(𝑥 + 𝑥 + 𝑥 ) ≥800,000
• 2(𝑥 + 𝑥 + 𝑥 ) ≥375,000
32
Decision variables
Constraints
Objective
function
33
34