One-Dimensional Heuristics Adapted for Two-Dimensional Rectangular Strip Packing G. Belov, G. Scheithauer, E. A. Mukhacheva

Similar documents
One-Dimensional Heuristics Adapted for Two-Dimensional Rectangular Strip Packing G. Belov, G. Scheithauer, E.A. Mukhacheva

Technische Universität Dresden Herausgeber: Der Rektor

arxiv: v1 [cs.dm] 22 Jul 2011

Cutting Stock with Binary Patterns: Arc-flow Formulation with Graph Compression

A Bricklaying Best-Fit Heuristic Algorithm for the Orthogonal Rectangle Packing Problem*

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

ON WEIGHTED RECTANGLE PACKING WITH LARGE RESOURCES*

A recursive branch-and-bound algorithm for the rectangular guillotine strip packing problem

Available online at ScienceDirect. Procedia Engineering 183 (2017 )

An Ant Colony Optimization Heuristic for Solving the Two- Dimensional Level Packing Problems

Solving a Real-World Glass Cutting Problem

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

HYPER-HEURISTICS can be thought of as heuristics

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

Pseudo-polynomial formulations for bin packing and cutting stock problems

Algorithms for the Bin Packing Problem with Conflicts

An Improved Heuristic Recursive Strategy Based on Genetic Algorithm for the Strip Rectangular Packing Problem

General properties of staircase and convex dual feasible functions

A HYBRID HEURISTIC FOR THE CONSTRAINED TWO-DIMENSIONAL NON-GUILLOTINE ORTHOGONAL CUTTING PROBLEM

A note on an L-approach for solving the manufacturer s pallet loading problem

Algorithms for Integer Programming

The Size Robust Multiple Knapsack Problem

A parallel multi-population genetic algorithm for a constrained two-dimensional orthogonal packing problem

Theorem 2.9: nearest addition algorithm

BIN PACKING PROBLEM: A LINEAR CONSTANT- SPACE -APPROXIMATION ALGORITHM

3 No-Wait Job Shops with Variable Processing Times

Optimal Sequential Multi-Way Number Partitioning

Optimal Packing of High-Precision Rectangles

Local search heuristic for multiple knapsack problem

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

A Hybrid Improvement Heuristic for the Bin Packing Problem

LP-Modelling. dr.ir. C.A.J. Hurkens Technische Universiteit Eindhoven. January 30, 2008

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

Integrating Mixed-Integer Optimisation & Satisfiability Modulo Theories

eocsa: An Algorithm for Burst Mapping with Strict QoS Requirements in IEEE e Mobile WiMAX Networks

Discrete Optimization. Lecture Notes 2

Hybrid Constraint Programming and Metaheuristic methods for Large Scale Optimization Problems

An Efficient Meta-Heuristic for Multi-Dimensional Multi-Container Packing

Integer Programming Theory

A GENETIC ALGORITHM FOR TWO DIMENSIONAL STRIP PACKING PROBLEMS. Nelson Mandela Metropolitan University, South Africa

An Empirical Investigation of Meta-heuristic and Heuristic Algorithms for a 2D Packing Problem

An Algorithm for an Optimal Staffing Problem in Open Shop Environment

Introduction to Optimization

Introduction to Optimization

Column Generation Based Primal Heuristics

Packing with biased random-key genetic algorithms

A Binary Integer Linear Programming-Based Approach for Solving the Allocation Problem in Multiprocessor Partitioned Scheduling

Two-Dimensional Bin Packing Problem with Guillotine Restrictions

Topic: Local Search: Max-Cut, Facility Location Date: 2/13/2007

A genetic algorithm for the two-dimensional strip packing problem with rectangular pieces

Hybrid genetic algorithms for the three-dimensional multiple container packing problem

A Hybrid Genetic Algorithms and Tabu Search for Solving an Irregular Shape Strip Packing Problem

General Methods and Search Algorithms

TWO-DIMENSIONAL PACKING PROBLEMS IN TELECOMMUNICATIONS. Silvano Martello. Received April 21, 2013 / Accepted May 20, 2013

An Enhanced Perturbing Algorithm for Floorplan Design Using the O-tree Representation*

SIMPLE ALGORITHMS FOR RECTANGLE PACKING PROBLEM FROM THEORY TO EXPERIMENTS

Heuristic Algorithms for the Fixed-Charge Multiple Knapsack Problem

A Simple Placement and Routing Algorithm for a Two-Dimensional Computational Origami Architecture

New Heuristic and Interactive Approaches to 2D Rectangular Strip Packing

A Row-and-Column Generation Method to a Batch Machine Scheduling Problem

A Distributed Hybrid Algorithm for Composite Stock Cutting

Approximation Algorithms

Reduction and Exact Algorithms for the Disjunctively Constrained Knapsack Problem

arxiv: v1 [cs.dm] 6 May 2009

An Integrated Design Algorithm for Detailed Layouts Based on the Contour Distance

February 19, Integer programming. Outline. Problem formulation. Branch-andbound

An Extension of the Multicut L-Shaped Method. INEN Large-Scale Stochastic Optimization Semester project. Svyatoslav Trukhanov

Optimally Scheduling Small Numbers of Identical Parallel Machines

Optimizing Architectural Layout Design via Mixed Integer Programming

Reload Cost Trees and Network Design

5. Computational Geometry, Benchmarks and Algorithms for Rectangular and Irregular Packing. 6. Meta-heuristic Algorithms and Rectangular Packing

Optimal Routing-Conscious Dynamic Placement for Reconfigurable Devices

Outline of the module

Constructive procedures to solve 2-Dimensional Bin Packing Problems with Irregular Pieces and Guillotine Cuts

Massively Parallel Approximation Algorithms for the Knapsack Problem

Chordal deletion is fixed-parameter tractable

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

3 INTEGER LINEAR PROGRAMMING

A Recursive Revised First Fit Algorithm for Cutting Stock Problem

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

Approximation Algorithms for Wavelength Assignment

Effective probabilistic stopping rules for randomized metaheuristics: GRASP implementations

NP-completeness of generalized multi-skolem sequences

GRASP. Greedy Randomized Adaptive. Search Procedure

A Computational Study of Conflict Graphs and Aggressive Cut Separation in Integer Programming

