Document

advertisement
EMIS 8373:
Integer Programming
Refinements to LP-Based
Branch-and-Bound
updated 31 March 2009
Divide and Conquer
• Optimization problem: z = max{cx : x  S}
• Proposition: Let S = S1  S2  …  Sk be a
decomposition of S into smaller sets, and
let zk = max{cx : x  Sk} for k = 1, 2, …, K.
Then z = maxk zk.
• Strategy: divide the feasible region into subregions and compare the optimal solutions from
each sub-region.
slide 1
Divide and Conquer Example
• Example: S  {0,1}3
– S0 = {x  S: x1 = 0}
• S0 = {[0,0,0],[0,0,1],[0,1,0],[0,1,1]}
– S1 = {x  S: x1 = 1}
• S1 = {[1,0,0],[1,0,1],[1,1,0],[1,1,1]}
–
–
–
–
S00 = {x  S0: x2 = 0}={[0,0,0],[0,0,1]}
S01 = {x  S0: x2 = 1}={[0,1,0],[0,1,1]}
S10 = {x  S1: x2 = 0}={[1,0,0],[1,0,1]}
S11 = {x  S1: x2 = 1}={[1,1,0],[1,1,1]}
slide 2
Enumeration Tree
x1 = 0
S
x1 = 1
S0
S1
x2 = 0
x2 = 1
x2 = 0
S00
S01
S10
x3 = 0
S000
x3 = 1 x = 0
3
S001
S010
x3 = 1 x = 0
3
S011
S100
x2 = 1
S11
x3 = 1 x = 0
x3 = 1
3
S101
S110
S111
In the worst case, a branch-and-bound procedure would have
to visit all eight leaves of the enumeration tree to find z.
slide 3
Implicit Enumeration
•
•
Let ZU(Sk) be an upper bound on zk.
Let ZL(Sk) be a lower bound on zk.
–
•
There is at least one solution in Sk with objective
function value ZL(Sk).
Implicit enumeration uses the following facts to
eliminate some branches of the enumeration
tree
1.
2.
ZL(Sk)  zk  ZU(Sk),
maxk {ZL(Sk)}  z  maxk {ZU(Sk)}
slide 4
Pruning by Optimality
ZU(S) = 27
S Z (S) = 13
L
S0
ZU(S0) = 20
ZL(S0) = 20
S1
ZU(S) = 25
ZL(S) = 20
ZU(S1) = 25
ZL(S1) = 15
13  z = max{cx : x  S}  27.
20  z0  20  z0 = 20. Prune (fathom) S0.
z = max{z0, z1}  20  z = max{cx : x  S}  27
z0 = 20, z1  25  z  max{20, 25}
slide 5
Pruning by Bounds
ZU(S) = 27 ZU(S) = 26
S Z (S) = 13 Z (S) = 18
L
L
ZL(S) = 21
S0
ZU(S0) = 20
ZL(S0) = 18
S1
ZU(S1) = 26
ZL(S1) = 21
13  z = max{cx : x  S}  27.
18  z = max{cx : x  S}  27.
21  z = max{cx : x  S}  26.
S0 can be pruned since the best
solution in S0 will be worse than
the worst solution in S1.
slide 6
LP-Based Branch-and-Bound
(Maximization)
• Uses the LP relaxation at each node to find a dual (upper)
bound
• Uses feasible IP solutions for primal (lower) bounds
• primal bound (S)  z  dual bound (S)
• Prunes by
– Optimality: dual bound (Sk) = primal bound (Sk)
– Bound: dual bound (Sk) < primal bound (S)
– Infeasibility of LP sub-problem
• Stopping criteria
– Optimality: dual bound (S) = primal bound (S)
– Optimality gap:
(dual bound (S) – primal bound (S))/dual bound (S)  
slide 7
LP-Based Branch-and-Bound
(Minimization)
• Uses the LP relaxation at each node to find a dual (lower)
bound
• Uses feasible IP solutions for primal (upper) bounds
• dual bound (S)  z  primal bound (S)
• Prunes by
– Optimality: dual bound (Sk) = primal bound (Sk)
– Bound: dual bound (Sk) > primal bound (S)
– Infeasibility of LP sub-problem
• Stopping criteria
– Optimality: dual bound (S) = primal bound (S)
– Optimality gap:
(primal bound (S) – dual bound (S))/dual bound (S)  
slide 8
Algorithmic Control
• Which active node should be selected for the next
branching step?
• Which fractional variable should be branched on
at that node?
• Should we investigate the down branch first or
the up branch?
• How should we solve the subproblem at the
selected node?
– Alternative LP algorithms
slide 9
Node Selection Criteria
• CPLEX provides node-selection control via the
nodesel and backtrack parameters
– nodesel i (i = 1 or 2, default 1)
• CPLEX associates a value with each node and choose the
next active node based on this value
• To use the bound from the optimal LP solution at the node set
nodesel=1
• When nodesel=2, the node’s value is based on an estimate
CPLEX makes of the best IP solution that could be found by
branching on that node
• Best bound (nodesel=1) tends to find better solutions earlier
in the process, but nodesel=2 may be faster overall if the
objective function values are “tightly clustered”.
slide 10
Backtracking
• Depending on the value at the most recently
created node, CPLEX either braches at the active
node with the best value or else it backtracks.
• backtrack=r (any number, default 0.85)
– backtrack=0 does a pure depth-first search (DFS)
• Successive LP’s are easier (faster) to solve
• Finds feasible solutions faster
– Lower values > 0 favor backtracking (BFS) and
values > 1 discourage it.
• Can help move the search to a better part of the tree rather
than (possibly) wasting time considering the descendents of a
one node.
slide 11
Experiments with nodesel and
backtrack
filename
todd16.txt
todd24.txt
todd25.txt
todd26.txt
todd27.txt
todd32.txt
todd37.txt
todd39.txt
todd42.txt
todd64.txt
Min
Mean
Max
cpu
2.31
112.23
61.19
23.05
280.19
72.93
17.91
8.65
101.41
0.00
0.00
67.99
280.19
nodesel=1
nodes
obj
cpu
22,662
17,821,704
3.36
1,123,568
6,710,534,100
0.60
609,136 13,958,381,000
18.35
213,099 28,989,629,000
0.75
3,187,005 60,128,756,000
9.22
676,033
4.54E+12 445.03
101,509
1.67E+14
5.21
97,744
7.04E+14
89.05
1,016,350
6.05E+15
46.70
0
7.67E+22
0.00
0.00
0.00
704,711
61.83
3,187,005
445.03
nodesel=2
nodesel=2 backtrack=1
nodes
obj
cpu
nodes
obj
22,688
17821704
3.21
22,773
17821704
3,461
6710534100
13.71
109,780
6710534100
121,599 13958381000
5.17
36,250 13958381000
4,776 28989629000
22.71
159,160 28989686000
61,749 60126725000 152.62
1,235,020 60128756000
715,917
4.54E+12
67.66
103,800
4.54E+12
12,908
1.67E+14
3.43
8,214
1.67E+14
374,417
7.04E+14
4.19
18,432
7.04E+14
311,640
6.05E+15
0.01
5
6.05E+15
0
7.67E+22
0.00
0
7.67E+22
0.00
0.00
0.00
162,916
27.27
169,343
715,917
152.62
1,235,020
slide 12
Variable Selection
• varesel=i (i  {-1, 0, 1, 2, 3 }, default 0)
– When i=1 the variable with largest fractional part is
selected
– When i=-1 the variable with the smallest fractional
part is selected
– When i=2 an estimate of how much the objective
function will degrade if each variable is forced to an
adjacent integer is used to select the variable
– When i=3 “strong branching” is used
• Select the branch with the “most promising” partial solution
• Requires the most time per node
– When i = 0 a proprietary heuristic is used
slide 13
Branching Rules
• If the model contains more than one type of integer
variable (e.g., integer x and binary y), it may be helpful to
use a branching rule that gives a higher priority to one
type of variable of the other.
– Often useful for xij  M yj
– AMPL commands:
• option mip_priorities ‘y 100 x 1’;
• option cplexamp_auxfiles c;
• CPLEX parameter branch=i
– Use branch = 1 to always take the up branch first
– Use branch = -1 to always take the down branch first
slide 14
Download