Upload
others
View
9
Download
0
Embed Size (px)
Citation preview
Session #6 Page 1 Integer Programming
Integer Programming
When are “non-integer” solutions okay?
• Solution is naturally divisible
• Solution represents a rate
• Solution only for planning purposes When is rounding okay?
Session #6 Page 2 Integer Programming
The Challenges of Rounding
• Rounded solution may not be feasible • Rounded solution may not be close to optimal • There can be many rounded solutions
Example Consider a problem with 30 variables that are non-integer in the LP solution. How many possible rounded solutions are there?
Session #6 Page 3 Integer Programming
How Integer Programs are Solved
Session #6 Page 4 Integer Programming
Applications of Binary Variables
• Making “yes or no” type decisions • Set-covering problems • Fixed costs
Session #6 Page 5 Integer Programming
Example #1 (Capital Budgeting)
Mercer Development is considering the potential of four different development projects. Each project would be completed in at most three years. The required cash outflow for each project is given in the table below, along with the net present value of each project to Mercer, and the cash that is available (from previous projects) each year.
Cash Outflow Required ($million) Cash Available
Project 1 Project 2 Project 3 Project 4 ($million) Year 1 10 8 6 12 30 Year 2 8 5 4 0 15 Year 3 8 0 6 0 12 NPV 35 18 24 16
Session #6 Page 6 Integer Programming
Spreadsheet Solution to Example #1
1
2
3
4
5
6
7
8
9
10
11
12
13
A B C D E F G H I
Mercer Development Capital Budgeting
Project 1 Project 2 Project 3 Project 4NPV ($million) 35 18 24 16
Total Outflow AvailableYear 1 10 8 6 12 30 <= 30Year 2 8 5 4 0 13 <= 15Year 3 8 0 6 0 8 <= 12
Total NPVProject 1 Project 2 Project 3 Project 4 ($million)
Undertake? 1 1 0 1 69
Cash Outflow Required ($million)
3
4
5
6
7
8
9
10
11
12
13
B C D E F G H I
Project 1 Project 2 Project 3 Project 4NPV ($million) 35 18 24 16
Total Outflow AvailableYear 1 10 8 6 12 =SUMPRODUCT($C$13:$F$13,C7:F7) <= 30Year 2 8 5 4 0 =SUMPRODUCT($C$13:$F$13,C8:F8) <= 15Year 3 8 0 6 0 =SUMPRODUCT($C$13:$F$13,C9:F9) <= 12
Total NPVProject 1 Project 2 Project 3 Project 4 ($million)
Undertake? 1 1 0 1 =SUMPRODUCT(C13:F13,C4:F4)
Cash Outflow Required ($million)
Session #6 Page 7 Integer Programming
Additional Considerations (Logic and Dependency Constraints)
• At least one of projects 1, 2, or 3: • Project 2 can’t be done unless project 3 is done: • Either project 3 or project 4, but not both: • No more than two projects total:
Session #6 Page 8 Integer Programming
Example #2 (Set Covering Problem) Suppose the Washington State legislature is trying to decide on locations at which to base search-and-rescue teams. The teams are expensive, and hence they would like as few as possible. However, since response time is critical, they would like every county to either have a team located in that county, or in an adjacent county. Where should the teams be located.
Session #6 Page 9 Integer Programming
Spreadsheet Solution to Example #2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
A B C D E F G H I J K L M N
Search & Rescue Location
# Teams # Teams
County Team? Nearby County Team? Nearby
1 Clallam 0 1 >= 1 19 Chelan 0 2 >= 1
2 Jefferson 1 1 >= 1 20 Douglas 0 1 >= 1
3 Grays Harbor 0 2 >= 1 21 Kittitas 1 1 >= 1
4 Pacific 0 1 >= 1 22 Grant 0 1 >= 1
5 Wahkiakum 0 1 >= 1 23 Yakima 0 3 >= 1
6 Kitsap 0 1 >= 1 24 Klickitat 0 1 >= 1
7 Mason 0 1 >= 1 25 Benton 0 1 >= 1
8 Thurston 0 1 >= 1 26 Ferry 0 1 >= 1
9 Whatcom 0 1 >= 1 27 Stevens 1 1 >= 1
10 Skagit 1 1 >= 1 28 Pend Oreille 0 1 >= 1
11 Snohomish 0 1 >= 1 29 Lincoln 0 1 >= 1
12 King 0 1 >= 1 30 Spokane 0 1 >= 1
13 Pierce 0 2 >= 1 31 Adams 0 1 >= 1
14 Lewis 1 2 >= 1 32 Whitman 0 2 >= 1
15 Cowlitz 0 2 >= 1 33 Franklin 1 1 >= 1
16 Clark 0 1 >= 1 34 Walla Walla 0 1 >= 1
17 Skamania 1 2 >= 1 35 Columbia 0 1 >= 1
18 Okanogan 0 1 >= 1 36 Garfield 1 1 >= 1
37 Asotin 0 1 >= 1
Total Teams: 8
Session #6 Page 10 Integer Programming
Spreadsheet Solution to Example #2 (Formulas)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
B C D E F G
# Teams
County Team? Nearby
1 Clallam 0 =D5+D6 >= 1
2 Jefferson 1 =D5+D6+D7+D10+D11 >= 13 Grays Harbor 0 =D6+D7+D8+D11+D12+D18 >= 1
4 Pacific 0 =D7+D8+D9+D18 >= 1
5 Wahkiakum 0 =D8+D9+D18+D19 >= 1
6 Kitsap 0 =D6+D10+D11+D15+D16+D17 >= 1
7 Mason 0 =D6+D7+D10+D11+D12+D17 >= 1
8 Thurston 0 =D7+D11+D12+D17+D18 >= 1
9 Whatcom 0 =D13+D14+D22 >= 1
10 Skagit 1 =D13+D14+D15+D22+K5 >= 1
11 Snohomish 0 =D14+D15+D16+K5 >= 1
12 King 0 =D10+D15+D16+D17+K5+K7 >= 1
13 Pierce 0 =D10+D11+D12+D16+D17+D18+K7+K8 >= 1
14 Lewis 1 =D7+D8+D9+D12+D17+D18+D19+D21+K9 >= 115 Cowlitz 0 =D9+D18+D19+D20+D21 >= 1
16 Clark 0 =D19+D20+D21 >= 1
17 Skamania 1 =D18+D19+D20+D21+K9+K10 >= 1
18 Okanogan 0 =D13+D14+D22+K5+K6+K12+K15 >= 1
Total Teams: =SUM(D5:D22,K5:K23)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
I J K L M N
# Teams
County Team? Nearby
19 Chelan 0 =D14+D15+D16+D22+K5+K6+K7 >= 1
20 Douglas 0 =D22+K5+K6+K7+K8 >= 1
21 Kittitas 1 =D16+D17+K5+K6+K7+K8+K9 >= 1
22 Grant 0 =K6+K7+K8+K9+K11+K15+K16+K17 >= 1
23 Yakima 0 =D17+D18+D21+K7+K8+K9+K10+K11 >= 1
24 Klickitat 0 =D21+K9+K10+K11 >= 1
25 Benton 0 =K8+K9+K10+K11+K19+K20 >= 1
26 Ferry 0 =D22+K12+K13+K15 >= 1
27 Stevens 1 =K12+K13+K14+K15+K16 >= 1
28 Pend Oreille 0 =K13+K14+K16 >= 1
29 Lincoln 0 =D22+K8+K12+K13+K15+K16+K17+K18 >= 1
30 Spokane 0 =K13+K14+K15+K18 >= 1
31 Adams 0 =K8+K15+K17+K18+K19 >= 1
32 Whitman 0 =K15+K16+K17+K18+K19+K21+K22+K23 >= 1
33 Franklin 1 =K8+K11+K17+K18+K19+K20 >= 1
34 Walla Walla 0 =K11+K19+K20+K21 >= 1
35 Columbia 0 =K18+K20+K21+K22 >= 1
36 Garfield 1 =K18+K21+K22+K23 >= 1
37 Asotin 0 =K18+K22+K23 >= 1
Session #6 Page 11 Integer Programming
Example #3 (Fixed Costs)
Gandy Cloth Company is capable of manufacturing three types of clothing: shirts, shorts, and pants. The manufacture of each type of clothing requires that Gandy have the appropriate type of machinery available. This machinery can be rented at the following rates: shirt machinery, $200/week; shorts machinery, $150/week; pants machinery, $100/week. Each type of clothing requires the amount of cloth and labor given in the table below. The sales price and variable cost are also given in the table.
Labor Hours
Cloth (sq. yds.)
Sales Price
Variable Cost
Shirts 3 4 $12 $6 Shorts 2 3 $8 $4 Pants 6 4 $15 $8
Available: 150 hours 160 sq. yds.
Session #6 Page 12 Integer Programming
Spreadsheet Solution to Example #3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
A B C D E F G H
Gandy Cloth Company
Shirt Shorts PantsSales Price $12 $8 $15
Variable Cost $6 $4 $8Fixed Cost $200 $150 $100
Constraint Usage (per unit produced) Total AvailableLabor (hrs.) 3 2 6 150 <= 150
Cloth (sq. yds.) 4 3 4 100 <= 160
Lease Equipment? 0 0 1Revenue $375.00
Production Quantity 0 0 25 Variable Cost $200.00<= <= <= Fixed Cost $100.00
Produce only if Lease 0 0 100 Profit $75.00
Big Number 100
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
B C D E F G H
Shirt Shorts PantsSales Price 12 8 15
Variable Cost 6 4 8Fixed Cost 200 150 100
Constraint Usage (per unit produced) Total AvailableLabor (hrs.) 3 2 6 =SUMPRODUCT($C$14:$E$14,C9:E9) <= 150
Cloth (sq. yds.) 4 3 4 =SUMPRODUCT($C$14:$E$14,C10:E10) <= 160
Lease Equipment? 0 0 1Revenue =SUMPRODUCT(C14:E14,C4:E4)
Production Quantity 0 0 25 Variable Cost =SUMPRODUCT(C5:E5,C14:E14)<= <= <= Fixed Cost =SUMPRODUCT(C12:E12,C6:E6)
Produce only if Lease =$C$18*C12 =$C$18*D12 =$C$18*E12 Profit =H13-H14-H15
Big Number 100