Mathematical Problems in Engineering

Volume 2012 (2012), Article ID 254346, 28 pages

http://dx.doi.org/10.1155/2012/254346

## A Variable Neighborhood Search Algorithm for the Leather Nesting Problem

Centro de Investigação Algoritmi da Universidade do Minho, Escola de Engenharia, Universidade do Minho, 4710-057 Braga, Portugal

Received 20 May 2011; Accepted 6 October 2011

Academic Editor: J. J. Judice

Copyright © 2012 Cláudio Alves et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

The leather nesting problem is a cutting and packing optimization problem that consists in finding the best layout for a set of irregular pieces within a natural leather hide with an irregular surface and contour. In this paper, we address a real application of this problem related to the production of car seats in the automotive industry. The high quality requirements imposed on these products combined with the heterogeneity of the leather hides make the problem very complex to solve in practice. Very few results are reported in the literature for the leather nesting problem. Furthermore, the majority of the approaches impose some additional constraints to the layouts related to the particular application that is considered. In this paper, we describe a variable neighborhood search algorithm for the general leather nesting problem. To evaluate the performance of our approaches, we conducted an extensive set of computational experiments on real instances. The results of these experiments are reported at the end of the paper.

#### 1. Introduction

The leather nesting problem (LNP) is a two-dimensional cutting problem whose objective is to find the best layout for a set of irregular pieces within the boundaries of an irregular surface, which is a natural leather hide. The hides not only are irregular in their contour, but alsomay have holes and zones with different quality levels. On the another hand, the pieces are subject to quality requirements that restrict their placement within the hides. They are divided into quality zones that specify the minimum quality of the hide from which these parts of the pieces must be cut. Here, we consider a particular application of the LNP in the automotive industry, and in particular in the production of car seats. This application has influence on, namely, the characteristics of the pieces. For instance, the pieces found in this sector contrast with the pieces of other applications whose complexity tends to be low like in the furniture industry. In this paper, our conclusions and data are supported by the real case study of a multinational company operating in the automotive sector.

The LNP addressed in this paper shares most of the characteristics and requirements of other nesting problems. Obviously, the pieces must be placed within the boundaries of the hides, and they should not overlap. Except for the quality constraints mentioned above, no other constraints apply to the layouts like, for example, constraints on the directionality of the pieces. Since the hides have a limited area (in opposition to the strips whose area may be considered virtually unlimited), the standard optimization criterion that is considered when building the layouts is the total raw material usage. When multiple hides are involved, we may consider additional criteria like the percentage of remaining space that is left on the last hide [1]. The typology proposed in [2] classifies this LNP as a 2D-RCSP (*two-dimensional residual cutting stock problem*). Because of all these characteristics, the problem is very challenging. At the same time, the value of the hides and the potential for savings make this problem very relevant from an economical point of view.

A first contribution for a similar LNP can be found in [3]. In this paper, Heistermann and Lengauer describe a constructive heuristic that starts by selecting an empty region of the hide using a multicriteria quality function. A subset of pieces is then selected according to their geometry and to the geometry of the selected region. These pieces are placed in this region in the positions that maximizes another multicriteria function used to evaluate how good each piece fits in a given position. The authors report on computational results for real instances that show the competitiveness of their approach compared to the results achieved by human nesters.

More recently, Alves et al. [1] proposed a set of constructive heuristics for the general LNP addressed in this paper. Their approach combines different strategies for grouping the pieces, for selecting the next piece to place on the hide, for selecting an empty region of the hide where the selected piece will be placed, and for evaluating the different placement positions in this region. The authors use no-fit polygons to ensure the feasibility of the layouts, and also to guide the different selection processes of their heuristic. They report on a set of computational experiments on real instances that attest the performance of some of the combinations of strategies described in their paper.

Heistermann and Lengauer [3] and Alves et al. [1] are the only authors to report on results for the same general LNP as the one addressed in this paper. All the other contributions proposed in the literature [4–7] focus on variants of this LNP. In [4], Crispin et al. describe two genetic algorithms for a LNP with directionality constraints. They consider an application on the shoe-making industry where the rotations that can be applied to the pieces are restricted over the hide. In practice, these constraints reduce the complexity of the problem.

In [7], Yuping and Caijun explore a variant of the LNP with no quality constraints. They describe a solution approach based on genetic algorithms and simulated annealing and report on computational results with material usage of 70% achieved in one hour of computing time. Lee et al. [6] addressed a similar LNP with no quality zones and multiple hides. Their algorithm consists in placing the pieces sequentially on the hide, and in adjusting their placement through translations and rotations.

In this paper, we describe a variable neighborhood search (VNS) algorithm for the general LNP described above. Our approach relies on a fast constructive heuristic used to generate the first layout and to complete the partial layouts that might be generated during the local search procedure. It relies also on different neighborhood structures that are explored through the general framework proposed by Mladenović and Hansen in [8]. Our neighborhood structures are based on the sequence by which the pieces are placed on the hide and on the quality of the fitness of these pieces in the current layout. The goal is to improve quickly the incumbent solution by exploring neighboring solutions obtained by removing or replacing the pieces with the worst fitness in a given part of the sequence. We explore different strategies for removing and replacing the pieces with the worst fitness, and to generate the rest of the sequence from this piece forward. These strategies define the moves in the corresponding neighborhoods. The VNS framework is used to systematically explore the various neighborhoods and to escape from the regions that contain a local optimum through randomization. In our algorithm, the local search phase is performed on a single neighborhood space, which is the same as the one used in the shaking phase. As a consequence, our algorithm corresponds to an implementation of the basic or standard VNS. Extensive computational experiments are reported for real instances from our real case study. The tests were performed with two objectives: to tune the algorithm so as to identify the best set of parameters and evaluate the real impact of each neighborhood in the quality of the layouts and to evaluate the performance of the best approach on a large set of real instances.

To the best of our knowledge, no results have been reported in the literature concerning the application of the VNS metaheuristic to the general LNP addressed in this paper. In fact, we are not aware of any algorithm based on VNS for cutting and packing problems involving irregular shapes. Recent applications of VNS to cutting and packing problems can be found in [9–11].

In [9], the authors describe a hybrid method for the strip packing problem combining the greedy randomized adaptive search procedure (GRASP) with VNS. The problem consists in finding the best packing for a set of rectangles within a 2-dimensional strip with (virtually) infinite length. Their objective is to find the pattern with the minimum length. The authors describe an approach that embeds a VNS algorithm in the postprocessing phase of GRASP. The VNS metaheuristic is used to improve the packing of the last rectangles that were placed in the constructive phase. Their neighborhood structures are based on the permutations of these rectangles. They report on a set of computational experiments where their method compares favorably with a simulated annealing algorithm proposed in the literature [12].

In [10], Parreño et al. describe a VNS algorithm for the container-loading problem. The initial solution is generated using a constructive heuristic proposed in [13]. This heuristic builds iteratively a valid layout for the problem by choosing and placing a set of boxes into a so-called maximal space, that is, the space where the largest parallelepiped can be placed. The authors propose five different neighborhood structures for the problem based on five types of movements involving the deletion of layers, the insertion of columns and boxes, and emptying a complete region of the container. In [10], their algorithm is compared with other state-of-the-art approaches proposed in the literature on a set of 1500 benchmark instances. Their approach outperforms these other algorithms for the set of instances that were considered.

In [11], the authors describe a VNS approach for different variants of the 2-dimensional cutting stock problem with guillotine constraints. They propose a set of greedy heuristics for the problem, together with three neighborhood structures and their corresponding local search procedures. These structures rely on the representation of the solutions as a sequence of items, and on movements based on swapping items and reversing subsequences of items. These neighborhood spaces are explored within a variable neighborhood descent procedure. The authors report on computational experiments for real instances of the furniture industry. The number of bins and corresponding waste decreased with their approach when compared with the results achieved by the companies.

The paper is organized as follows. In Section 2, we describe the characteristics of the general LNP addressed in this paper. In Section 3, we introduce the geometrical issues related to the problem and the strategies used to overcome these issues. In Section 4, we describe the constructive heuristic used to generate the initial solution and to complete the partial layouts within the local search phases. In Section 5, we describe the different components of our algorithm including the movements and the corresponding neighborhood structures, and we describe how these components are integrated in our VNS algorithm. In Section 6, we report on an extensive set of computational experiments conducted on real instances from our real case study. Some final conclusions are drawn in Section 7.

#### 2. The Leather Nesting Problem

The LNP is a two-dimensional cutting stock problem that consists in finding the best way to cut a set of irregular pieces from a natural leather hide. The hides and the pieces have both an irregular contour. Furthermore, they may have holes and regions with different quality grades. For the hides, the holes (as other defects), and the quality, zones are a consequence of the nature of the product. On the contrary, a quality zone in a piece defines a minimum quality requirement set by the client. It stipulates that the corresponding part of the piece must be cut from a region of the hide that has at least this level of quality.

Figure 1 shows a leather hide with holes (in white) and different quality zones (in black, red, green, and blue). The regions in grey at the border of the hide are nonusable areas. They are not defects in the strict sense of the word, but because their quality is too low, they are not used to produce any piece. In our specific application, the quality zones are divided into four groups denoted by A, B, C, and D. The zones A correspond to the best-quality regions of the hides. The quality decreases from A to D, with D being the worst quality level. The zones D of the hides are typically used to cut the parts of the pieces that are not visible in the car seats. In the forthcoming figures, we will depict the zones A, B, C, and D of the hides in black, red, green, and blue, respectively. The holes will be represented in white.

The quality zones of the pieces are defined using a similar scheme with four different quality grades. In our case, the pieces are the parts of a car seat. The quality zone of a piece can only be cut from a region of the hide whose quality grade is similar or higher. For example, a zone C of a piece will be cut only from a region A, B, or C of a hide. Note that in the real application considered in this paper the pieces may be highly irregular. They may have different concavities, and their area may differ significantly.

A feasible layout is an arrangement of the pieces on the hide such that the pieces are all placed within the boundaries of the hide (its usable part) without overlapping with each other, and such that the quality requirements of the pieces are fulfilled. Note that while the defects on the hides do not increase the complexity of the problem compared to other nesting problems, the existence of quality zones really do. A defect on the hide (including the holes) can be treated as a piece already placed on this region of the hide. However, the same does not apply to the quality zones. While a quality zone of a hide cannot overlap with some parts of the pieces, it may overlap with others as long as its corresponding quality level is the same or better than the quality requirement of these parts of the pieces.

The most common criterion used to evaluate the quality of a layout is the total material usage. In the automotive industry, other criteria are used to improve the efficiency of the cutting processes [1]. For instance, when a production order requires more than a single hide, an important issue is to ensure that the total usable area that remains on the last hide after the final cutting operation is maximized. Indeed, the parts of the last hide that are too small are discarded, while the others are used as an input for subsequent orders. Hence, the criterion that applies when generating the layout for the last hide is no more the material usage, but instead the total usable area of this hide. In this paper, we will focus on the generation of efficient layouts on a single hide, and hence, we will use the maximization of the material usage as the optimization criterion.

#### 3. Geometric Issues

The hides, the pieces, and their quality zones, holes, and defects are all represented using polygons. These polygons are generated after a scanning process for the hides, and using a CAD system for the pieces of the car seats. To improve the efficiency of our approach, we simplified first the representation of the hides and pieces by generating approximations of the corresponding shapes using a procedure described in [1]. The outer border of the hides is represented using an inner approximation obtained by removing sequentially the vertices whose distance from its immediate predecessor is smaller than a given (small) parameter. A vertex is removed only if the resulting polygon is in fact an inner approximation of the original polygon. On the contrary, the holes and the quality zones of the hides are replaced by an outer approximation using a similar scheme. All the polygons representing the pieces are replaced by outer approximations using again a similar scheme. This procedure ensures that every layout that is feasible for the approximated hide will remain feasible for the original hide. It is important to note that the number of vertices of the resulting polygons is still much larger than the number of vertices of the polygons used in [3]. The number of vertices used to represent the hides and the pieces decreased, respectively, to 300 and 80 for the instances used in our computational experiments. In [3], the number of vertices per hide and per piece was, respectively, equal to 100 and 70 before their simplifications.

In our approach, we resorted to no-fit polygons (NFPs) to compute the relative position between two pieces and between the pieces and the quality zones of the hide. To ensure that a piece is placed within the boundaries of the hide, we used inner-fit polygons (IFPs). Both the no-fit and the inner-fit polygons are computed using the Minkowski sums [14, 15]. In the particular case of the LNP, testing whether a piece is placed correctly on the hide is more complex than in other nesting problems because of the quality zones. The quality zones of a hide cannot be treated as pieces already placed on its surface (just as its holes and defects). Indeed, while some parts of the pieces will not be allowed to overlap with the zones of the hide whose quality is lower, these parts will be allowed to overlap with other zones that meet the corresponding quality requirements. Hence, any standard method used to avoid that two pieces overlap must be adapted in the case of the LNP.

The no-fit and inner-fit polygons of two polygons A and B will be denoted by and , respectively. The outer border of a no-fit polygon is the path followed by a reference point of B when B slides around A without ever overlapping with A but such that B is always in contact with A. The inner-fit polygon is defined in a similar way except that the polygon B must always remain inside A. The NFPs are used to know if two polygons overlap or not, while the IFPs are used to know if a polygon is completely contained within another one. Indeed, if the reference point of B is inside , then A and B overlap. If it lies at the boundary of A, then B touches A without overlapping with it. Finally, if the reference point of B is outside , then A and B overlap. Similarly, if the reference point of B is inside , then B is completely inside A. If it is at the border of , then B remains inside A and it touches its border.

The NFPs between all the pairs of pieces have to be computed, together will all the IFPs between each piece and the usable area of the hide, and all the NFPs between each quality zone of the pieces and the regions of the hide with a lower quality grade. The IFPs of a given piece and the hide and the NFPs of this piece and the quality zones of the hide describe the set of feasible placement positions of the piece inside the hide. Note that there can be more than one (unconnected) IFP describing the feasible placement positions inside a hide. The constructive heuristic used in our algorithm takes advantage of the information provided by these polygons.

#### 4. Generating Feasible Layouts: A Constructive Heuristic

To generate feasible layouts, we use a constructive heuristic that follows the same steps as those described in [1]. The approach can be divided as follows:(a)definition of groups of pieces,(b)selection of the next piece to place on the hide from a given group of pieces,(c)selection of a region of the hide where to place the piece,(d)evaluation of the placement positions in this region and selection of one of these positions.

The steps (b) to (d) are repeated until no more pieces can be placed on the hide, or until there are no more pieces available. The heuristic is used many times in the course of the algorithm, and hence it should remain fast however, without neglecting the quality of the layouts. The strategies used in the steps (b) to (d) were chosen with this objective in mind.

Let be the total number of different pieces, and let , with , denote the demand associated to the piece . The step (a) consists in grouping the pieces according to a given criterion. Let be the number of groups, and let denote the set of pieces that belong to the group . For ease of presentation, we will assume that a reindexing of the pieces is applied after the pieces have been assigned to a group. Hence, denoting by the total number of pieces in the group , we will have . The demand of the piece in group will be denoted by .

The pieces are assigned to the groups according to the value of their areas. A piece is assigned to a group if its area is such that with and representing, respectively, the area of the smallest piece and the area of the largest piece and being the total number of groups that are allowed. Note that for , the previous interval is closed on the right. Group corresponds to the pieces with the smallest areas. The areas of the pieces increase with the index of the groups, and hence, the pieces with the largest values belong to the group .

In the step (b) of the heuristic, we start by choosing the group of pieces from which the next piece will be selected. The groups are chosen by decreasing order of their index. We select the first group that has pieces to be placed and such that at least one of these pieces still fits on the hide. The selection of the next piece and its rotation is based on the index of the chosen group and on the characteristics of the IFPs of the pieces and the hide. Let be the index of the chosen group. If , we choose the piece with the smallest IFP, while if , the piece that is selected is the one that has the largest IFP. The reference point of the selected piece is then placed within the IFP that determined the selection of the piece.

The principle is to use the information provided by the IFPs as an indicator of the expectable quality of the fitness of the pieces in the corresponding regions of the hide. We recall that there can be more than one IFP representing the feasible placement positions of a given piece inside the hide. If one of the IFPs of a small piece is a polygon with a small area, then one may expect that the fitness of this piece in the corresponding region of the hide will be good. For the largest pieces, the objective is to place them in regions where the impact on the placement of the next pieces is lower.

Once a piece and a placement region have been selected, we choose the final placement position of the piece within this region. We use a simple criterion to evaluate each placement position. The position that is selected is the point in the border of the IFP that is nearer from the border of the hide. Here, the goal is to fill the hide preferentially from the border to the center.

#### 5. A Variable Neighborhood Search Algorithm

##### 5.1. Overview

The VNS framework was introduced by Mladenović and Hansen [8] and applied successfully to many optimization problems (see [16] for a recent survey). This framework leads to a metaheuristic that drives the search into different neighborhoods in a systematic way so as to improve the incumbent solution. In this paper, we use this framework to explore alternative neighborhoods for the general LNP. Our approach relies on the constructive heuristic introduced above and on a set of neighborhoods that are briefly described below. The details of the neighborhood structures will be given in the next section.

The initial layout is obtained by applying the constructive heuristic defined above. This heuristic determines the sequence by which the pieces are placed and the exact position of each piece on the hide. A layout is defined by the set of pieces that are placed on the hide together with their rotation and position. As an alternative, we can represent a layout as a sequence of pieces combined with the iterative application of the steps (c) and (d) of our constructive heuristic. By iterative, we mean that the pieces are chosen and placed on the hide one after the other following the order defined by the sequence and that the process repeats until there are no more pieces in the sequence. We will use this latter representation to describe our neighborhood structures and associated movements.

