Solving the Maximum Cardinality Bin Packing Problem with a Weight Annealing-Based Algorithm Kok-Hua Loh University of Maryland Bruce Golden University of Maryland Edward Wasil American University 10th ICS Conference January 2007 Outline of Presentation (cid:1) Introduction (cid:1) Concept of Weight Annealing (cid:1) Maximum Cardinality Bin Packing Problem (cid:1) Conclusions 1 Weight Annealing Concept (cid:1) Assigning different weights to different parts of a combinatorial problem to guide computational effort to poorly solved regions. (cid:2) Ninio and Schneider (2005) (cid:2) Elidan et al. (2002) (cid:1) Allowing both uphill and downhill moves to escape from a poor local optimum. (cid:1) Tracking changes in objective function value, as well as how well every region is being solved. (cid:1) Applied to the Traveling Salesman Problem. (Ninio and Schneider 2005) (cid:2) Weight annealing led to mostly better results than simulated annealing. 2 One-Dimensional Bin Packing Problem (1BP) (cid:1) Pack a set of N = {1, 2, …, n} items, each with size t , i=1, 2,…, n, i into identical bins, each with capacity C. (cid:1) Minimize the number of bins without violating the capacity constraints. (cid:1) Large literature on solving this NP-hard problem. 3 Outline of Weight Annealing Algorithm (cid:1) Construct an initial solution using first-fit decreasing. (cid:1) Compute and assign weights to items to distort sizes according to the packing solutions of individual bins. (cid:1) Perform local search by swapping items between all pairs of bins. (cid:1) Carry out re-weighting based on the result of the previous optimization run. (cid:1) Reduce weight distortion according to a cooling schedule. 4 Neighborhood Search for Bin Packing Problem (cid:1) From a current solution, obtain the next solution by swapping items between bins with the following objective function (suggested by Fleszar and Hindi 2002). p ∑ Maximize f = (l )2 i ∑qi i=1 l = t bin load i i j j=1 p = number of bins q = number of items in bin i i t = size of item j j f = (5+3)2 + 22 = 68 f = (5+3+ 2)2 =100 new 5 Neighborhood Search for Bin Packing Problem (cid:1) Swap schemes (cid:2) Swap items between two bins. (cid:2) Carry out Swap (1,0), Swap (1,1), Swap (1,2), Swap (2,2) for all pairs of bins. (cid:2) Analogous to 2-Opt and 3-Opt. (cid:1) Swap (1,0) (suggested by Fleszar and Hindi 2002) Bin α Bin β Bin α Bin β f = (1+3+ 4)2 + (4+ 4)2 =128 f = (3+ 4)2 +(1+ 4+ 4)2 =130 new (cid:1) Need to evaluate only the change in the objective function value. ∆f = (l −t )2 +(l +t )2 −l2 −l2 l = total load of bin α α j β j α β α t = size of item i i 6 Neighborhood Search for Bin Packing Problem (cid:1) Swap (1,1) (f = 162) ( f = 164) new (cid:1) Swap (1,2) (f = 162) ( f = 164) new 7 Weight Annealing for Bin Packing Problem (cid:1) Weight of item i w = 1 + K r i i C −l residual capacity r = i i C C = capacity l = load of bin i i (cid:1) An item in a not-so-well-packed bin, with large r , i will have its size distorted by a large amount. (cid:1) No size distortions for items in fully packed bins. (cid:1) K controls the size distortion, given a fixed r . i 8 Weight Annealing for Bin Packing Problem (cid:1) Weight annealing allows downhill moves in a maximization problem. (cid:1) 200−l Example C = 200, K= 0.5 , w =1+0.5 i i 200 w =1.025 w =1.087 1 2 Transformed space f = 70126.3 Transformed space f = 70132.2 new Original space f = 63325 Original space f = 63125 new (cid:2) Transformed space - uphill move (cid:2) Original space - downhill move 9
Description: