Lec 5-6 Applications of Linear Programming (1)
Lec 5-6 Applications of Linear Programming (1)
Course: OR
Lecture 5
Problem Definition (1 of 8)
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?
Model Construction (4 of 8)
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
© Dr. Waqas Ahmed 7
A Product Mix Example »Dr. Waqas Ahmed
=D7*B14+E7*B15+F7*B
16+G7*B17
=J7-These cells
H7 have no
effect;
added for
“cosmetic”
Model
=F11*B16+G formulation
purposes.
11*B17 included on all
Excel files on
Exhibit 4.1
Companion
Web site © Dr. Waqas Ahmed 8
A Product Mix Example »Dr. Waqas Ahmed
Includes
all five
constrai
nts.
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 + 9x8+ x9 + 3x10 20 g protein
5x1 + 2x2 + 3x3 + 4x4+ x7 + 3x10 12
xi 0, for all j
=SUMPRODUCT(C5:C14,
F5:F14)
or
=C5*F5+C6*F6+C7*F7+C8
*F8+C9*F9+C10*F10+C11
*F11+C12*F12+C13*F13+
C14*F14
Constraint
value, 420,
=SUMPRODUCT(C5:C14,E5:E
typed in cell
14) F17
Decision or
variable, =C5*E5+C6*E6+C7*E7+C8*E8
C5:C14 +C9*E9+C10*E10+C11*E11+C
12*E12+C13*E13+C14*E14
© Dr. Waqas Ahmed 16
A Diet Example »Dr. Waqas Ahmed
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%.
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
x3 = amount ($) invested in treasury bills
x4 = amount ($) invested in growth stock fund
© Dr. Waqas Ahmed 21
An Investment Example »Dr. Waqas Ahmed
Total investment
requirement,
=D10*B13+E10*B14+F10*
B15+G10*B16
Guideline
constraints
Sensitivity Report (4 of 4)
Shadow price
for the amount
available to
invest
Exhibit 4.9
© Dr. Waqas Ahmed 24
»Dr. Waqas Ahmed
Model Summary (2 of 7)
Objective
function
=F6*D6+F7*D7+F8*D8
or
=SUMPRODUCT(D6:D8,
F6:F8)
© Dr. Waqas Ahmed 28
A Marketing Example »Dr. Waqas Ahmed
Includes
all five
constrain
ts
Decision
variables
Click on
“int” for
integer.
Integer
restriction
Better solution—17,000
Integer solution more total exposures—
than rounded-down
solution
© Dr. Waqas Ahmed 32
»Dr. Waqas Ahmed
To Store
From Warehouse
A B C
1 $16 $18 $11
2 14 12 13
3 13 15 17
© Dr. Waqas Ahmed 34
A Transportation Example »Dr. Waqas Ahmed
Model Summary (2 of 4)
=C5+D5+E5
=C5+C6+C7
Decision variables
Demand
constraints
Supply constraints
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
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.90x2e - 0.10x1e - 0.10x3e 0
x1s + x2s + x3s 3,000 bbl.
x1p+ x2p + x3p 3,000 bbl.
x1e+ x2e + x3e 3,000 bbl. all xij 0
=B7+B10
+B13
Sensitivity Report (7 of 7)
The
The upper limit for the
shadow
sensitivity range for
price for
component 1 is
component © Dr. Waqas Ahmed 45
»Dr. Waqas Ahmed
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)
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 50 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
rj, oj, ij 0 © Dr. Waqas Ahmed 49
A Multi-Period Scheduling Example »Dr. Waqas Ahmed
G7-H7
B7+D7+I6; regular
Decision variables Decision variables production + overtime
for regular for overtime production +
production – B6:B11 production – inventory from
D6:D11 previous week
© Dr. Waqas Ahmed 50
»Dr. Waqas Ahmed