We propose four types of distinct movements defined from a sequence of pieces: exchanging a piece by another that is not in the sequence, removing all the pieces from this piece forward and filling the hide using the constructive heuristic; exchanging a piece by another that is not in the sequence, keeping the rest of the sequence unchanged, placing the corresponding pieces using iteratively the steps (c) and (d) of the constructive heuristic and filling the rest of the hide by applying the complete heuristic; swapping two pieces and in the sequence if can be placed on the hide with a better fitness than following the steps (c) and (d) of the heuristic placing all the pieces of the sequence using the steps (c) and (d) of the heuristic and filling the rest of the hide with the complete heuristic; removing a piece of the sequence, placing all the pieces of the resulting sequence by applying iteratively the steps (c) and (d) of the heuristic, and filling the rest of the hide with the complete heuristic.

The piece that is exchanged, swapped with another piece, or removed from the sequence is chosen from a set of candidate pieces with the worst fitness. The quality of the fitness of a piece is evaluated by computing the areas of the polygons resulting from the intersection of an offset of the piece with the outer part of the hide and with the current layout and by dividing this total area by the area of the offset. The largest will be this value, the better will be the fitness. Ideally, when this value is equal to 1, the whole border of the piece touches the border of the hide or the border of the current layout. Figure 2 illustrates the process.

For ease of presentation, we will always denote in this paper the piece that is to be exchanged, swapped with another piece, or removed from the sequence by , and the set of candidate pieces from which is selected by . Similarly, the set of pieces that are candidate to substitute in the sequence will be denoted by , and the piece that is selected from will be denoted by . Furthermore, we will denote by a sequence of pieces, and we will define it as a vector of tuples as follows: with denoting the group () and the piece () that is in the position in the sequence. The vector containing the values of the corresponding fitness of these pieces will be denoted by and defined as follows: with , .

A key characteristic of our approach is that the neighbors of a solution (except eventually the one defined through the fourth type of movement described above) are layouts in which the fitness of the piece is always better than the fitness of the piece in . Furthermore, the pieces will not be chosen from any part of the sequence, but from a restricted subpart of the sequence. These subparts will be defined based on the position of the pieces in the sequence. However, instead of using the indexes of the tuples in to denote these positions, we use the percentage of material usage achieved right after a piece is placed on the hide. For example, we will choose the pieces that are in a window of 50% to 70% of material usage meaning that only the pieces that lead to a material usage in this interval right after being placed on the hide will be chosen. We will denote by the vector of values of the material usage achieved after placing each piece of the sequence . We will have with , . The vector will represent the evolution of the material usage as the pieces are placed on the hide. To identify a subpart of the sequence, we will use a lower and an upper bound for the value of the material usage. We will denote these values by and , respectively. For the example given above, we have and .

Specific neighborhoods are defined from the general movements referred to above. The neighborhoods further depend on the following set of parameters:(i)the number of pieces that are candidate to be exchanged, swapped with another piece, or removed, that is, (we will denote this parameter by );(ii)the number of pieces that are candidate to substitute the piece , that is, (we will denote this parameter by );(iii)the subpart of the sequence from which the pieces of are chosen, that is, with Note that when , the piece that is exchanged, swapped, or removed is the piece with the worst fitness in the given subsequence. Similarly, when , the piece is replaced in the sequence by the piece that leads to the best fitness, either from the sequence or not. It is possible to define various neighborhoods by setting these parameters to different values. The details of these neighborhoods will be given in the next section.

To explore these neighborhoods, we use the standard VNS framework. At each iteration, the procedure tries to improve the incumbent by looking to local optima within each neighborhood. Driving the search to a different neighborhood may improve the solutions obtained through the exploration of the previous neighborhoods since the local optima in two different neighborhoods are not necessarily the same. In this paper, we propose an approach based on VNS that explores systematically the neighborhoods obtained through the general movements described above and by setting the above parameters to some specific values.

##### 5.2. Movements and Neighborhood Structures

We begin by describing in detail the procedures that define each one of the four movements referred to above. These movements will be denoted by , , , and , respectively.

*(A) Movement *

(1)Select the piece :Let and ;Let be the set of the pieces from the subsequence with the smallest fitness in ;Choose a piece from ;(2)Select the piece :Let be the set of pieces that are not in the sequence ;Let be the set of the pieces of with the best fitness when placed on the hide right after following the steps (c) and (d) of the heuristic;Choose a piece from ;(3)Update the sequence :Let be the group of the piece and the index of in , and let be the index of in corresponding to the chosen piece ;Let be the group of the piece and the index of in ;Remove the subsequence from ;(4)Place the pieces of the sequence on the hide following the steps (c) and (d) of the constructive heuristic (if a piece of the sequence cannot be placed on the hide, update by removing this piece from the sequence);(5)Fill the hide (and complete the sequence ) using the constructive heuristic.
Note that if , then the subsequence is an empty vector.The movement differs from only on the steps (3) and (4). As happens in , the piece is replaced in the current sequence by another () with a better fitness and that is not in , while the rest of the sequence from forward remains unchanged. The pieces of the new sequence are placed on the hide using the steps (c) and (d) of the constructive heuristic. When all these pieces have been placed (or discarded eventually if they do not fit on the hide), the complete heuristic is used (eventually) to fill the empty spaces that may remain.

*(B) Movement *

(1)Select the piece : similar to step (1) of ;(2)Select the piece : similar to step (2) of ;(3)Update the sequence :Let be the group of the piece and the index of in , and let be the index of in corresponding to the chosen piece ;Let be the group of the piece and the index of in ;Replace in the position of the sequence by , that is,(4)Place the pieces of the new sequence on the hide following the steps (c) and (d) of the constructive heuristic (if a piece of the sequence cannot be placed on the hide, update by removing this piece from the sequence);(5)Fill the hide (and complete the sequence ) using the constructive heuristic.In the movement , the piece is selected from the subsequence of starting from and up to the end of the sequence. The pieces and are swapped in the sequence , and the pieces of the resulting sequence are placed using the steps (c) and (d) of the heuristic. Again, the constructive heuristic is used at the end of the process to fill the empty spaces.

