A Hybrid Improvement Heuristic for the Bin Packing Problem

Similar documents
A hybrid improvement heuristic for the bin-packing problem and its application to the multiprocessor scheduling problem

LOCAL SEARCH WITH PERTURBATIONS FOR THE PRIZE-COLLECTING STEINER TREE PROBLEM IN GRAPHS

Optimal Sequential Multi-Way Number Partitioning

A Branch-and-Cut Algorithm for the Partition Coloring Problem

Methods for Solving Subset Sum Problems

Solving the Maximum Cardinality Bin Packing Problem with a Weight Annealing-Based Algorithm

A Relative Neighbourhood GRASP for the SONET Ring Assignment Problem

Local search heuristic for multiple knapsack problem

Metaheuristic Optimization with Evolver, Genocop and OptQuest

5 (Monday, 08/14/2017)

3 No-Wait Job Shops with Variable Processing Times

GRASP and path-relinking: Recent advances and applications

Complete Local Search with Memory

Algorithms for the Bin Packing Problem with Conflicts

Weight Annealing Heuristics for Solving the Two-Dimensional Bin Packing Problem

Reduction and Exact Algorithms for the Disjunctively Constrained Knapsack Problem

A Hybrid Recursive Multi-Way Number Partitioning Algorithm

Resource Constrained Project Scheduling. Reservations and Timetabling

Theorem 2.9: nearest addition algorithm

Scan Scheduling Specification and Analysis

Algorithm Design Methods. Some Methods Not Covered

Construction of Minimum-Weight Spanners Mikkel Sigurd Martin Zachariasen

Optimally Scheduling Small Numbers of Identical Parallel Machines

The Match Fit Algorithm: A Testbed for the Computational Motivation of Attention

Effective probabilistic stopping rules for randomized metaheuristics: GRASP implementations

3 INTEGER LINEAR PROGRAMMING

Improved Bin Completion for Optimal Bin Packing and Number Partitioning

ON WEIGHTED RECTANGLE PACKING WITH LARGE RESOURCES*

6. Tabu Search. 6.3 Minimum k-tree Problem. Fall 2010 Instructor: Dr. Masoud Yaghini

The Size Robust Multiple Knapsack Problem

Theoretical Computer Science 297 (2003) Cube packing São Paulo-SP, Brazil

6. Algorithm Design Techniques

Design of Flexible Assembly Line to Minimize Equipment Cost

A GRASP with restarts heuristic for the Steiner traveling salesman problem

From Approximate to Optimal Solutions: A Case Study of Number Partitioning

A Genetic Algorithm with Evolutionary Path-relinking for the SONET Ring Assignment Problem

Packing Virtual Machines onto Servers

A HYBRID LAGRANGEAN HEURISTIC WITH GRASP AND PATH-RELINKING FOR SET K-COVERING

GRASP. Greedy Randomized Adaptive. Search Procedure

Arc-Flow Model for the Two-Dimensional Cutting Stock Problem

A dynamic resource constrained task scheduling problem

Variable Neighborhood Search for Solving the Balanced Location Problem

VNS-based heuristic with an exponential neighborhood for the server load balancing problem

A hybrid Evolutionary Algorithm for the Dynamic Resource Constrained Task Scheduling Problem

Parallel Computing in Combinatorial Optimization

A Randomized Algorithm for Minimizing User Disturbance Due to Changes in Cellular Technology

Local search with perturbations for the prize collecting Steiner tree problem in graphs

An Improved Hybrid Genetic Algorithm for the Generalized Assignment Problem

Multi-Way Number Partitioning

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

OPTIMIZATION OF DELIVERIES FROM DISTRIBUTION POINTS

A Branch-and-Bound Algorithm for the Knapsack Problem with Conflict Graph

Framework for Design of Dynamic Programming Algorithms

Routing and Wavelength Assignment in Optical Networks Using Bin Packing Based Algorithms

GRASP with Path-Relinking for the SONET Ring Assignment Problem

On Covering a Graph Optimally with Induced Subgraphs

ACO and other (meta)heuristics for CO

Combinatorial Optimization

A simulated annealing algorithm for the vehicle routing problem with time windows and synchronization constraints

Approximation Basics

Anale. Seria Informatică. Vol. X fasc Annals. Computer Science Series. 10 th Tome 1 st Fasc. 2012

Tabu Search for Constraint Solving and Its Applications. Jin-Kao Hao LERIA University of Angers 2 Boulevard Lavoisier Angers Cedex 01 - France

