Chapter 7 (Using Binary Integer Programming) : Mcgraw-Hill/Irwin
Chapter 7 (Using Binary Integer Programming) : Mcgraw-Hill/Irwin
• Since binary variables only provide two choices, they are ideally suited to be
the decision variables when dealing with yes-or-no decisions.
• Examples:
– Should we undertake a particular fixed project?
– Should we make a particular fixed investment?
– Should we locate a facility in a particular site?
• Management is also considering building at most one new warehouse, but will
restrict the choice to a city where a new factory is being built.
B C D E F G
3 NPV ($millions) LA SF
4 Warehouse 6 4
5
6 Factory 8 5
7
8 Capital Required
9 ($millions) LA SF
10 Warehouse 5 2 Capital Capital
11 Spent Available
12 Factory 6 3 9 <= 10
13
14 Total Maximum
15 Build? LA SF Warehouses Warehouses
16 Warehouse 0 0 0 <= 1
17 <= <=
18 Factory 1 1
19
20 Total NPV ($millions) 13
B C D E F G
23 Capital Available Warehouse Warehouse Factory Factory Total NPV
24 ($millions) in LA? in SF? in LA? in SF? ($millions)
25 0 0 1 1 13
26 5 0 1 0 1 9
27 6 0 1 0 1 9
28 7 0 1 0 1 9
29 8 0 1 0 1 9
30 9 0 0 1 1 13
31 10 0 0 1 1 13
32 11 0 1 1 1 17
33 12 0 1 1 1 17
34 13 0 1 1 1 17
35 14 1 0 1 1 19
36 15 1 0 1 1 19
• Investment Analysis
– Should we make a certain fixed investment?
– Examples: Turkish Petroleum Refineries (1990), South African National Defense
Force (1997), Grantham, Mayo, Van Otterloo and Company (1999)
• Site Selection
– Should a certain site be selected for the location of a new facility?
– Example: AT&T (1990)
• Dispatching Shipments
– Should a certain route be selected for a truck? Should a certain size truck be used?
Should a certain time period for departure be used?
– Examples: Quality Stores (1987), Air Products and Chemicals, Inc. (1983),
Reynolds Metals Co. (1991), Sears, Roebuck and Company (1999)
• Airline Applications:
– Should a certain type of airplane be assigned to a certain flight leg? Should a certain
sequence of flight legs be assigned to a crew?
– Examples: American Airlines (1989, 1991), Air New Zealand (2001)
1 2 3 4 5
Up Stable Choice Hope Release
subject to
A B C D E F G H I J
1 Tazer Corp. Project Selection Problem
2
3
4 Up Stable Choice Hope Release Total Budget
5 R&D Investment ($million) 400 300 600 500 200 1200 <= 1200
6 Success Rate 50% 35% 35% 20% 45%
7 Revenue if Successful ($million) 1400 1200 2200 3000 600
8 Expected Profit ($million) 300 120 170 100 70 540
9
10 Do Project? 1 0 1 0 1
• They still have only one fire station, located in the congested center of town
• The result has been long delays in fire trucks reaching the outer part of the city
Goal: Develop a plan for locating multiple fire stations throughout the city
subject to
Tract 1: x1 + x2 + x4 ≥ 1
Tract 2: x1 + x2 + x3 ≥ 1
Tract 3: x2 + x3 + x6 ≥ 1
Tract 4: x1 + x4 + x7 ≥ 1
Tract 5: x5 + x7 ≥ 1
Tract 6: x3 + x6 + x8 ≥ 1
Tract 7: x4 + x7 + x8 ≥ 1
Tract 8: x6 + x7 + x8 ≥ 1
• Southwestern Airways needs to assign crews to cover all its upcoming flights.
Seat tl e
(SEA)
Los Angel es
(LAX)
B C D E F G H I J K L M N O P Q
3 Flight Sequence
4 1 2 3 4 5 6 7 8 9 10 11 12
5 Cost ($thousands) 2 3 4 6 7 5 7 8 9 9 8 9 At
6 Least
7 Includes Segment? Total One
8 SFO-LAX 1 0 0 1 0 0 1 0 0 1 0 0 1 >= 1
9 SFO-DEN 0 1 0 0 1 0 0 1 0 0 1 0 1 >= 1
10 SFO-SEA 0 0 1 0 0 1 0 0 1 0 0 1 1 >= 1
11 LAX-ORD 0 0 0 1 0 0 1 0 1 1 0 1 1 >= 1
12 LAX-SFO 1 0 0 0 0 1 0 0 0 1 1 0 1 >= 1
13 ORD-DEN 0 0 0 1 1 0 0 0 1 0 0 0 1 >= 1
14 ORD-SEA 0 0 0 0 0 0 1 1 0 1 1 1 1 >= 1
15 DEN-SFO 0 1 0 1 1 0 0 0 1 0 0 0 1 >= 1
16 DEN-ORD 0 0 0 0 1 0 0 1 0 0 1 0 1 >= 1
17 SEA-SFO 0 0 1 0 0 0 1 1 0 0 0 1 1 >= 1
18 SEA-LAX 0 0 0 0 0 1 0 0 1 1 1 1 1 >= 1
19
20 Total Number
21 1 2 3 4 5 6 7 8 9 10 11 12 Sequences of Crews
22 Fly Sequence? 0 0 1 1 0 0 0 0 0 0 1 0 3 <= 3
23
24 Total Cost ($thousands) 18
Suppose that two changes are made to the original Wyndor problem:
1. For each product, producing any units requires a substantial one-time setup
cost for setting up the production facilities.
2. The production runs for these products will be ended after one week, so D and
W in the original model now represent the total number of doors and windows
produced, respectively, rather than production rates. Therefore, these two
variables need to be restricted to integer values.
Optimal solution
6 (2, 6)
0 2 4 6 8 10 D
Production rate for doors
8
Production
quantity for
windows (0, 6) gives P = 1700
6 (2, 6) gives P = -100 + 1700
= 1600
B C D E F G H
3 Doors Windows
4 Unit Profit $300 $500
5 Setup Cost $700 $1,300
6
7 Hours Hours
8 Hours Used Per Unit Produced Used Available
9 Plant 1 1 0 0 <= 4
10 Plant 2 0 2 12 <= 12
11 Plant 3 3 2 12 <= 18
12
13 Doors Windows
14 Units Produced 0 6
15 <= <= Production Profit $3,000
16 Only If Setup 0 99 - Total Setup Cost $1,300
17 Setup? 0 1 Total Profit $1,700
1 2 3 4 5 x1
x2
1 2 3 4 5 x1
x2
1 2 3 4 5 x1
• Set-covering problems
– Make a set of assignments that “cover” a set of requirements.
• Fixed costs
– If a product is produced, must incur a fixed setup cost.
– If a warehouse is operated, must incur a fixed cost.
A B C D E F G H I
1 Norwood Development Capital Budgeting
2
3 Project 1 Project 2 Project 3 Project 4
4 NPV ($million) 30 16 22 14
5 Cumulative Cumulative
6 Cumulative Outflow Required ($million) Outflow Available
7 Year 1 9 7 6 11 22 <= 28
8 Year 2 15 11 9 11 35 <= 41
9 Year 3 21 11 13 11 45 <= 51
10
11 Total NPV
12 Project 1 Project 2 Project 3 Project 4 ($million)
13 Undertake? 1 1 1 0 68
• Response time is critical, so they would like every county to either have a
team located in that county or in an adjacent county.
Counties
9 1. Clallum 19. Chelan
18
2. J efferson 20. Douglas
10 26 27 28 3. Grays Harbor 21. Kittitas
4. Pacific 22. Grant
1 5. Wahkiakum 23. Yakima
11
6. Kitsap 24. Klickitat
2 19 7. Mason 25. Benton
6 20 8. Thurston 26. Ferry
29 30
7 12 9. Whatcom 27. Stevens
3 10. Skagit 28. Pend Oreille
21 11. Snohomish 29. Lincoln
8 13 22
31 32 12. King 30. Spokane
13. Pierce 31. Adams
4 14
36 14. Lewis 32. Whitman
33
5 23 15. Cowlitz 33. Franklin
15 25 35 16. Clark 34. Walla Walla
34 37
17 17. Skamania 35. Columbia
16 24 18. Okanogan 36. Garfield
37. Asotin
County 2 covered: y1 + y2 + y3 + y6 + y7 ≥ 1
A B C D E F G H I J K L M N
1 Search & Rescue Location
2
3 # Teams # Teams
4 County Team? Nearby County Team? Nearby
5 1 Clallam 0 1 >= 1 19 Chelan 0 2 >= 1
6 2 Jefferson 1 1 >= 1 20 Douglas 0 1 >= 1
7 3 Grays Harbor 0 2 >= 1 21 Kittitas 1 1 >= 1
8 4 Pacific 0 1 >= 1 22 Grant 0 1 >= 1
9 5 Wahkiakum 0 1 >= 1 23 Yakima 0 3 >= 1
10 6 Kitsap 0 1 >= 1 24 Klickitat 0 1 >= 1
11 7 Mason 0 1 >= 1 25 Benton 0 1 >= 1
12 8 Thurston 0 1 >= 1 26 Ferry 0 1 >= 1
13 9 Whatcom 0 1 >= 1 27 Stevens 1 1 >= 1
14 10 Skagit 1 1 >= 1 28 Pend Oreille 0 1 >= 1
15 11 Snohomish 0 1 >= 1 29 Lincoln 0 1 >= 1
16 12 King 0 1 >= 1 30 Spokane 0 1 >= 1
17 13 Pierce 0 2 >= 1 31 Adams 0 1 >= 1
18 14 Lewis 1 2 >= 1 32 Whitman 0 2 >= 1
19 15 Cowlitz 0 2 >= 1 33 Franklin 1 1 >= 1
20 16 Clark 0 1 >= 1 34 Walla Walla 0 1 >= 1
21 17 Skamania 1 2 >= 1 35 Columbia 0 1 >= 1
22 18 Okanogan 0 1 >= 1 36 Garfield 1 1 >= 1
23 37 Asotin 0 1 >= 1
24 Total Teams: 8
A B C D E F G H
1 Woodridge Pewter Company
2
3 Platters Bowls Pitchers
4 Sales Price $100 $85 $75
5 Variable Cost $60 $50 $40
6 Fixed Cost $400 $250 $300
7
8 Constraint Usage (per unit produced) Total Available
9 Labor (hrs.) 3 1 4 60 <= 130
10 Pewter (lbs.) 5 4 3 240 <= 240
11
12 Lease Equipment? 0 1 0
13 Revenue $5,100
14 Production Quantity 0 60 0 Variable Cost $3,000
15 <= <= <= Fixed Cost $250
16 Produce only if Lease 0 99 0 Profit $1,850
• Fixed costs
– If a product is produced, must incur a fixed setup cost.
– If a warehouse is operated, must incur a fixed cost.
• Either-or constraints
– Production must either be 0 or ≥ 100.
• Subset of constraints
– meet 3 out of 4 constraints.
• A company is planning their capital budget over the next several years.
• They have calculated the expected net present value of each project, along
with the cash outflow that would be required over the next five years.
A B C D E F G H I J K L M N O
1 Capital Budgeting with Contingency Constraints
2
3 Project Project Project Project Project Project Project Project Project Project
4 1 2 3 4 5 6 7 8 9 10
5 NPV ($million) 20 25 22 30 42 25 18 35 28 33
6 Cumulative Cumulative
7 Cumulative Cash Outflow Required ($million) Total Outflow Available
8 Year 1 1 4 0 4 4 3 2 8 2 6 22 <= 25
9 Year 2 3 6 2 6 6 6 4 11 5 12 44 <= 50
10 Year 3 6 8 7 8 10 8 7 15 13 14 73 <= 75
11 Year 4 10 12 12 12 15 11 8 17 14 15 97 <= 100
12 Year 5 11 13 12 18 20 16 13 18 15 17 117 <= 125
13
14 Project Project Project Project Project Project Project Project Project Project Total NPV
15 1 2 3 4 5 6 7 8 9 10 ($million)
16 Undertake? 1 1 1 0 1 1 1 0 1 1 213
17
18 Contingency Constraints
19 Project 1,2,3 3 >= 1
20 Project 4,5 1 <= 1
21 Project 7 1 <= 1 Project 6
• To generate electricity, a generator must be started up, and associated with this
is a fixed startup cost.
• All of the generators are shut off at the end of each day.
Generator
A B C D E
Fixed Startup Cost $2,450 $1,600 $1,000 $1,250 $2,200
Variable Cost (per MW) $3 $4 $6 $5 $4
Capacity (MW) 2,000 2,800 4,300 2,100 2,000
A B C D E F G H I J
1 Electrical Utility Generator Startup Planning
2
3 Generator A Generator B Generator C Generator D Generator E
4 Fixed Startup Cost $2,450 $1,600 $1,000 $1,250 $2,200
5 Cost per Megawatt $3 $4 $6 $5 $4
6 Max Capacity (MW) 2,000 2,800 4,300 2,100 2,000
7
8 Startup? 1 1 0 1 0
9 Total MW MW Needed
10 MW Generated 2,100 3,000 0 900 0 6000 >= 6,000
11 <= <= <= <= <=
12 Capacity 2,000 2,800 0 2,100 0
13
14 Fixed Cost $5,300
15 Variable Cost $22,800
16 Total Cost $28,100
• Now suppose that they would not produce any fewer than 200 units of either
product (i.e., either produce 0 or at least 200).
A B C D E F G
1 Quality Furniture (with either-or constraints)
2
3 Benches Tables
4 Profit $8.00 $18.00
5 Min Production (if any) 200 200
6
7 Resources Resources
8 Use of Resources Used Available
9 Labor 3 6 1600 <= 1,600
10 Wood 12 38 6400 <= 9,000
11
12 Produce? 1 0
13
14 Min Production 200 0
15 <= <= Total Profit
16 Production Quantities 533.33 0 $4,266.67
17 <= <=
18 Max Production 533 0
19 Max Possible 533 237
Constraints:
y1 + y2 + y3 + y4 ≥ 3
12x1 + 24x2 + 18x3 ≥ 2,400y1
15x1 + 32x2 + 12x3 ≥ 1,800y2
20x1 + 15x2 + 20x3 ≤ 2,000 + M (1 – y3)
18x1 + 21x2 + 15x3 ≤ 1,600 + M (1 – y4)
Questions:
Which plants should they keep open?
Which warehouses should they keep open?
How should they divide production among the open plants?
How much should be shipped from each plant to each warehouse, and from each
warehouse to each customer?
A B C D E F G H I J K L M
1 Plant to Warehouse
2 Shipping + Production Fixed
3 Cost Warehouse 1 Warehouse 2 Warehouse 3 Cost Capacity
4 Plant 1 $650 $750 $850 $42,000 400
5 Plant 2 $500 $350 $550 $50,000 300
6 Plant 3 $450 $450 $350 $45,000 300
7 Plant 4 $400 $500 $600 $50,000 350
8 Plant 5 $550 $450 $350 $47,000 375
9
10 Shipment Total Actual
11 Quantities Warehouse 1 Warehouse 2 Warehouse 3 Shipped Capacity Open? Total Costs
12 Plant 1 0 0 0 0 <= 0 0 Shipping Cost (P-->W) $332,500
13 Plant 2 0 300 0 300 <= 300 1 Shipping Cost (W-->C) $37,375
14 Plant 3 0 0 275 275 <= 300 1 Fixed Cost (P) $142,000
15 Plant 4 0 0 0 0 <= 0 0 Fixed Cost (W) $90,000
16 Plant 5 0 0 375 375 <= 375 1 Total Cost $601,875
17 Total Shipped 0 300 650
18
19 Warehouse to Customer
20 Shipping Fixed
21 Cost Customer 1 Customer 2 Customer 3 Customer 4 Cost Capacity
22 Warehouse 1 $25 $65 $70 $35 $45,000 600
23 Warehouse 2 $50 $25 $40 $60 $25,000 400
24 Warehouse 3 $60 $20 $40 $45 $65,000 900
25
26 Shipment Shipped Shipped Actual
27 Quantities Customer 1 Customer 2 Customer 3 Customer 4 Out In Capacity Open?
28 Warehouse 1 0 0 0 0 0 <= 0 <= 0 0
29 Warehouse 2 250 0 50 0 300 <= 300 <= 400 1
30 Warehouse 3 0 225 150 275 650 <= 650 <= 900 1
31 Total Shipped 250 225 200 275
32 >= >= >= >=
33 Needed 250 225 200 275