*(C) Movement *

(1)Select the piece : similar to step (1) of ;(2)Select the piece :Let be the set of the pieces of from the chosen piece up to the end of with the best fitness when placed on the hide right after following the steps(c) and (d) of the heuristic;Choose a piece from ;(3)Update the sequence :Let be the group of the piece and the index of in , and let be the index of in corresponding to the chosen piece ;Let be the group of the piece and the index of in , and let be the index of in corresponding to the chosen piece ;Swap and in , that is,(4)Place the pieces of the new sequence on the hide following the steps (c) and (d) of the constructive heuristic (if a piece of the sequence cannot be placed on the hide, update by removing this piece from the sequence);(5)Fill the hide (and complete the sequence ) using the constructive heuristic.
Here, we assume that , otherwise it is clear that will not exist.The fourth movement consists in removing the piece from the sequence and placing the remaining pieces from this piece forward using the constructive heuristic.

*(D) Movement *

(1)Select the piece : similar to step (1) of ;(2)Update the sequence :Let be the group of the piece and the index of in , and let be the index of in corresponding to the chosen piece ;Remove from , that is, ;(3)Place the pieces of the new sequence on the hide following the steps (c) and (d) of the constructive heuristic (if a piece of the sequence cannot be placed on the hide, update by removing this piece from the sequence);(4)Fill the hide (and complete the sequence ) using the constructive heuristic.

The objective of these movements is to explore different neighborhoods of the current solution that are all composed by solutions obtained from by removing one of its pieces with a bad fitness, and replacing it (eventually) by another piece with a better fitness. They differ essentially from each other in the way the piece is treated. Note that while in , , and , the piece is replaced by another that leads to a better fitness (by definition), there is no guarantee that the piece in will improve the fitness of the piece .

The movement is the most computationally expensive among the four movements, since it forces to repeat the complete heuristic right after has been exchanged. In the other movements, the step (b) of the heuristic consisting in the selection of the next piece to place is not applied, while the pieces of the new sequence are being placed. The heuristic is applied in its entirety only after all these pieces have been placed on the hide. Typically, the number of iterations at this stage is small. The movements and vary essentially on the source from which is selected, either from the sequence or not. The movement is the simplest movement. The neighborhoods of a solution defined through are composed by solutions. This movement is proposed as a fast strategy that aims at removing a piece with a bad fitness, letting the heuristic complete the layout starting from its immediate successor in .

Each movement will be associated to a specific neighborhood. We will denote the neighborhoods of a solution obtained through by , . The neighborhoods , , and of a solution consists in the solutions generated by taking every piece , and for each one these pieces by replacing (or swapping) it by every piece , and then by applying the steps (3) to (5) of , and , respectively. The neighborhood of a solution is composed by all the solutions obtained from by removing each one of the pieces of , and by applying the steps (2) to (4) of . These neighborhoods depend on different parameters, namely, and that determine the subpart of the sequence from which the pieces of are selected, and the parameters and that determine the size of the sets and , respectively. Specific neighborhoods can be obtained from these general definitions by setting these parameters to given values. To explore in a systematic way the neighborhoods induced by these general definitions, we developed an algorithm based on the VNS framework described in [8]. The details of this approach are given in the following section.

##### 5.3. Variable Neighborhood Search

The VNS metaheuristic defines a general framework for optimization based on the systematic exploration of different neighborhoods. It is a local search metaheuristic that allows for the escape from local optima by switching among the neighborhoods. It relies on the simple observation that a local optimum in a given neighborhood may not remain optimal in another neighborhood. Different variants are defined from this general framework, such as the variable neighborhood descent algorithm and the variable neighborhood decomposition search procedure. In [16], Hansen et al. reviewed different possible implementations of the VNS metaheuristic. These schemes are general enough to allow for different practical implementations. In this paper, we describe an implementation of the VNS metaheuristic based on the basic approach. To improve the efficiency of our approach, we adapted some components of the basic scheme, essentially in the local search phase. A computational study was performed to tune the resulting algorithm, to identify promising sets of parameters and to evaluate the impact of each neighborhood in the quality of the solutions. The results of this study are provided in Section 6.

Let denote the value of a solution . The general steps of the basic VNS are described in Algorithm 1 for a minimization problem.

The output of this algorithm is the incumbent solution . The procedure findInitialSolution generates an initial solution for the problem which becomes also the first incumbent solution. At each iteration, a solution is generated randomly from the neighborhood of through the shaking procedure. A local optimum is then sought in this neighborhood space through the local search procedure localSearch. If the value of this local optimum is better than the value of the incumbent solution, the incumbent is updated and the search is resumed starting from the first neighborhood structure and with this new incumbent. If it is worse or equal than the value of the incumbent solution, the local search procedure is then applied on the neighborhood . The process repeats until the stopping criterion is finally met. Note that this general definition allows for different implementations. For instance, the strategy used to switch between two neighborhood structures may be different from the sequential scheme followed in the basic VNS described above. Similarly, the criterion used to accept a local optimum and move to the corresponding solution may not be based (only) on the value of this local optimum.

Our implementation of the basic VNS for the general LNP is described next. The neighborhood structures refer to the structures introduced in the previous section. Furthermore, we denote by the pair of lower and upper bounds for the value of the material usage associated to the neighborhood , which define the subpart of the sequence from which the pieces of are selected. The parameters and will be used to denote the general parameters and introduced in Section 5.1 and associated to the neighborhood defined from . For each , , let denote the number of parameter sets that are considered, each one consisting on given values for the parameters , , and , . Each one of these parameter sets defines a specific neighborhood structure within one of the general neighborhoods , (whose precise definition depends on this set of parameters). In practice, neighborhood structures are effectively considered in our algorithm. Let . For the sake of clarity, in our description of our VNS algorithm given in Algorithm 2, we will index these neighborhoods sequentially using an index such that .

The initial layout is generated using the constructive heuristic described in Section 4. The neighborhood structures used in the shaking phase and in the local search procedure are the same. In our implementation, we used a first improvement local search procedure. To further accelerate this procedure, we restrict the search to a subpart of the neighborhood of the solution . Indeed, whenever (the size of the set of pieces to exchange, swap with others, or remove) is greater than 1, we explore only the neighbors obtained by choosing randomly one piece of , and by taking all the pieces of in the case of , , and . Note that to generate a neighboring solution, we have to use the constructive heuristic. The heuristic is computationally expensive, namely, because of the computation of the NFPs and IFPs, even if, in practice, the heuristic is applied only on the subpart of the sequence that was changed, since the head of the sequence that was kept unchanged produces exactly the same partial layout. Finally, the execution of the algorithm is stopped after a given time limit has been reached.

#### 6. Computational Experiments

Two sets of experiments were conducted: one to compare possible strategies for our VNS algorithm and to tune the parameters of the algorithm and another to evaluate the performance of the best approach that emerged from the tuning experiments on a large set of real instances. In this section, we report on the results of these experiments. The instances (the hides and the pieces) came from the company that is used as a case study in this paper, and in particular from two car models whose seats are produced by this company. We used the data corresponding to one of the seats for each car model. The total number of different pieces of the first car model was equal to 23, while 22 different pieces were used for the second car model. The pieces can be rotated, but since each rotation implies the computation of a new set of NFPs and IFPs, we restricted the rotations to multiples of 45 degrees.

The experiments were conducted on a PC with an Intel Core i3 CPU with 2.27 GHz and 4 GB of RAM. The algorithms were coded in C++, and the computational geometry routines were implemented using CGAL 3.7 (Computational Geometry Algorithms Library).

##### 6.1. Tuning the VNS Algorithm

The tuning experiments focus on the different aspects and parameters of our VNS algorithm. The objectives of these experiments are summarized next:(a)evaluating the impact of each neighborhood on the quality of the layouts that are generated;(b)comparing different strategies for setting the intervals of material usage from which the pieces of are selected;(c)evaluating alternative values for the parameters , that is, the size of the sets from which the pieces that are exchanged, swapped with another, or removed are selected;(d)evaluating alternative values for the parameters , that is, the size of the set of pieces that will be inserted in the sequence;(e)comparing the quality of the layout when the neighborhoods are explored by different orders.

For this purpose, we used 24 instances from the two car models referred to above. From the first car model, we generated 4 production orders with different subsets of pieces from the global set of 23 pieces. The number of different pieces for each order was, respectively, equal to 8, 12, 15, and 23. The demand for each piece was set equal to 100. For each order, we repeated the algorithm on 3 different leather hides. In practice, that led to 12 different instances of the LNP. From the second car model, we generated 12 different orders in the same way. The number of different pieces varied from 5 to 22 (). Again, the demand for each piece was equal to 100. We used the same hide for each production order. In all the cases, the production orders were larger than the hide. The pieces of the production orders completely filled the hide, and there were always pieces that remained to be cut. Our goal was to evaluate the capacity of the VNS algorithm to find good quality layouts, that is, with a high material usage on each single hide. The limit on the total computing time was set to 600 s. In the company, the pieces of a production order are placed on the hide by two operators. The average time used by these human nesters is typically around 600 s. In the subsequent tables, the instances related to the first car model are identified by the index of the corresponding production order and the index of the hide as follows: . The instances associated to the second car model are identified by the index of the corresponding production order. The column . in these tables identifies the problem instance.

In Table 1, we give the results obtained when different neighborhood structures are used in the VNS algorithm. The objective is to evaluate whether the best layouts tend to be found by exploring a particular neighborhood, or if all the neighborhoods contribute in the same way to the quality of the final layouts. Nine strategies were explored: using all the neighborhood structures with , and , ; using the neighborhood structure with and (that consists in exchanging, swapping, or removing the piece with the worst fitness within a given interval defined by the parameters and ), and similarly using only one of the neighborhoods with , with , with , with or with , with or with . For all the cases except the first, we assume that , , that is, only one specific neighborhood structure was used for each one of these cases. In all these configurations, the other parameters of the neighborhoods were set as follows: and , , with being the percentage of material usage achieved in the initial layout. In the case where all the neighborhoods were used, we explored them by increasing value of their indexes. Note that we considered explicitly the neighborhood structures with , , because we observed that the best results were usually obtained when this neighborhood was included in the search.

The tests were repeated three times for each instance and configuration. A total of 648 runs were performed (4.5 days of total computing time). In Table 1, we indicate the number of times each configuration provided the best layouts for the corresponding instance. These results show that the best layouts are more often generated when all the neighborhoods are used. Indeed, 30 of the 72 best layouts are found with this configuration, while the second-best strategy ( with ) reaches the best layout only in 9 cases.

The best strategies identified at some step of our tuning experiments are always used in the following tests. For instance, the strategy that consists in using all the neighborhoods were used in the next experiments.

The second set of tuning experiments was conducted to compare some alternative strategies for setting the values of the lower and upper bounds that are used on the material usage to define the subsequences from which the pieces of are selected. We analyzed five strategies. Broadly speaking, we analyzed whether the best results are achieved by using a single or more than one interval for each general neighborhood structure , , and we tried to identify where this interval should be located. The parameters that characterize the five approaches are given next:(1), , ;, , ;(2), , ;, , ;(3), , ;, , ;(4), , ;, , ;, , ;, , ;(5), , , ;, , ;, , ;, , .

The first strategy consists in using a single neighborhood for each general structure , , and in selecting the pieces of the set preferentially from the tail of the sequence, while in the second strategy, the pieces of are chosen from the other part of the sequence. The third strategy encompasses both the two previous strategies. It consists in selecting the pieces of from almost all the sequence except its very beginning. In the fourth and fifth strategies, we explore the use of two neighborhoods for each general neighborhood structure , , , based on different intervals . The fourth strategy combines the intervals used in the first and second strategy. In the fifth strategy, we try to explore neighborhoods where the head of the sequences is kept unchanged. Indeed, the pieces that are at the head of the sequence are placed first, and they lead usually to a good fitness when compared to the other pieces of the sequence.