Outline of the talk. Local search meta-heuristics for combinatorial problems. Constraint Satisfaction Problems. The n-queens problem

Constructive and destructive algorithms

A Kruskal-Based Heuristic for the Rooted Delay-Constrained Minimum Spanning Tree Problem

GRASP with evolutionary path-relinking for the antibandwidth problem

The Complexity of the Network Design Problem

Regensburger DISKUSSIONSBEITRÄGE zur Wirtschaftswissenschaft

α Coverage to Extend Network Lifetime on Wireless Sensor Networks

Introduction to Approximation Algorithms

Search Algorithms. IE 496 Lecture 17

Branch-and-Cut and GRASP with Hybrid Local Search for the Multi-Level Capacitated Minimum Spanning Tree Problem

Referee Assignment in Sports Leagues

A Memetic Algorithm for Parallel Machine Scheduling

Integer Programming Theory

Improved K-Means Algorithm for Capacitated Clustering Problem

T S 2 P ACK: A Two-Level Tabu Search for the Three-dimensional Bin Packing Problem

GAUSSIAN VARIABLE NEIGHBORHOOD SEARCH FOR THE FILE TRANSFER SCHEDULING PROBLEM

DOCUMENT DE TRAVAIL

MIC 99. III Metaheuristics International Conference. PUC-Rio - Catholic University of Rio de Janeiro. Angra dos Reis, Brazil.

A New Algorithm for Solving the Operation Assignment Problem in 3-Machine Robotic Cell Scheduling

Pre-requisite Material for Course Heuristics and Approximation Algorithms

A Metaheuristic Algorithm for the Minimum Routing Cost Spanning Tree Problem

Tabu Search Method for Solving the Traveling salesman Problem. University of Mosul Received on: 10/12/2007 Accepted on: 4/3/2008

UNIT 4 Branch and Bound

Job Shop Scheduling Problem (JSSP) Genetic Algorithms Critical Block and DG distance Neighbourhood Search

Outline of the module

Heuristic Algorithms for the Fixed-Charge Multiple Knapsack Problem

An Effective Algorithm for Minimum Weighted Vertex Cover problem

General properties of staircase and convex dual feasible functions

Restart strategies for

Dr. Amotz Bar-Noy s Compendium of Algorithms Problems. Problems, Hints, and Solutions

Solving Capacitated P-Median Problem by Hybrid K-Means Clustering and Fixed Neighborhood Search algorithm

A Branch-and-Cut Algorithm for Partition Coloring

GRASP WITH PATH-RELINKING FOR THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM

New Trials on Test Data Generation: Analysis of Test Data Space and Design of Improved Algorithm

SOLVING LARGE CARPOOLING PROBLEMS USING GRAPH THEORETIC TOOLS

Bi-Objective Optimization for Scheduling in Heterogeneous Computing Systems

2ND INTERNATIONAL CONFERENCE ON METAHEURISTICS - MIC97 1. Graduate School of Engineering, Kyoto University

RAMP for the capacitated minimum spanning tree problem

Transcription:

MIC 2001-4th Metaheuristics International Conference 63 A Hybrid Improvement Heuristic for the Bin Packing Problem Adriana C.F. Alvim Dario J. Aloise Fred Glover Celso C. Ribeiro Department of Computer Science, Catholic University of Rio de Janeiro Rua Marquês de São Vicente 225, Rio de Janeiro, RJ 22453-900, Brazil. Email: {alvim, celso}@inf.puc-rio.br Universidade Federal do Rio Grande do Norte Department of Computer Science and Applied Mathematics, Natal, RN 59078-970, Brazil. Email: dario@digi.com.br University of Colorado at Boulder, Graduate School of Business Administration Boulder, CO 80309-0419, United States. Email: Fred.Glover@colorado.edu 1 Introduction Given a set of n items with weights w i,i =1,...,n, the bin packing (BP) problem consists of finding the minimum number of bins of capacity C necessary to pack the items, without violating the capacity constraint. This formulation also entails another problem (DBP), in which we seek to minimize the capacity of a fixed number m of identical bins, so that all items fit in the m bins without violating the capacity constraints. The bin packing problem is NP-hard, see [5]. We propose an improvement procedure for the bin packing problem, based on progressively increasing the number of bins used by a possibly feasible solution. The basic structure of this procedure is the following: Reductions: apply reduction techniques to eliminate some items and fix some bins. Bounds: computer lower and upper bounds LB and UB for (BP). If LB = UB, then stop. Construction: apply a greedy algorithm to build a solution for (DBP) using exactly LB bins. Redistribution: apply load unbalancing and load balancing strategies to improve bin usability if the current solution is not feasible. Improvement: apply improvement techniques to reduce capacity violations, if the current solution is not feasible. Stopping criterion: if the new solution is feasible to (BP), then stop; otherwise set LB LB +1 and go back to the construction phase. Lower and upper bounds are briefly discussed in Section 2. The reduction procedure of Martello and Toth is summarized in Section 3. In Section 4, we present different algorithms used to build initial solutions. Section 5 describes an item dominance rule and the load unbalancing and load balancing substrategies used to improve bin usability. A procedure to reduce infeasibilities is outlined in Section 6. Preliminary computational results are presented in Section 7.