Using Genetic Algorithms to Solve the Box Stacking Problem

Lecture 9. Knapsack Problem Dynamic Programming formulation. MATH3220 Operations Research and Logistics Mar. 4, 2015

T. Biedl and B. Genc. 1 Introduction

Design of Flexible Assembly Line to Minimize Equipment Cost

Efficient Synthesis of Production Schedules by Optimization of Timed Automata

Graph Coloring via Constraint Programming-based Column Generation

Parameterized graph separation problems

Approximation Algorithms

Improved Bin Completion for Optimal Bin Packing and Number Partitioning

α Coverage to Extend Network Lifetime on Wireless Sensor Networks

GRASP and Path Relinking for the Two-dimensional Two-staged Cutting Stock Problem

Algorithms for Two-Dimensional Bin Packing and Assignment Problems

A NEW MILP APPROACH FOR THE FACILITY LAYOUT DESIGN PROBLEM WITH RECTANGULAR AND L/T SHAPED DEPARTMENTS

11.1 Facility Location

Exact Solution of the Robust Knapsack Problem

Transcription:

One-Dimensional Heuristics Adapted for Two-Dimensional Rectangular Strip Packing G. Belov, G. Scheithauer, E. A. Mukhacheva Dresden University Preprint MATH-NM-02-2006 Revised on October 23, 2006 Abstract We consider two-dimensional rectangular strip packing without rotation of items and without the guillotine cutting constraint. We propose two iterative heuristics. The first one, SVC(SubKP), is based on a single-pass heuristic SubKP which fills every most bottom-left free space in a one-dimensional knapsack fashion, i.e. considering only item widths. It appears especially important to assign suitable pseudo-profits in this knapsack problem. The second heuristic BS(BLR) is based on the randomized framework BubbleSearch of Lesh and Mitzenmacher (2006). It generates different item sequences and runs Bottom-Left-Right (BLR), a simple modification of the Bottom-Left heuristic. We investigate the solution sets of SubKP and BLR and their relation to each other. In the tests, SVC(SubKP) improves the results for larger instances of the waste-free classes of Hopper and Turton and, on average, for the tested non-waste-free classes, compared to Alvarez-Valdes et al. (2006), Bortfeldt (2006), and Lesh and Mitzenmacher (2006). BS(BLR) gives the best results in some classes with smaller number of items (20, 40). Keywords: strip packing, heuristics, greedy, stochastic search, knapsack 1 Introduction The Two-Dimensional Rectangular Strip Packing Problem (2D- SPP) (Lodi et al., 2002) considers a vertical strip of fixed width. The goal is to minimize the height needed to pack a given set of rectangular items. The practical value of the problem comes not only in production but also in modeling of scheduling problems (Hartmann, 2000). Let us denote W Z + w = (w 1,..., w n ) Z+ n l = (l 1,..., l n ) Z+ n The width of the strip, The widths of the items i I = {1, 2,..., n}, The lengths (or heights) of the items. Technical University of Dresden, http://www.math.tu-dresden.de/ capad Ufa State Aviation Technical University, elitamuh@vmk.ugatu.ac.ru

2 G. Belov, G. Scheithauer, E. A. Mukhacheva This problem is known to be NP-hard, cf. Lodi et al. (2002). Bortfeldt (2006) describes a genetic algorithm SPGAL (L stands for layer approach ) where solutions themselves are used as genetic information. He shows advantages of this coding type and improves the results on many common test classes. His algorithm also works for the options of item rotation and guillotine cutting. Lesh and Mitzenmacher (2006) introduce a general approach Bubble- Search (BS) for sequence-dependent greedy-like heuristics. BS performs local search on item sequences and executes heuristics on them. For 2D-SPP, they use the Bottom-Left (BL) heuristic (Baker et al., 1980) which inputs a sequence of items and packs each next item to the most bottom-left position where the item can fit. Lesh and Mitzenmacher observe that some certain permutations of items, e.g. according to non-increasing height or area, give good results and they propose to randomly modify these basic sequences. Bortfeldt (2006) and Lesh and Mitzenmacher (2006) are unaware of each other s work so we compare their results. Alvarez-Valdes et al. (2006) present a reactive greedy randomized adaptive search procedure (GRASP). In the constructive phase, the most bottom-left free space is filled by carefully selected items. Thus, some relation to SubKP can be seen. Lodi et al. (2002) present an overview of two-dimensional rectangular packing. For 2D-SPP, they describe the layer-based heuristics next-fit decreasing, first-fit decreasing, and best-fit decreasing. These pack the items in layers across the strip which is in fact a one-dimensional principle producing 2-stage guillotine layouts. Bortfeldt (2006) uses layers as alleles of the genes in SPGAL, but he sophisticates a lot of effort to properly construct and post-optimize the layers to obtain good results also for non-guillotine cutting. In this paper, we propose two iterative heuristics. The first one uses a special single-pass heuristic SubKP in each iteration. Its idea comes from the heuristic called Substitution (Sub) (Mukhacheva and Mukhacheva, 2004). Sub fills every most bottom-left free hole in a greedy one-dimensional fashion considering only item widths. We propose to fill the free portions by solving a 1D knapsack problem (SubKP). Moreover, we investigate heuristic principles to assign item profits in these knapsack problems. For this purpose we adapt the method sequential value correction (SVC), already well-known e.g. for 1D stock cutting (Mukhacheva et al., 2000, Belov and Scheithauer, 2003). The second iterative heuristic we propose is BS(BLR). It uses in each iteration a single-pass heuristic Bottom-Left-Right (BLR), a modification of BL. The idea of this modification comes from (Mukhacheva and Mukhacheva, 2004): modify BL to heuristically decide on left or right positioning of each