The tests were executed only once for each instance and configuration. A total of 120 runs were performed (0.83 days of total computing time). The results of these experiments are given in Table 2. Again, we report on the number of times that a given strategy led to the best solution for each instance. For the first car model, the results are nearly the same for all the strategies, while for the second car model, the second strategy clearly dominates the other. When the pieces of are allowed to be selected from the first part of the sequence (as happens in the second strategy), the layouts that are in the neighborhood of the current solution may be quite different from , since a large part of the layout may have to be rebuilt using the constructive heuristic if the piece that is selected is at the very beginning of the sequence. That allows for the exploration of more diverse solutions, and thus it increases the possibilities of finding a layout with an improved material usage.

The third set of tuning experiments focus on the parameters of the neighborhood structures. The corresponding results are reported in Table 3. For each general neighborhood structure, we defined two specific structures, that is, , . The structures differ in the value of the parameter . We used and in one case, and and in the other, for . The parameters and were set equal to 3, while the intervals , , were selected according to the second strategy described above. In summary, we used two different values for the parameter , namely, and , . The objective was to analyze whether an increase in the value of this parameter could lead to better layouts. The tests were repeated three times for each instance and configuration. A total of 144 runs were performed (one day of computing time). We can observe from Table 3 that the quality of layouts decreases as we increase the value of this parameter for both the car models.

To evaluate the impact of the parameter, we conducted different experiments using the neighborhood structures corresponding to the following configurations:(1), , ;, , ;(2), , , ;, , ;(3), , , ;, , .

The three configurations differ exclusively on the value of the parameters. Here, our objective was to analyze the impact on the quality of the layouts when one increases or decreases the value of this parameter. The results are reported in Table 4. A total of 216 runs were performed (1.5 days of computing time). From these experiments, we can conclude that the best layouts are achieved when . The quality of the solutions gets worse whether we increase or decrease the value of this parameter for both the car models used in the experiments. Increasing the value of the parameters increases the number of neighboring solutions. However, from our experiments this larger variety of solutions does not reflect upon the quality of the final layouts.

Our last set of tuning experiments were conducted to evaluate the impact of the order by which the neighborhoods are explored on the quality of the final layouts. For this purpose, we used the best set of parameters identified in the previous experiments, and we tried 12 different sequences for the search, namely,(1), , , and ;(2), , , and ;(3), , , and ;(4), , , and ;(5), , , and ;(6), , , and ;(7), , , and ;(8), , , and ;(9), , , and ;(10), , , and ;(11), , , and ;(12), , , and .

The tests were performed only once for each instance and each configuration. A total of 288 runs were performed (2 days of computing time). The results are reported in Table 5. From these results, we can observe that while some sequences never led to the best layouts (configuration 9 and 11), none of the other sequences clearly dominated all the others. The best results are obtained with the first and seventh sequences, which both generate the best layout for four instances.

##### 6.2. Computational Results

In this section, we report on the results obtained with our VNS algorithm on a large set of real instances. For these experiments, we used the best strategies and parameters identified from the previous tuning experiments. These configurations are summarized next:(i)Use all the neighborhood structures;(ii)Explore the neighborhoods in the following order:;(iii), :(a), , ;(b), , .

We generated 22 production orders using the set of pieces associated to the first car model in the same way as in the tuning experiments. The number of different pieces varies from 5 to 23. Each production order is cut from three different hides, and hence, we have 66 instances defined from this car model. Forty-one production orders were generated using the pieces of the second car model. Since only one hide is used for each production order, in this case, we have 41 different instances derived from the second car model. In Table 6, we describe the characteristics of the production orders. In summary, our set of instances is composed of 107 different problem instances. As in the tuning experiments, we used a time limit of 600 s. For each instance, the tests were repeated four times. Hence, 428 runs were performed which took almost 3 days of computing time.

The results for the first car model are reported in Tables 7 and 8. Those for the second car model are given in Table 9. The column . in these tables identifies the problem instance. For the first car model, we use the same notation to identify the instances as in the tables for the tuning experiments, namely, , where is the index of the production order and the index of the hide. The tables present the results obtained with the constructive heuristic used to generate the first layout, and the results achieved by the VNS algorithm after 200 s, 400 s, and 600 s of computing time. The column indicates the number of pieces placed on the hide. Column gives the percentage of material usage achieved by the corresponding layout. Column is used in the part associated to the constructive heuristic to indicate the time (in seconds) needed by the heuristic to generate the initial solution. The line . gives the average values for the group of instances that is above.

On average, the VNS algorithm is always able to improve the results obtained by the constructive heuristic. In Table 7, the best improvement is achieved for the instance with an increase of 10,26% in the total material usage. The VNS algorithm improves the initial solution quickly. Indeed, after 200 s of computation, the algorithm was already able to find a layout that is better than the initial solution. Furthermore, the solution is improved both after 400 s and 600 s of computation. These improvements tend to be less significant for the instances whose results are given in Table 8. On average, the results are always better than the initial solution, but the VNS algorithm takes more time to find a solution that is clearly better than this first solution. In this table, the best improvement is achieved for the instance with an increase of 6,23%. When the variety of pieces is larger, the constructive heuristic is usually able to find layouts that have already a high material usage. In these cases, the space for improvements is smaller, but the VNS algorithm is still able to improve the initial layout. For the hardest instances, those for which the constructive heuristic cannot find a good quality layout, the VNS algorithm appears to work as an effective improvement procedure. Not surprisingly, the time needed by the constructive heuristic to find an initial layout increases with , the number of different pieces in the instance. This is due in part to the necessity of recomputing the NFPs and IFPs for each piece right after a piece has been placed on the hide. Note that the material usage achieved in the final layouts are comparable to the results obtained by human nesters. Furthermore, these results are achieved within the same time limit as that needed by two human nesters. One operator would need around 1200 s (twice our time limit) to achieve comparable results.