64 MIC 2001-4th Metaheuristics International Conference 2 Lower and upper bounds Let S be a (not necessarily feasible) solution to a bin packing problem. We denote by z(s) thenumber of bins in S. Associated with each solution S there is a family of subsets B 1,...,B z(s), such that B j contains the items placed in the j-th bin, j =1,...,z(S). Let w S (B j )= i B j w i be the total weight of the items placed in the j-th bin. Each bin B j of the current solution can be in one of the following situations: (a) violated: w S (B j ) >C,(b)full: w S (B j )=C, (c)incomplete: C>w S (B j ) > 0, and (d) empty: w S (B j ) = 0. A bin is said to be saturated if it is violated or full. A bin is said to be feasible when it is not violated. The reader is referred to [2, 6] for reviews of greedy algorithms to (BP). Most approximate algorithms for (BP) usually start by sorting the n items in nonincreasing order of their weights. Items are picked in this order and placed one-at-a-time in a bin selected according with some strategy. We used the Best-Fit Decreasing (BFD) heuristic to compute feasible solutions to (BP). It always selects the bin with smallest sufficient residual capacity. If none of the bins already in use has enough capacity to accommodate the new item, then a new bin is open. Algorithm BFD can be implemented to run in O(n log n) time. The lower bound LB = L 2 described in [6] is used in this work. For its computation, first the set of items is partitioned into three subsets J 1, J 2, and J 3, according with an integer parameter 0 α C/2, where J 1 = {j N : w j >C α}, J 2 = {j N : C α w j >C/2}, and J 3 = {j N : C/2 w j >α}. Then, L(α) = J 1 + J 2 + max(0, j J 3 w j ( J 2 C j J 2 w j ) ) C is a lower bound on the number of bins required for packing all items. The bound L 2 =max{l(α) : 0 α C/2} can be computed in O(n) time, if all items are sorted in nonincreasing order of their weights. 3 Reductions We define a feasible set of items as any subset F N such that i F w i C. Given two feasible sets F 1 and F 2,wesaythatF 1 dominates F 2 if and only if the number of bins in some optimal solution obtained by setting B 1 = F 1 is not greater than that obtained by setting B 1 = F 2. In this case, there exists a partition P 1,...,P l of F 2 and a subset {i 1,...,i l } F 1 such that w ih k P h w k for h = 1,...,l. Martello and Toth [6, 7] used the above dominance criterion in their MTRP reduction procedure, which we also use in this work. 4 Initial solutions Each iteration of our hybrid improvement heuristic starts by creating a feasible solution to (DBP) using a fixed number of bins, then attempts to find a feasible solution to (BP) using the same number of bins. We used four deterministic construction procedures and their randomized variants for building feasible solutions to (DBP). All of them start with LB open bins and investigate the items in nonincreasing order of their weights to select in which bin the next item will be placed: Dual Best-Fit Decreasing (DBFD): Select the bin with smallest sufficient residual capacity; if none exists then select the lightest bin. Dual Worst-Fit Decreasing (DWFD): Select the bin with the largest residual capacity; if none exists then select the lightest bin.

MIC 2001-4th Metaheuristics International Conference 65 Dual Worst-Best-Fit Decreasing (DWBFD): The first LB items are placed in different bins (as in DWFD). Next, each item is inserted into the heaviest nonsaturated bin in which it fits (as in DBFD); if none exists then the lightest bin is selected. Dual Best-3-Fit Decreasing (DB3FD): The first LB items are placed in different bins. Next, bins are investigated in non-decreasing order of their weights, in the search for pairs of items which fill them up. Finally, the remaining items are investigated in nonincreasing order of their weights and placed in the heaviest bin in which they fit; if none exists then the lightest bin is selected. 5 Load redistribution Whenever a feasible solution to (DBP) is not feasible to (BP), load balancing and load unbalancing sub-strategies are applied to improve bin usability by load redistribution. Each sub-strategy is preceded by the application of an item dominance rule. 5.1 Item dominance rule An item dominance rule is always applied before each load redistribution phase. We say that an item i 1 dominates two items i 2 and i 3 in another bin if w i1 = w i2 + w i3. This rule is applied as follows. For every full bin B i and for every incomplete or violated bin B j in the current solution, whenever there exist an item i 1 B i and two items i 2,i 3 B j such that w i1 = w i2 + w i3,thenitemi 1 is exchanged with i 2 and i 3 in the current solution. Although the weights of both bins involved in the exchange remain unchanged, increasing the number of small items in the incomplete or violated bin will give more chance to the load unbalancing and load balancing phases to find a better solution. The search for dominant items stops when no further improvement is possible, after all possible pairs of bins (one full, the other violated or incomplete) have been evaluated. It does not change the weights of the bins, but may help in reaching feasibility at a later step. 5.2 Load balancing by differencing Given any pair B i,b j of bins of the current infeasible solution S, a new solution can be obtained by redistributing the items in these bins, so as to minimize the absolute value of the difference of their weights. Since the latter amounts to a number partitioning problem, an approximate algorithm provides significant efficiency advantage for computing a suboptimal redistribution of the items in these bins. The differencing method of Karmarkar and Karp [4] begins by arranging the items in these bins into a nonincreasing ordered list. The method recursively takes the difference of the two greatest values remaining in the ordered list and places this difference back into the ordered list, as if it constituted a virtual item to be packed. Differencing continues until only one value remains in the list. This remaining value represents the difference of an implied partition of the list into two bins. The actual partition B i,b j is then constructed by backtracking through the recursion. This sub-strategy continually seeks to knock down excess deviations, starting by the largest capacity violation. The randomized version [1] of the above algorithm is applied to all pairs of bins in the current solution, in which one of them is violated and the other is nonsaturated. The first pair considered is that formed by the lightest and the heaviest bins. Next, all violated bins are investigated in nonincreasing order of their weights, while nonsaturated ones are investigated in the opposite order. For each pair B i,b j of bins, the newly computed partition replaces the current one if w S (B i ) w S(B j ) < w S(B i ) w S (B j ), orif w S (B i ) w S(B j ) = w S(B i ) w S (B j ) with B i B i and B i B j. The search stops when no further improvement is possible.

66 MIC 2001-4th Metaheuristics International Conference 5.3 Load unbalancing Given n items with weights w i,i =1,...,n, and an integer C, the maximum subset sum problem consists in finding a feasible subset of items whose sum of their weights is the closest to C. For every pair of incomplete bins in the current solution, we try to redistribute their items without making them infeasible and creating more available space in the bin which ends up as the lightest among the two bins. We create a temporary set of available items, formed by all those in the current pair of bins, and apply the polynomial-time approximation scheme MTSS of Martello and Toth [6] with k =3. Ifthe sum of the weights of the subset found by the above algorithm is greater than the weight of the heaviest bin in the pair, then the composition of the two original bins is changed. One bin will receive all items in the solution of the maximum subset sum problem, while the other receives the remaining items. The search stops when no further improvement is possible, after all pair of incomplete bins have been considered. Although this procedure can not make feasible an infeasible solution, it makes the current solution more amenable to be improved in the next phase by creating more available space for large items. We give in Figure 1 a short description of the combined application of the item dominance rule with the load balancing and unbalancing sub-strategies to an infeasible solution S built in the construction phase. procedure Redistribution(S); 1 Apply load balancing by differencing preceded by the item dominance rule; 2 if a feasible solution to (BP) was obtained then return; 3 Apply load unbalancing preceded by the item dominance rule; 4 if the current solution was not changed in step 3 5 then return S; 6 else go back to step 1; 7 return S; end Redistribution; Figure 1: Load redistribution phase 6 Improvement We apply a tabu search strategy to reduce capacity violations in the current solution. Starting from the infeasible solution S, we investigate neighborhoods defined by swap moves which exchange pairs of items, one of them always from a violated bin. For any given item i =1,...,n,wedenotebyS i the index of the bin where i is currently placed in solution S. A move that exchanges items i and j, with S i S j, is denoted by i j. The first element in the pair is always that in the target violated bin, whose excess deviation we want to reduce. Since the ultimate goal of the search is to make an infeasible solution feasible, every violated bin has to be made feasible. Therefore, we only consider moves that do not increase the excess deviation of the violated bin whose neighborhood is being investigated. By this filtering process, each iteration will consider only the swap moves i j for which w i >w j. Bins are investigated in nonincreasing order of their weights. At each iteration the algorithm chooses the best move for the current bin. If this bin remains infeasible, it will again be the object of the next iteration.