One-Dimensional Heuristics for 2D Rectangular Strip Packing 3 item in the most bottom-left free space large enough for that item. It is well known (Baker et al., 1980) that BL is unable to obtain an optimal solution, even exhaustively trying all item permutations, for some instances where optimum is not waste-free. We show the same for BLR and Sub. One principle capable of representing all possible layouts is sequence pairs (Murata et al., 1995). With two sequences, we can exactly specify mutual position of the items. However, sequence pairs inherit much symmetry. Moreover, Murata et al. (1995) consider a slightly different problem, namely packing with the goal to minimize occupied area, and they do not propose any principle to generate feasible solutions for a container with fixed width. The framework of Fekete and Schepers (2004) for exact algorithms for higher-dimensional packing uses a general principle to specify moredimensional layouts by intersections of item projections on the coordinate axes. This principle covers all feasible layouts and avoids some symmetries. The authors propose a branch-and-bound framework to optimally decide whether a given set of items can be packed into a fixed-size container. They do not describe any special heuristic to construct intersection graphs of feasible solutions, the search completely relies on the branching scheme. Clautiaux et al. (2006) constructed a two-step exact algorithm which tries to determine the x-coordinates first and then, if bounds are not violated, starts an internal enumeration to find the complete solution. The results reported are comparable with (Fekete and Schepers, 2004), however on instances with W = H = 20 which makes them easy for the two-step method. The exhaustive algorithm of Lesh et al. (2004) to find perfect (waste-free) packings needs about 450 seconds for the N3 instances of Hopper (2000) with 29 items; series N4 with 49 items was not tried at all. Clautiaux et al. tested the twostep method on the same instances, also without positive results for instances with 49 items and more (private communication). Other exact approaches, to our knowledge, are even less efficient. In the next section we introduce the one-dimensional cutting stock problem (1D-CSP, cf. Belov and Scheithauer, 2003) and define additional conditions for 1D-CSP solutions to represent those of 2D-SPP. In Sections 3 and 4 we describe our iterative heuristics SVC(SubKP) and BS(BLR). Section 5 investigates the solution sets of SubKP and BLR, Section 6 gives some details of the implementation and Section 7 presents computational results. 2 Representing 2D-SPP as a Special 1D-CSP Let us consider 1D-CSP instances defined by the following data: (W, w, l), where W is the size of every stock bin, w is the vector of product sizes, and l is the vector of order demands. In the classical 1D-CSP, at least l i items

4 G. Belov, G. Scheithauer, E. A. Mukhacheva of product type i have to be obtained, i I. The goal is to minimize the number of stock bins used. Usually, a solution is represented by a set A A = {a Z n + : wa W, a l} of cutting patterns. The i-th element a i is the number of items of type i in a. To define a solution using certain patterns a A, we need their usage frequencies x a Z +. In order for 1D-CSP solutions to represent those of 2D-SPP, the former have to satisfy further conditions. First, we demand exactly l i items of each product type i I. Additionally, the solutions have to satisfy Contiguity of items: there must exist such an ordering of bins that all items of one type are located in consecutive bins; Constant location: all items of one type have the same position in each bin. To simplify the formal description of these properties, we use the notions of slice and slice structure (Mukhacheva and Mukhacheva, 2004) which are somewhat related to cross-sections defined in (Healy et al., 1999). Definition 1. A slice is the two-dimensional shape obtained by replicating a certain pattern (of width W and length 1) in the length direction. A slice is represented by a list s = (a; p; x) with a {0, 1} n p R n + x R + the vector representing a (cross-section) pattern, the vector of item positions in it (in the width direction), the length of the slice, i.e. the number of replications of pattern (a, p). Definition 2. The slice structure corresponding to a 2D-SPP solution is an ordered list (s 1 ;... ; s k ) of slices satisfying j (s j.a i )(s j.x) = l i i (item length) { } maxj<j0 {s s j0.a i min j.a i } i, j max j>j0 {s j.a i } 0 slice 4 (contiguity) slice 3 slice 2 s j.p i = const j : s j.a i > 0, i slice 1 (constant location) We want to distinguish the notion of slice from the notion of layer used e.g. in (Bortfeldt, 2006), where items are contained completely inside a layer.

One-Dimensional Heuristics for 2D Rectangular Strip Packing 5 3 Iterative Scheme SVC(SubKP) Algorithm Sub (Mukhacheva and Mukhacheva, 2004) constructs a 2D-SPP solution slice after slice. It always selects the left-most free space in the last slice and fills it by the 1D greedy heuristic, considering only item widths. A similar algorithm from (Mukhacheva and Valeeva, 2000) fills every free space by solving a subset-sum problem with item widths; then, the filled items are ordered by non-increasing heights. Inspired by Sub and the 1D-CSP heuristic SVC (Mukhacheva et al., 2000, Belov and Scheithauer, 2003), we propose the framework SVC(SubKP). It iteratively executes the single-pass heuristic SubKP whose parameters (pseudo-profits) are managed by SVC. SubKP is a modification Sub: it fills the empty spaces solving a one-dimensional knapsack problem. Especially for waste-free instances, the following idea seems very sound: as item profits for the knapsack problem, select item widths and slightly modify them. This gives something very close to a subset-sum problem. Algorithm SubKP input: W, w = (w 1,..., w n ), l = (l 1,..., l n ) // 2D-SPP instance data d = (d 1,..., d n ) // pseudo-profits iter // iteration number output: ss // the slice structure of the constructed packing variables: vscale, s, p Permute (static), f Permute, p InvertHole (static), p bs INITIALIZATION OF VARIABLES: vscale 10 RndUniform( 0.8, 0.5) ; // a scaling factor for pseudo-profits if RndUniform(0, 1) < 0.01 or 1 = iter // at the first run and sometimes later: p InvertHole RndUniform(0, 0.05); // prob-ty to invert hole ordering if RndUniform(0, 1) < 0.01 or 1 = iter // at the first run and sometimes later: p Permute RndUniform(0.8, 1); // prob-ty to permute all holes in a run f Permute boolean(rnduniform(0, 1) < p Permute ); p bs RndUniform(0.6, 0.9); // the selection prob-ty for hole perm. s EmptySlice(W ); // init slice s by an empty slice while i: l i > 0 for each hole h in s FillHole(h, d, vscale, p InvertHole, f Permute, p bs ); s.length min{l i : s.a i > 0}; ss (ss; s); // adding the new slice for each item i: s.a i > 0 l i l i s.length; if 0 = l i // when item i disappears from the slice, s.integratenewhole(i); // just unite arising neighboring holes END. Figure 1: Algorithm SubKP

6 G. Belov, G. Scheithauer, E. A. Mukhacheva 3.1 The Knapsack Substitution Heuristic (SubKP) procedure FillHole(h, d, vscale, p InvertHole, f Permute, p bs ) variables: I 0 // the set of unpacked items i with w i Width(h) dw // item profits for the knapsack problem fhigherleft, fshoveleft;// flags for sorting and shoving begin /// CHOOSE THE FILLING ITEMS by solving a binary knapsack problem: dw i w i + d i vscale min{w i /d i : i I 0 } i I 0 ; h.fillingitems Solve 1D BinKP(Width(h), (w i, dw i ), i I 0 ); /// ORDER AND PLACE THE SELECTED ITEMS: fhigherleft boolean(if the left wall of h is higher than the right one); fshoveleft fhigherleft; if RndUniform(0, 1) < p InvertHole // invert fhigherleft with small probability: fhigherleft not fhigherleft; if RndUniform(0, 1) < p InvertHole // the same for fshoveleft: fshoveleft not fshoveleft; h.sortitemsbydecreasingheight; // (from left to right) if not fhigherleft h.reverse Item Order; if f Permute BubblePermute(h.FillingItems, p bs ); if not fshoveleft h.shoveitemsright; // move all to the right; left was the default. end. Figure 2: Procedure FillHole of SubKP Figure 1 gives a formal description. As input, the algorithm receives some pseudo-profits d i of the items. To solve a knapsack problem in the procedure FillHole (Figure 2), we normalize them and add the item widths. Note that the variables p Permute and p InvertHole are static. They are initialized in the first iteration and sometimes updated later. After filling the free space, it is important to sort the filling items and shove them left or right, which is also done in FillHole. Inspired by Mukhacheva and Mukhacheva (2000), we apply the following heuristic rule: we sort the items by non-increasing heights starting from the higher wall of the hole. Under walls we understand the immediate left and right vertical boundaries of the hole. Then, the whole bunch is shoved to the higher wall. An example showing the advantage of sorting the items is shown in Figure 3. After sorting, the sequence may be permuted using the BubblePermute neighborhood construction procedure from (Lesh and Mitzenmacher, 2006) described in Figure 4. The idea is to take one of the elements k = j,..., n for

One-Dimensional Heuristics for 2D Rectangular Strip Packing 7 position j trying them consecutively with some probability. We slightly simplified the BubblePermute procedure by doing only one selection pass for each element (the for-loop in j). The algorithm SubKP has a pseudo-polynomial complexity O(n 2 W ). Figure 3: An example where item sorting in FillHole is advantageous 3 4 4 3 On the left, the heights of items 3, 4 decrease starting from the higher wall of the corresponding free space, giving a better packing procedure BubblePermute(s, p bs ) begin for i = 1 to size(s)-1 for j = i to size(s) if RndUniform(0, 1) < p bs if i j remove s j from s and insert it before s i ; break; // continues with next i end. Figure 4: Procedure BubblePermute for sequence modification 3.2 Sequential Value Correction (SVC) A thorough investigation of SVC for 1D cutting was done in (Mukhacheva et al., 2000, Belov and Scheithauer, 2003). The idea is to fill every bin by solving a knapsack problem while assigning some heuristic pseudo-profits to the items. These represent intuitive per-item stock consumption in previous solutions. Especially if an item occurs in the end of the solution, it might produce a lot of waste. This suggests to pack it earlier in subsequent solutions. The same might apply to 2D-SPP. When a long item is packed in the end, it may rise high having a lot of free space around. In (Belov and Scheithauer, 2003), we proposed to make pseudo-profits over-proportional to item lengths because smaller items create good packings in the beginning leaving no good combinations for the end of a solution. Here we applied the same idea. However solving a two-dimensional problem, our pseudo-profits are correlated to item areas. Moreover, overproportionality appeared most effective when related to the item portions

8 G. Belov, G. Scheithauer, E. A. Mukhacheva in separate slices. An iteration of the algorithm works as follows (Figure 5): given the slice structure of a solution, the pseudo-profits are updated and given as input to a heuristic, e.g. SubKP. The over-proportionality parameter slicep is generated as a normally distributed random number. Algorithm SVC(H) input: W, w = (w 1,..., w n ), l = (l 1,..., l n ) // 2D-SPP instance data H(W, w, l, d, iter) // a heuristic such as SubKP parameters: µ 1 = 2.1, σ 1 = 0.1 // parameters of the normal distribution of slicep p 1 = 0.1 // probability to regenerate slicep in an iteration variables: d = (d 1,..., d n ) // pseudo-profits ss // the slice structure of a packing returned by the heuristic slicep, qwaste MAIN PART: ss (); // init ss to an empty list next iter profit reset = 1; iter = 1; while not TimeLimit if iter = next iter profit reset next iter profit reset += RndUniform(1000, 19000); d i w i l i i; // (re)init pseudo-profits at start or later if RndUniform(0, 1) < p 1 or 1 = iter slicep RndNormal(µ 1, σ 1 ); // regenerate slicep for this iteration for each slice s ss qwaste s.waste/s.occupied; // the relation of waste and occupied parts for each item i: s.a i > 0 // updating pseudo-profits: d i d i + qwaste (w i s.length) slicep ; ss ExecuteHeuristic(H(W, w, l, d, iter)); iter iter + 1; END. Figure 5: Algorithm SVC with some heuristic H 4 Iterative Scheme BS(BLR) The Bottom-Left heuristic can be viewed as a two-dimensional version of the First-Fit heuristic for one-dimensional stock cutting. In both cases, we take the next item from the priority list and place it in the earliest possible position, i.e. closest to the bottom (2D) or to the beginning of the pattern sequence (1D). But in BL we have to consider the second dimension, i.e. we can only put the whole item at once.

One-Dimensional Heuristics for 2D Rectangular Strip Packing 9 An improved version of the BL heuristic was proposed in (Mukhacheva and Mukhacheva, 2004). It employed a strategy to enlarge unfilled zones. However, the description was not clear and we propose a simplified rule. Each object is placed in the lowest possible level and in the left-most available hole. But in that hole it is justified left or right as follows, Figure 6. We analyze how much unused area would appear immediately on both sides of the object. We place the object left-most or right-most so that to create larger unused area on the opposite side (on the right or left, respectively), with the hope to have a larger probability to place another object(s) in this area. However, this rule is reverted each time with probability p InvertLR and p InvertLR is selected for each run randomly uniformly from [0, 0.03). The algorithm is given in Figure 7. areal To construct item orderings for BLR, we used a simplified BubblePermute procedure from (Lesh and Mitzenmacher, 2006), see Figure 4 above. next item?? arear Figure 6: BLR placement Here we set p bs = 0.6 and base sequences are sorted according to non-increasing height, area, width, or perimeter, with probabilities 0.4, 0.2, 0.2, and 0.2, respectively. Concerning the implementation, for placing the items in a partial packing, we used a slice-structure-based procedure similar to (Healy et al., 1999). Algorithm BLR input: W, w = (w 1,..., w n ), l = (l 1,..., l n ) // 2D-SPP instance data π = (π 1 ;... ; π n ) // item sequence let p InvertLR RndUniform(0, 0.03); // probability to invert each justification for i = 1 to n Find the bottom-most and then left-most hole able to contain item π i ; Compute the areas a L and a R of the free space arising immediately to the left and to the right of the item, when justifying it left-most or right-most, respectively; if a L > a R, decide to justify the item right-most, otherwise left-most; Invert this decision with probability p InvertLR ; Figure 7: Algorithm BLR The whole algorithm BubbleSearch(BLR) or, shortly, BS(BLR) works iteratively, similar to (Lesh and Mitzenmacher, 2006), as follows (Figure 8): in each run, we generate an input sequence and execute BLR. There is no information interchange between iterations as it is in SVC.

10 G. Belov, G. Scheithauer, E. A. Mukhacheva Algorithm BubbleSearch input: W, w = (w 1,..., w n ), l = (l 1,..., l n ) H(W, w, l, π) while not (stop) π (select one of the four base sequences); BubblePermute(π, p bs = 0.6); ExecuteHeuristic(H(W, w, l, π)); // 2D-SPP instance data // a sequence-based heuristic such as BL or BLR Figure 8: Algorithm BubbleSearch (BS) with some sequence-based heuristic 5 The Solution Sets of SubKP and BLR There are instances for which BL is unable to find an optimum whatever sorting of items it is given. Such instances must have non-waste-free optimal solutions. In Figure 9, instance a) was given in Baker et al. (1980). Instance b) is even BLR-unsolvable. A proof can be done by showing that the represented layouts are the only optimal solutions because some length/width combinations uniqely fit into the container and are necessary for an optimum. Observe that item sets (7,10), (7,8,9), (4,5,6), and (1,2,3) must be in the same rows, i.e. have non-empty intersections in the horizontal projection, because only these width combinations produce exactly W. Similarly, item sets (1,4,7), (2,5,8,10), and (3,6,9,10) must be in the same columns. If another optimal solution exists then it differs by permutations of columns (2,5,8) and (3,6,9) and/or rows (1,2,3) and (4,5,6) with the block (7,8,9,10). None of these permutations fit into the optimal container. To simplify the proof, we might forbid these permutations by introducing items similar to 10, as in Figure 9, c). 3 4 1 2 5 The dimensions of piece 1 should be increased by a small ɛ a) 5 2 4 3 1 2 3 4 5 6 7 8 9 10 b) 1 2 3 4 5 6 7 8 9 10 c) Figure 9: BL-unsolvable instances a) is from (Baker et al., 1980); b) and c) are also BLR-unsolvable The instances in Figure 9, b) and c) are also unsolvable by SubKP. Moreover, we have the following

One-Dimensional Heuristics for 2D Rectangular Strip Packing 11 Proposition 1. The set of solutions obtainable by SubKP is in general a true subset of BLR packings. Proof. Note that both SubKP and BLR produce packings where the position of each item is bottom-left or bottom-right justified. Consider a packing produced by SubKP, especially the order of items successively packed. Now, applying BLR to the corresponding item ordering can produce the same packing, if the right or left justification is chosen randomly. On the other hand, we can easily construct a BLR packing not obtainable by SubKP. For example, in SubKP there can be no free space on the bottom line of an item in the justification direction. Similarly one can prove that the solution set of Sub (Mukhacheva and Mukhacheva, 2004) where hole fillings are justified to the left is a true subset of BL solutions. Moreover, the method of filling the lowest free space in SubKP, namely always to the full width, can exclude good solutions. Despite these theoretical concerns, SVC(SubKP) performs better than BS(BLR) in most test classes. 6 Implementation To solve the 1D binary knapsack problems in SubKP, we used the algorithm combo of Martello et al. (1999), available from the website of D. Pisinger (http://www.diku.dk/ pisinger/). The program is designed for integer item profits. However, we have real-valued profits. Thus, we scaled all profits dw i so that the simple upper bound max{dw i W /w i : i I 0 } on the solution value was 10 6, where W is the length of the knapsack, and rounded them down. We discovered that the ordering in which items are given to combo is important. For example, if we accept the ordering from the data file where a BL-optimal sequence is given (this is the case for Hopper and Turton instances), then combo fills the bottom of the container with the optimal items which leads to an unclean experiment. Thus, we sorted the items according to the sequences produced for BLR. Random number generation according to approximate normal distribution was done as a sum of 12 uniforms (Moler, 2001). The values of algorithm parameters were chosen after some experimentation. For example, for waste-free instances, it is advantageous to select a smaller scaling factor for the pseudo-profits in FillHole. We applied some compromise values which seemed good on average.

12 G. Belov, G. Scheithauer, E. A. Mukhacheva 7 Numerical Experiments The experiment was run on Linux workstations with AMD Opteron TM 250 CPU (2x2.4 GHz), 4 GB of memory. The software was compiled in GNU C++ 4.0.2 and run under Linux kernel 2.6.10, 64-bit. Each of the algorithms SVC(SubKP) and BS(BLR) was implemented sequentially and executed as a single process. The algorithm SPGAL of Bortfeldt (2006) was executed on a 2 GHz Pentium PC with 16 minutes time per instance (10 runs 95 sec. each). The algorithm BubbleSearch(BL) of Lesh and Mitzenmacher (2006) had 1 hour per instance. The GRASP of Alvarez-Valdes et al. (2006) had 60 seconds per instance on a Pentium 4 Mobile 2 GHz. The SPECint2000 ratio (www.spec.org) is about 1700 for Opteron 250 and about 1441 for Pentium 4 Mobile 2 GHz. Thus, we allowed 50 seconds of total processor time (user + system time on behalf of the process) for each instance. Hopper and Turton presented several series of waste-free instances of the 2D-SPP, series N and T (Hopper, 2000) and series C (Hopper and Turton, 2000). Each series contains 7 instance groups. In series C, each group contains 3 instances. Series N and T have 5 instances per group and optimal solution sizes are 200 200. The results are presented in Table 1. The columns of the table have the following meaning. inst is the instance group, n is the average number of items, Opt is the optimal value for each instance in the group. Section SVC(SubKP) shows iter best (average number of iterations till the best solution), iter all (average total iterations), t best (average time till the best solution), UB (the best found solution), and Gap% (its per cent gap to the optimum). For BS(BLR), we show only the best objective value and the gap. In our implementation, BS(BLR) performs nearly triple number of iterations per time unit compared to SVC(SubKP). The minimal gaps are presented in bold. We see that SVC improves the results for larger instances. Another standard test set is that of Berkey and Wang (1987), classes C01 C06 in Tables 2, 3, which is usually considered together with the set of Martello and Vigo (1998), classes C07 C10 in Table 3. Here we compare the results also with Iori et al. (2003). The instances are very well described in (Lodi et al., 1999). SVC(SubKP) improves the overall result. In class C10, the best average result is achieved by SPGAL (Bortfeldt, 2006). The instances of C10 were generated with 70% of items with both sizes smaller than half the container width. BS(BLR) has the best values on some classes with smaller number of items. In the column LB new we see the lower bound produced by the bar relaxation from (Scheithauer, 1999). At first we computed the horizontal-bar relaxation, then the vertical-bar one. The maximum of them is a lower bound on 2D-SPP. We see that this bound always dominated the bound given in

One-Dimensional Heuristics for 2D Rectangular Strip Packing 13 (Bortfeldt, 2006), column LB old. This is the reason why we did not follow the common practice of reporting results in the form of gaps relative to some bound. 8 Conclusions We proposed the effective modifications SubKP and BLR of the heuristics Sub and BL, respectively, and the iterative framework SVC(SubKP). The framework SVC(SubKP) improves the results for larger waste-free instances and, on average, for the tested non-waste-free instances. The other framework which we investigated, BS(BLR), does it for some smaller instances. However, both SubKP and BLR are in some way restricted because they cannot produce optima for certain instances. Future research could try to overcome this restriction. Acknowledgements We are grateful to the two anonymous referees for valuable suggestions concerning presentation quality. We also thank François Clautiaux and Antoine Jouglet for running the two-step method on the waste-free instances of Hopper and Turton. References R. Alvarez-Valdes, F. Parreño, and J. M. Tamarit. Reactive GRASP for the strip-packing problem. Computers & Operations Research, 2006. URL www.sciencedirect.com. Article in Press. B. S. Baker, E. G. Coffman, and R. L. Rivest. Orthogonal packings in two dimensions. SIAM J. on Computing, 9(4):846 855, 1980. G. Belov and G. Scheithauer. Setup and open stacks minimization in onedimensional stock cutting. Preprint MATH-NM-16-2003, Dresden University, 2003. To appear in INFORMS J. on Computing. J. O. Berkey and P. Y. Wang. Two dimensional finite bin packing algorithms. J. Oper. Res. Soc., 38(5):423 429, 1987. A. Bortfeldt. A genetic algorithm for the two-dimensional strip packing problem with rectangular pieces. European Journal of Operational Research, 172(3):814 837, 2006.

14 G. Belov, G. Scheithauer, E. A. Mukhacheva F. Clautiaux, J. Carlier, and A. Moukrim. A new exact method for the twodimensional orthogonal packing problem. European Journal of Operational Research, 2006. In Press, Corrected Proof, Available online. S. P. Fekete and J. Schepers. A combinatorial characterization of higherdimensional orthogonal packing. Mathematics of Operations Research, 29 (2):353 368, 2004. S. Hartmann. Project Scheduling Under Limited Resources. Springer, 2000. P. Healy, M. Creavin, and A. Kuusik. An optimal algorithm for rectangle placement. Operations Research Letters, 24(1-2):73 80, 1999. E. Hopper. Two-dimensional packing utilising evolutionary algorithms and other meta-heuristic methods. PhD thesis, Cardiff University, 2000. E. Hopper and B. C. H. Turton. An empirical investigation of metaheuristic and heuristic algorithms for a 2D-packing problem. European Journal of Operational Research, 128(1):34 57, 2000. M. Iori, S. Martello, and M. Monaci. Metaheuristic algorithms for the strip packing problem. In P. Pardalos and V. Korotkich, editors, Optimizations and Industry: New Frontiers. Kluwer Academic Publishers, 2003. N. Lesh and M. Mitzenmacher. BubbleSearch: A simple heuristic for improving priority-based greedy algorithms. Information Processing Letters, 97(4):161 169, 2006. N. Lesh, A. McMahon, J. Marks, and M. Mitzenmacher. An exhaustive approach to 2D strip packing. Information Processing Letters, 90(1):7 14, 2004. A. Lodi, S. Martello, and D. Vigo. Heuristic and metaheuristic approaches for a class of two-dimensional bin packing problems. INFORMS Journal on Computing, 11(4):345 357, 1999. A. Lodi, S. Martello, and D. Vigo. Recent advances on two-dimensional bin packing problems. Discrete Applied Mathematics, 123:379 396, 2002. S. Martello and D. Vigo. Exact solution of the finite two-dimensional bin packing problem. Management Science, 44:388 399, 1998. S. Martello, D. Pisinger, and P. Toth. Dynamic programming and strong bounds for the 0-1 knapsack problem. Management Science, 45:414 424, 1999.

One-Dimensional Heuristics for 2D Rectangular Strip Packing 15 C. Moler. Ziggurat algorithm generates normally distributed random numbers. MATLAB News & Notes, 2001. URL http://www.mathworks.com. A. S. Mukhacheva and A. F. Valeeva. Dynamic enumeration for twodimensional packing. Information Technologies, (5):30 37, 2000. In Russian. E. A. Mukhacheva and A. S. Mukhacheva. Method of reconstruction for rectangular packing. Information Technologies, (4):30 36, 2000. In Russian. E. A. Mukhacheva and A. S. Mukhacheva. Local search methods with block structures in rectangular packing. Automation and Telemechanics, (2): 101 112, 2004. In Russian. E. A. Mukhacheva, G. N. Belov, V. M. Kartak, and A. S. Mukhacheva. Linear one-dimensional cutting-packing problems: numerical experiments with sequential value correction method (svc) and a modified branch-andbound method (mbb). Pesquisa Operacional, 20(2):153 168, 2000. H. Murata, K. Fujiyoshi, S. Natake, and Y. Kajitani. Rectangle-packingbased module placement. In Proc. IEEE/ACM International Conf. on Computer-Aided Design, pages 472 479, 1995. G. Scheithauer. LP-based bounds for the container and multi-container loading problem. Int. Trans. Opl. Res., 6:199 213, 1999.

16 G. Belov, G. Scheithauer, E. A. Mukhacheva Table 1: Results for the waste-free instances of Hopper (2000) and Hopper and Turton (2000) SVC(SubKP) BS(BLR) Others, Gap% inst n Opt iter best iter all t best UB Gap% UB Gap% GRASP SPGAL BS(BL) 3600s C1 16,33 20 24 125409 0 20,3 1,7 20,3 1,7 0,0 1,6 - C2 25 15 41 41 0 15,0 0,0 15,0 0,0 0,0 2,1 - C3 28,33 30 15083 77332 4 30,3 1,1 30,3 1,1 1,1 3,2 - C4 49 60 205 90791 0 61,0 1,7 61,0 1,7 1,7 2,7 - C5 73 90 446 52760 0 91,0 1,1 91,0 1,1 1,1 1,5 - C6 97 120 2130 35299 3 121,0 0,8 121,7 1,4 1,6 1,6 - C7 196,33 240 4926 12358 21 242,0 0,8 242,7 1,1 1,4 1,2 - N1 17 200 157798 265505 23 206,6 3,3 208,8 4,4 0,0-4,5 N2 25 200 54088 207383 13 206,8 3,4 208,4 4,2 3,2-4,7 N3 29 200 65428 176068 19 207,0 3,5 208,4 4,2 3,7-4,6 N4 49 200 13191 87155 8 205,0 2,5 206,2 3,1 3,0-3,9 N5 73 200 23585 51060 24 204,2 2,1 205,4 2,7 2,4-4,0 N6 97 200 9447 34950 14 203,4 1,7 204,4 2,2 2,1-3,0 N7 197 200 2176 13004 8 202,0 1,0 202,0 1,0 1,5-1,8 T1 17 200 95672 148601 12 201,8 0,9 202,0 1,0 0,9 - - T2 25 200 24528 215748 6 207,0 3,5 208,0 4,0 3,3 - - T3 29 200 64862 168013 19 206,6 3,3 208,6 4,3 3,6 - - T4 49 200 10455 85068 6 205,0 2,5 206,4 3,2 3,0 - - T5 73 200 15007 49762 15 204,2 2,1 205,4 2,7 2,6 - - T6 97 200 4949 34394 7 203,2 1,6 204,2 2,1 2,2 - - T7 199 200 2388 11944 10 202,0 1,0 202,8 1,4 1,3 - - Overall C,N,T 1,89 2,31 1,89

One-Dimensional Heuristics for 2D Rectangular Strip Packing 17 Table 2: Results for the instances of Berkey and Wang (1987), classes C01 C05 SVC(SubKP) BS(BLR) Others Lower bounds Inst n iter best iter all t best UB UB GRASP SPGAL BS(BL) Iori et al. LB old Lb new C01 1 10 20 10239 255814 1,75 61,4 61,3 61,3 61,6 61,3 61,1 60,3 60,8 11 20 40 290 110328 0,13 122,0 122,0 121,9 122,0 122,0 121,8 121,6 121,7 21 30 60 2619 61624 1,97 188,5 188,9 188,7 189,0 188,9 189,0 187,4 188,5 31 40 80 1593 44141 1,73 262,6 262,8 262,9 262,0 262,8 262,8 262,2 262,6 41 50 100 211 27422 0,30 304,9 305,5 305,6 305,0 305,5 305,5 304,4 304,8 Ave 60 2991 99866 1,18 187,9 188,1 188,1 187,9 188,1 188,0 187,2 187,7 C02 1 10 20 641 37159 0,09 19,8 19,8 19,8 20,5 19,8 19,9 19,7 19,7 11 20 40 105 105 0,04 39,1 39,2 39,1 39,1 39,1 39,9 39,1 39,1 21 30 60 651 651 0,44 60,1 60,5 60,2 60,1 60,6 61,6 60,1 60,1 31 40 80 91 91 0,09 83,2 83,5 83,2 83,3 83,6 84,6 83,2 83,2 41 50 100 50 50 0,06 100,5 100,9 100,5 100,7 100,8 101,8 100,5 100,5 Ave 60 308 7611 0,15 60,5 60,8 60,6 60,7 60,8 61,6 60,5 60,5 C03 1 10 20 22920 285676 4,35 164,6 164,1 163,5 166,7 164,2 164,7 157,4 161,0 11 20 40 8866 116202 3,91 333,9 334,4 333,8 335,4 334,8 337,9 328,8 331,6 21 30 60 15333 66971 11,60 506,8 509,7 506,6 509,8 510,1 515,9 500,0 503,4 31 40 80 9243 45232 10,40 709,8 713,5 710,0 712,5 713,0 717,4 701,7 707,2 41 50 100 6752 33036 10,10 839,5 843,3 840,2 842,6 844,1 847,7 832,7 834,9 Ave 60 12623 109423 8,07 510,9 513,0 510,8 513,4 513,2 516,7 504,1 507,6 C04 1 10 20 36640 306633 6,32 63,9 63,7 63,4 66,3 63,9 65,6 61,4 61,9 11 20 40 32391 115016 14,50 125,9 127,1 126,3 127,1 128,1 131,2 123,9 123,9 21 30 60 14584 63907 11,50 195,6 197,6 196,7 196,6 199,9 202,1 193,0 193,0 31 40 80 13675 43287 15,80 270,4 272,8 272,2 272,2 276,6 278,6 267,2 267,2 41 50 100 8259 31332 13,50 325,4 328,0 327,3 327,3 332,1 332,2 322,0 322,0 Ave 60 21110 112035 12,30 196,2 197,8 197,2 197,9 200,1 201,9 193,5 193,6 C05 1 10 20 44158 271976 8,11 537,4 534,8 533,9 536,6 534,8 536,2 512,2 530,2 11 20 40 2879 108024 1,28 1076,5 1076,4 1074,7 1081,4 1076,7 1085,8 1053,8 1069,1 21 30 60 11740 62724 9,05 1648,1 1649,8 1645,9 1650,8 1651,1 1667,9 1614,0 1635,4 31 40 80 11193 41513 13,20 2288,5 2296,5 2290,4 2299,5 2297,2 2304,7 2268,4 2283,8 41 50 100 18576 32079 28,60 2652,1 2667,0 2652,0 2666,9 2669,5 2695,9 2617,4 2634,8 Ave 60 17709 103263 12,00 1640,5 1644,9 1639,4 1647,0 1645,9 1658,1 1613,2 1630,7

18 G. Belov, G. Scheithauer, E. A. Mukhacheva Table 3: Results for the instances of Berkey and Wang (1987), Martello and Vigo (1998), classes C06 C10 SVC(SubKP) BS(BLR) Others Lower bounds Inst n iter best iter all t best UB UB GRASP SPGAL BS(BL) Iori et al. LB old Lb new C06 1 10 20 51693 296730 8,91 168,6 169,8 167,3 179,1 170,3 174,9 159,9 162,8 11 20 40 45080 109797 20,80 332,2 335,6 333,6 337,0 339,2 346,0 323,5 323,5 21 30 60 29832 61764 24,80 516,9 521,7 520,6 519,8 529,7 530,9 505,1 505,1 31 40 80 16919 40918 21,20 714,0 720,7 718,9 719,4 733,9 732,2 699,7 699,7 41 50 100 11171 29744 19,10 860,5 865,5 865,4 868,1 882,1 874,9 843,8 843,8 Ave 60 30939 107791 19,00 518,4 522,7 521,2 524,7 531,0 531,8 506,4 507,0 C07 1 10 20 2 220590 0,00 501,9 501,9 501,9 502,7 501,9 502,7 490,4 500,6 11 20 40 5 89266 0,00 1059,9 1059,0 1059,0 1059,4 1059,0 1060,3 1049,7 1054,7 21 30 60 1600 50615 1,49 1530,0 1529,8 1529,6 1529,7 1529,7 1529,5 1515,9 1525,0 31 40 80 98 33082 0,14 2222,1 2222,6 2222,2 2222,9 2222,2 2224,4 2206,1 2220,8 41 50 100 482 23401 1,03 2644,0 2646,7 2645,2 2648,8 2646,5 2646,4 2627,0 2642,7 Ave 60 437 83391 0,53 1591,6 1592,0 1591,6 1592,7 1591,9 1592,7 1577,8 1588,8 C08 1 10 20 59034 287178 10,20 461,5 461,0 458,0 465,9 461,6 467,6 434,6 439,1 11 20 40 45453 108977 21,00 956,1 962,4 954,4 956,2 967,8 979,3 922,0 924,7 21 30 60 21409 63884 17,20 1400,8 1413,9 1405,9 1398,9 1425,1 1436,0 1360,9 1360,9 31 40 80 22685 43276 26,80 1964,8 1980,3 1973,6 1967,3 1992,0 2007,2 1909,3 1911,4 41 50 100 18744 31310 30,50 2423,1 2446,7 2439,5 2422,3 2466,7 2477,2 2362,8 2363,0 Ave 60 33465 106925 21,10 1441,3 1452,9 1446,3 1442,1 1462,6 1473,5 1397,9 1399,8 C09 1 10 20 1 231794 0,00 1106,8 1106,8 1106,8 1106,8 1106,8 1119,2 1106,8 1106,8 11 20 40 7686 84340 4,34 2190,6 2190,7 2190,6 2191,2 2190,6 2231,2 2189,2 2190,0 21 30 60 1 43414 0,00 3410,4 3410,4 3410,4 3417,5 3410,4 3410,4 3410,4 3410,4 31 40 80 2 26707 0,00 4588,1 4588,1 4588,1 4588,1 4588,1 4873,9 4578,6 4584,4 41 50 100 2 19576 0,01 5434,9 5434,9 5434,9 5434,9 5434,9 5718,9 5430,5 5431,2 Ave 60 1538 81166 0,87 3346,2 3346,2 3346,2 3347,7 3346,2 3470,7 3343,1 3344,6 C10 1 10 20 13269 304134 2,32 351,4 350,8 350,5 354,2 351,1 355,1 337,8 347,1 11 20 40 18679 119930 7,85 667,2 664,9 664,5 664,7 665,7 674,2 642,8 654,6 21 30 60 21817 70490 15,80 936,0 936,3 935,5 932,6 940,1 953,6 911,1 919,5 31 40 80 14472 47523 15,50 1211,2 1213,4 1209,7 1207,4 1217,8 1229,6 1177,6 1186,0 41 50 100 12276 35035 17,90 1513,9 1518,8 1515,1 1507,8 1525,3 1537,5 1476,5 1480,7 Ave 60 16103 115422 11,90 935,9 936,8 935,1 933,3 940,0 950,0 909,2 917,6 Overall C1-C10 1042,9 1045,5 1043,6 1044,8 1048,0 1064,5 1029,3 1033,8

One-Dimensional Heuristics for 2D Rectangular Strip Packing 19 List of Figures 1 Algorithm SubKP......................... 5 2 Procedure FillHole of SubKP.................. 6 3 An example where item sorting in FillHole is advantageous.. 7 4 Procedure BubblePermute for sequence modification...... 7 5 Algorithm SVC with some heuristic H............. 8 6 BLR placement.......................... 9 7 Algorithm BLR.......................... 9 8 Algorithm BubbleSearch (BS) with some sequence-based heuristic 10 9 BL-unsolvable instances..................... 10 List of Tables 1 Results for the waste-free instances of Hopper (2000) and Hopper and Turton (2000) 16 2 Results for the instances of Berkey and Wang (1987), classes C01 C05 17 3 Results for the instances of Berkey and Wang (1987), Martello and Vigo (1998), classes C06 C