Similar results are obtained for the instances derived from the second car model. The VNS algorithm was always able to improve the initial solution except for two instances (35 and 40). In many cases, a better layout is found right after 200 s of computation. The best improvement is obtained for the instance 2 with an increase of 5,46%. Even in the instance with the largest variety of pieces (instance 41) the VNS algorithm was able to improve by 2,02% the material usage achieved in the first layout.

#### 7. Conclusions

In this paper, we proposed the first local search metaheuristic for the general LNP using the real case study of a company that operates in the automotive sector. We described a constructive heuristic to generate feasible layouts, and we introduced the details of the different neighborhood structures that were explored. These structures rely on the sequence by which the pieces are placed on the hide and on the quality of the fitness of each piece. The fitness of a piece is measured by computing the intersection of an offset of the piece with the border of the hide and the border of the layout. To explore the different neighborhood spaces, we developed a VNS algorithm that searches for local optima in a systematic way on each one of these spaces. Our approaches were tested on a large set of real instances. The experiments show that the VNS algorithm improves the solutions provided by the constructive heuristic. Furthermore, the quality of the final layouts that are generated by this algorithm is competitive with the results achieved by human nesters.

#### Acknowledgments

This work was partially supported by the Algoritmi Research Center of the University of Minho for C. Alves and J. V. de Carvalho, by the Portuguese Science and Technology Foundation through the Doctoral Grant SFRH/BDE/15650/2007 for P. Brás and through the Research Grant UMINHO/BII/183/2009 for T. Pinto. It was developed in the Systems Engineering, Optimization and Operations Research Group.

#### References

- C. Alves, P. Brás, J. Valério de Carvalho, and T. Pinto, “New constructive algorithms for leather nesting in the automotive industry,”
*Computers and Operations Research*, vol. 39, no. 7, pp. 1487–1505, 2012. View at Publisher · View at Google Scholar - G. Wäscher, H. Haußner, and H. Schumann, “An improved typology of cutting and packing problems,”
*European Journal of Operational Research*, vol. 183, no. 3, pp. 1109–1130, 2007. View at Publisher · View at Google Scholar · View at Scopus - J. Heistermann and T. Lengauer, “The nesting problem in the leather manufacturing industry,”
*Annals of Operations Research*, vol. 57, no. 1, pp. 147–173, 1995. View at Publisher · View at Google Scholar · View at Scopus - A. Crispin, P. Clay, G. Taylor, T. Bayes, and D. Reedman, “Genetic algorithm coding methods for leather nesting,”
*Applied Intelligence*, vol. 23, no. 1, pp. 9–20, 2005. View at Publisher · View at Google Scholar · View at Scopus - Z. Yuping, J. Shouwei, and Z. Chunli, “A very fast simulated re-annealing algorithm for the leather nesting problem,”
*International Journal of Advanced Manufacturing Technology*, vol. 25, no. 11-12, pp. 1113–1118, 2005. View at Publisher · View at Google Scholar · View at Scopus - W. C. Lee, H. Ma, and B. W. Cheng, “A heuristic for nesting problems of irregular shapes,”
*Computer Aided Design*, vol. 40, no. 5, pp. 625–633, 2008. View at Publisher · View at Google Scholar · View at Scopus - Z. Yuping and Y. Caijun, “A generic approach for leather nesting,” in
*Proceedings of the 5th International Conference on Natural Computation*, vol. 5, pp. 303–317, August 2009. View at Publisher · View at Google Scholar · View at Scopus - N. Mladenović and P. Hansen, “Variable neighborhood search,”
*Computers and Operations Research*, vol. 24, no. 11, pp. 1097–1100, 1997. View at Google Scholar · View at Scopus - J. Beltran, J. Calderon, R. Cabrera, J. Perez, and J. Moreno-Vega, “GRASP/VNS hybrid for the
strip packing problem,” in
*Proceedings of the 1st International Workshop on Hybrid Metaheuristics*, pp. 79–90, 2004. - F. Parreño, R. Alvarez-Valdes, J. F. Oliveira, and J. M. Tamarit, “Neighborhood structures for the container loading problem: a VNS implementation,”
*Journal of Heuristics*, vol. 16, no. 1, pp. 1–22, 2010. View at Publisher · View at Google Scholar - F. Alvelos, T. M. Chan, P. Vilaça, T. Gomes, E. Silva, and J. M. Valério De Carvalho, “Sequence based heuristics for two-dimensional bin packing problems,”
*Engineering Optimization*, vol. 41, no. 8, pp. 773–791, 2009. View at Publisher · View at Google Scholar · View at Scopus - E. Hopper and B. C. H. Turton, “Empirical investigation of meta-heuristic and heuristic algorithms for a 2D packing problem,”
*European Journal of Operational Research*, vol. 128, no. 1, pp. 34–57, 2001. View at Publisher · View at Google Scholar · View at Scopus - F. Parreño, R. Alvarez-Valdes, J. M. Tamarit, and J. F. Oliveira, “A maximal-space algorithm for the container loading problem,”
*INFORMS Journal on Computing*, vol. 20, no. 3, pp. 413–422, 2008. View at Publisher · View at Google Scholar · View at Scopus - P. K. Ghosh, “An algebra of polygons through the notion of negative shapes,”
*CVGIP: Image Understanding*, vol. 54, no. 1, pp. 119–144, 1991. View at Google Scholar · View at Scopus - J. A. Bennell, K. A. Dowsland, and W. B. Dowsland, “The irregular cutting-stock problem—a new procedure for deriving the no-fit polygon,”
*Computers and Operations Research*, vol. 28, no. 3, pp. 271–287, 2000. View at Publisher · View at Google Scholar · View at Scopus - P. Hansen, N. Mladenović, and J. Pérez, “Variable neighbourhood search: methods and applications,”
*Annals of Operations Research*, vol. 175, no. 1, pp. 367–407, 2010. View at Publisher · View at Google Scholar · View at Scopus