MIC 2001-4th Metaheuristics International Conference 67 7 Preliminary results We considered two classes of test problems introduced by Falkenauer [3]: the first one (uni F) isformed by 80 instances with randomly generated weights, while the second (tri F) is formed by harder triplet instances. We also used three classes of test problems from Scholl et al. [8]: 720 instances (set 1) from data set 1, 480 instances (set 2) from data set 2, and ten difficult instances from data set 3 (set 3). We discarded all instances for which the best solution was found by the construction algorithm BFD or by preprocessing using the reduction procedure MTRP. The remaining 581 instances are divided into two groups. The first group (solved) is formed by the 558 instances for which their optimal solutions are known. The second group (open) consists of the remaining 23 instances whose optimum is not known. Our heuristic was coded in C and compiled with gcc, version 2.95.2, using the optimization -O2 flag. All experiments were executed on a Pentium III 533 MHz with 128 MB of memory. The main results of this study are presented in Table 1. The rows in the first part of this table report the number of instances in each group and in each class. The rows in the second part give the results obtained at the end of each phase of the heuristic: after construction (C), after redistribution (C+R), and after the improvement phase (C+R+I). For each class in the group solved, the column indexed by #optimal gives the number of instances for which the optimal solution was found. For each class in the group open, the column indexed by #better gives the number of instances for which the hybrid heuristic improved the best solution currently known, while the column indexed by #equal gives the number of instances for which it found exactly the best known solution. The last row summarizes the results for each group. Group solved open Instances 558 23 Class uni F tri F set 1 set 2 set 3 set 1 set 2 set 3 Instances 74 80 160 241 3 13 3 7 Phase #optimal #better #equal C 23 0 71 86 0 0 1 0 0 C+R 69 0 145 235 3 4 9 3 7 C+R+I 73 80 157 241 3 4 9 3 7 Total 554 23 Table 1: Solutions obtained at each phase of the hybrid improvement heuristic In the case of the group solved and not considering the instances from the harder class tri F, 452 out of the 474 optimal solutions (95%) have been obtained at the redistribution phase. For the other group open, all best solutions were found at the redistribution phase. Except for the particularly hard class tri F, very often the redistribution phase was able to find the optimal or best solutions. The improvement phase dealing with infeasible solutions was fundamental to solve the instances in the harder class tri F, whose optimal solutions have all their bins completely full. The hybrid improvement heuristic was not able to find the best known solution to four out of the 581 instances but, on the other hand, it improved the best known solutions to four open problems. References [1] M.F. Arqüello, T.A. Feo, and O. Goldschmidt, Randomized methods for the number partitioning problem, Computers and Operations Research 23 (1996), 103 111. [2] E.G. Coffman, Jr., M.R. Garey, and D.S. Johnson, Approximation algorithms for bin packing: A survey, in Approximation Algorithms for NP-Hard Problems (D. Hochbaum, ed.), 46 93, PWS Publishing, 1997.

68 MIC 2001-4th Metaheuristics International Conference [3] E. Falkenauer, A hybrid grouping genetic algorithm for bin packing, Journal of Heuristics 2 (1996), 5 30. [4] N. Karmarkar and R.M. Karp, The differencing method of set partitioning, Report UCB/CSD 82/113, Computer Science Division, University of California, Berkeley, 1982. [5] R.M. Karp, Reducibility among combinatorial problems, in Complexity of Computer Computations (R.E. Miller and J.M. Thatcher, eds.), 85 103, Plenum Press, 1972. [6] S. Martello and P. Toth, Knapsack problems, Wiley, 1990. [7] S. Martello and P. Toth, Lower bounds and reduction procedures for the bin packing problem, Discrete Applied Mathematics 28 (1990), 59 70. [8] A. Scholl, R. Klein, and C. Jürgens, BISON: A fast hybrid procedure for exactly solving the one-dimensional bin packing problem, Computers and Operations Research 24 (1997), 627 645.