Professional Documents
Culture Documents
2
Total Integer Model
• Machine shop obtaining new presses and lathes.
• Marginal profitability: each press $100/day; each lathe $150/day.
• Resource constraints: $40,000 budget, 200 sq. ft. floor space.
• Machine purchase prices and space requirements:
Required
Machine Floor Space (ft.2) Purchase Price
Press 15 $8,000
Lathe 30 4,000
3
Total Integer Model
4
Mixed Integer Model
5
Mixed Integer Model
x1 = condominiums purchased
x2 = acres of land purchased
x3 = bonds purchased
7
0-1 Integer Model
x1 = construction of a swimming pool
x2 = construction of a tennis center
x3 = construction of an athletic field
x4 = construction of a gymnasium
9
Example of IP solution
LP Optimal Solution:
Z = $1,055.56
x1 = 2.22 presses
x2 = 5.55 lathes
10
How to solve?
• Branch-and-Bound Method
– Traditional approach to solving integer programming problems.
– Feasible solutions can be partitioned into smaller subsets
– Smaller subsets evaluated until best solution is found.
– Method is a tedious and complex mathematical process
11
Total Integer Model with Excel
12
Total Integer Model with Excel
Objective function
Slack, =G6-E6
Decision variables—B10:B11
=C6*B10+D6*B11
13
Total Integer Model with Excel
Integer variables
14
Total Integer Model with Excel
Click on “int”
15
0-1 Model with Excel
16
0-1 Model with Excel
17
0-1 Model with Excel
18
0-1 Model with Excel
19
0-1 Model with Excel
Deactivate
20
Mixed Integer Model with Excel: Try!
21
Integer Programming Problems and Sen-
sitivity Analysis
• Integer programming problems do not readily lend
themselves to sensitivity analysis.
– Small changes in the problem result in completely different so-
lutions.
– Because only a relatively few of the infinite solution possibilities
in a feasible solution space will meet integer requirements.
22
Integer Programming
FORMULATION TECHNIQUES
23
Formulating 0-1 IP
• Either-Or Alternatives
– two alternatives x1, x2 (for example, backup machine)
• x1+x2 = 1, x1, x2=0 or 1
– if it is allowed to use neither machine
• x1+x2 1, x1, x2=0 or 1
• k-Out-of-n Alternatives
– for example, choosing 2 machines out of 5
• x1+x2+x3+x4+x5 = 2, all xj=0 or 1
– at least 2 machines are required out of 5
• x1+x2+x3+x4+x5 2, all xj=0 or 1
– no more than 2 machines are required out of 5
• x1+x2+x3+x4+x5 2, all xj=0 or 1
– 2~4 machines?
24
Example: Capital Budgeting
25
Capital Budgeting
• If-Then Alternatives
– If you buy x2, you should also buy x1.
• x 1 x2 , x1, x2=0 or 1
– If the purchase of either machine requires the purchase of the
other,
• x1 = x2 , x1, x2=0 or 1
27
Formulating 0-1 IP (cont’d)
28
Formulating 0-1 IP (cont’d)
• x1 200y1
• x1 My1 , y1=0 or 1
• Note that,
– x1=0 y1=0
– x1>0 y1=1 x1>=200
29
Fixed Charge and Facility
• Which of six farms should be purchased that will meet current pro-
duction capacity at minimum total cost, including annual fixed
costs and shipping costs?
Available Plant ($/ton shipped)
Plant Capacity
(tons,1000s) Farm A B C
A 12
B 10 1 18 15 12
C 14 2 13 10 17
Farms Annual Fixed Projected Annual 3 16 14 18
Costs Harvest (tons, 1000s) 4 19 15 16
($1000)
1 405 11.2 5 17 19 12
2 390 10.5 6 14 16 12
3 450 12.8
4 368 9.3
5 520 10.8
6 465 9.6
30
Fixed Charge and Facility
yi = 0 if farm i is not selected, and 1 if farm i is selected; i = 1,2,3,4,5,6
xij = potatoes (1000 tons) shipped from farm I to plant j; j = A,B,C.
Minimize Z = 18x1A+ 15x1B+ 12x1C+ 13x2A+ 10x2B+ 17x2C+ 16x3+ 14x3B
+18x3C+ 19x4A+ 15x4b+ 16x4C+ 17x5A+ 19x5B+12x5C+ 14x6A
+ 16x6B+ 12x6C+ 405y1+ 390y2+ 450y3+ 368y4+ 520y5+ 465y6
subject to:
x1A + x2A + x3A + x4A + x5A + x6A = 12
x1B + x2B + x3B + x4B + x5B + x6B = 10
x1C + x2C + x3C + x4C + x5C + x6C = 14
xij ≥ 0 yi = 0 or 1
31
Set Covering
• Deciding on which nodes provide coverage so that all
areas are served.
• A telecommunication company is considering 7 location
nodes to reach all 10 neighborhoods.
– The cost of opening 7 nodes are : 125, 85, 70, 60, 90, 100, 110
– The coverage of 7 nodes are
• node 1: neighborhoods 1,3,4,6,9,10
• node 2: neighborhoods 2,4,6,8
• node 3: neighborhoods 1,2,5
• node 4: neighborhoods 3,6,7,10
• node 5: neighborhoods 2,3,7,9
• node 6: neighborhoods 4,5,8,10
• node 7: neighborhoods 1,5,7,8,9
• Determine which nodes should be opened to provide
coverage to all neighborhoods at a minimum cost.
32
Set Covering
Min 125X1 + 85X2 + 70X3 + 60X4 + 90X5 + 100X6 + 110X7
ST
X1+X3+X7>=1
X2+X3+X5>=1
X1+X4+X5>=1
X1+X2+X6>=1
X3+X6+X7>=1
X1+X2+X4>=1
X4+X5+X7>=1
X2+X6+X7>=1
X1+X5+X7>=1
X1+X4+X6>=1
Xj = 0 or 1
33
Knapsack problem
Maximize c1 x1 c2 x2 c n xn
subject to
w1 x1 w2 x2 wn xn B
x j 0 and integer
• IP Formulation?
35
• Solving time?
Minimize c xij ij
if n=4,
subject to xijk : ij in kth leg
x121 x131 x141 1 (The tour starts at node 1)
x214 x314 x414 1 (The tour ends at node 1)
x232 x242 x322 x342 x422 x432 1 (Just one move in leg 2)
x233 x243 x323 x343 x423 x433 1 (Just one move in leg 3)
x214 x232 x242 x233 x243 1 (Just one departure at node 2)
x314 x322 x342 x323 x343 1 (Just one departure at node 3)
x414 x422 x432 x423 x433 1 (Just one departure at node 4)
x121 x322 x422 x323 x423 1 (Just one arrival at node 2)
x131 x232 x432 x233 x433 1 (Just one arrival at node 3)
x141 x242 x342 x243 x343 1 (Just one arrival at node 4)
x121 x232 x242 (If leg 1 ends at node 2, leg 2 should start at node 2)
x131 x322 x342 (If leg 1 ends at node 3, leg 2 should start at node 3)
x141 x422 x432 (If leg 1 ends at node 4, leg 2 should start at node 4)
x121 x232 x242 (If leg 1 ends at node 2, leg 2 should start at node 2)
x322 x422 x233 x243 (If leg 2 ends at node 2, leg 3 should start at node 2)
x232 x432 x323 x343 (If leg 2 ends at node 3, leg 3 should start at node 3)
x242 x342 x423 x433 (If leg 2 ends at node 4, leg 3 should start at node 4)
x323 x423 x214 (If leg 3 ends at node 2, leg 4 should start at node 2)
x233 x433 x314 (If leg 3 ends at node 3, leg 4 should start at node 3)
x243 x343 x414 (If leg 3 ends at node 4, leg 4 should start at node 4 )
36 xijk 0
Difficulties in Solving IP problems
• Complexity of algorithm?
• P, NP, NP complete
• Examples of NP problems
– TSP, crew scheduling, knapsack, decrypting secret codes…
• Genetic Algorithm
– Meta-heuristic
– Currently the best technique to solve TSP
– (demo) https://www.youtube.com/watch?v=Yr_nRnqeDp0
37
[Appendix]
Integer Programming (IP)
Branch and Bound Method of Solving
Integer Programming Problems
Prof. Yong Won Seo
(seoyw@cau.ac.kr)
• Bound
– An upper or lower limit on the value of the objective function
at a given stage of the analysis of an integer programming
problem.
– For example, in Maximization IP, LP solution of the problem
serves as an upper bound of the exact solution. (The exact IP
obj value cannot exceed the relaxed LP obj value)
• Branch
– Selection of an integer value of a decision variable to examine
for a possible integer solution to a problem.
Solving Integer Programming
• Enumeration Method
– A method used with 0–1 problems that involves listing every
possible outcome in order to identify the optimal solution.
Example 7S-1. an example of IP
41
The LP Relaxation Solution
42
Node 1: the LP Relaxation Solution
43
Branching from the first node
44
Subproblems and Solution Points for
Nodes 2 and 3
45
Solutions for Nodes 2 and 3
<Rule:>
- Branch only from current optimum.
- If current optimum is IP feasible, stop.
46
Subproblem and Solution Point for Node
4 (Node 5: infeasible)
Solutions for Nodes 4 and 5
Subproblems and Solutions for the Next
Two Nodes
Solutions for Nodes 6 and 7
Current optimum
satisfies integer
condition. Stop.
The LP Relaxation Solution Point and IP
exact optimal solution point
IP optimum
Tree Diagram for 0-1 IP example (Ex.5)
Branch and bound tree for Example 5
x1