A hybrid evolutionary algorithm for the two-dimensional packing problem

This paper presents a hybrid evolutionary algorithm for the two-dimensional non-guillotine packing problem. The problem consists of packing many rectangular pieces into a single rectangular sheet in order to maximize the total area of the pieces packed. Moreover, there is a constraint on the maximum number of times that a piece may be used in a packing pattern. The set of packing patterns is processed by an evolutionary algorithm. Three mutation operators and two types of quality functions are used in the algorithm. The best solution obtained by the evolutionary algorithm is used as the initial solution in a tree search improvement procedure. This approach is tested on a set of benchmark problems taken from the literature and compared with the results published by other authors.


Introduction
The problem discussed in this paper consists of packing rectangular pieces into a large rectangular sheet, or equivalently, cutting small rectangular pieces from a large rectangular plate.It is assumed that we are dealing with a non-guillotine cutting, i.e. one in which (unlike in a guillotine cutting) subsequent cuttings do not need to proceed across the entire length of the cut material.The maximum number of times that each type of piece can be cut from the plate is also fixed.The objective is to maximize the total area of the rectangles cut, or equivalently, to minimize the unused area of the stock sheet (minimize trim loss).
Cutting and packing problems and similar problems occur in many practical applications, for example the cutting of steel or glass sheet into smaller elements, or cutting of rectangular plates in the process of furniture manufacturing.Cut materials may also include paper, fabric, foam polystyrene, etc. Equally, one can also consider a twodimensional bin packing problem, VLSI systems design or the problem of arranging announcements and advertisements in newspapers.In various applications, depending on the specificity of the problem, one may be dealing with different constraints (for example Furian and Vössner 2011) and various criteria of solution assessment.
This diversity of cutting and packing (C&P) problems has led to attempts to classify them.The first such attempt was made by Dyckhoff (1990), who classified C&P problems by four criteria.In 2007, Wäscher et al. (2007) suggested a new typology.According to this typology, the problem under consideration in this paper may be classified as a two-dimensional single large object placement problem (2SLOPP) or two-dimensional single knapsack problem (2SKP).However, if the typology of Dyckhoff is adopted, we are dealing here with problems of 2/B/O/R or 2/B/O/M type (2-geometric dimension of the small items and large objects, B-all large objects are to be used and a selection of small items is to be assigned to large objects, O-one large object, R-many items of relatively few different figures, M-many items of many different figures).
Starting from the 1950s, various approaches to solving C&P problems have appeared in the literature.A review of the methods used can be found, for example, in Dyckhoff (1990), Hässler and Sweeney (1991), Sweeney and Paternoster (1992), Dowsland and Dowsland (1992), and Lodi et al. (2002).
It should be noted that the majority of works concern guillotine cutting.Regarding non-guillotine cutting, approximate methods clearly prevail.There are relatively few exact algorithms that solve this problem.The first person to propose such an algorithm was Beasley (1985).He applied the branch and bound method, where the upper bound was derived from the Lagrangean relaxation of a cutting problem formulated as a zero-one integer programming problem.Descriptions of other exact methods can be found in Scheithauer and Terno (1993), Hadjiconstantinou and Christofides (1995), Fekete and Schepers (1997), Boschetti et al. (2002), Caprara and Monaci (2004), and Clautiaux et al. (2007).
An interesting method is proposed in Arenales and Morabito (1995).In their approach, cutting patterns are presented in the form of an AND/OR graph which is searched by means of the branch and bound method.In order to reduce the size of the search tree, they employ some heuristic observations and confine themselves to non-guillotine cuttings created as a result of the combination of guillotine and simple non-guillotine cuts.
Many approximate methods developed for the non-guillotine cutting problem are based on the heuristic algorithm BL (bottom-left algorithm; see Baker et al. 1980) of placing rectangular elements on a rectangular plate, or on any of its modifications (for example Lai and Chan 1997a, b;Liu and Teng 1999;Leung et al. 2001).In this algorithm, starting from the upper right corner of the output plate, successive (randomly generated) elements are shifted down as far as possible, and then left.This "stepped" movement for each element ends when a stable position has been achieved.An example modification of this procedure (BLF-algorithm; see Chazelle 1983) consists in the additional completion of the gaps created when elements are placed using the BL method.As shown in Liu and Teng (1999), not all cutting patterns can be achieved with the application of the BL procedure; however it does enable reduction of the number of generated cuttings.
It should be emphasized that in practical applications one often faces a more general problem, which consists in minimizing the number of rectangular bins used to pack a set of smaller rectangles or in minimizing the number of plates which need to be cut to execute a particular production order (for example Mack and Bortfeldt 2012).

Problem description
Because cutting stock problems and packing problems are basically the same problems, in this paper the terms cutting and packing will be used interchangeably.
The two-dimensional non-guillotine packing problem addressed in this paper is the problem of cutting from a single rectangular stock sheet (plate) A = (W, H ), of width W and height H , smaller rectangular pieces p i with dimensions (w i , h i ), i = 1, . . ., m.We call each possible way of cutting a plate a cutting pattern.
Let A be located in the Cartesian coordinate system Oxy, with its bottom left corner placed in position O(0, 0) and with its edges parallel to the x-axis and y-axis.
The following assumptions are made: • the cuts are made with their edges parallel to the edges of the stock plate (orthogonal cuts); • each piece p i has an associated value v i equal to its area (v i = w i h i , for each i = 1, . . ., m); • in a cutting pattern there may be used no more than b i replicates of each piece p i for all i = 1, 2, . . ., m (constrained problem)-the total number of items available for cutting is denoted by M(M = m i=1 b i ); • the pieces have fixed orientation, i.e. a piece of width w and height h is not the same as a piece of width h and height w; • the cuts are infinitely thin; • all input parameters are integers.
In cutting and packing problems the objective is usually to maximize the total value of the pieces cut: where a i is the number of times the rectangle p i appears in a given cutting pattern (a i ≤ b i for each i = 1, 2, …, m).Because we are assuming that each rectangle p i has an associated value equal to its area, the objective is to maximize the total area of the rectangles cut (called here the filling rate): which expresses the filling degree of the stock sheet.This formulation is equivalent to minimizing the unused area of the stock rectangle (trim loss).

Method description
This paper presents a new algorithm for solving the cutting problem described above.The main part of our approach is the evolutionary algorithm.Its most characteristic features include natural coding of individuals in the population, and application of a heuristic algorithm to generate the initial population and in mutations.The algorithm uses two types of quality functions and a division into parts of the larger cutting problem.The division into parts occurs depending on the problem's degree of complexity, which is estimated using a special procedure.A relevant orientation change (rotation) of the parts obtained as a result of the plate division in some cutting problems is also a characteristic feature.In the evolutionary algorithm three mutation operators were used, although no crossover operators are defined.Cuttings obtained through the evolutionary algorithm are subject to post-optimization with the application of the aforementioned heuristic algorithm.
The scheme of the main algorithm is as follows: 3.1 Placement algorithm (PA) The algorithm described below will be frequently used in this paper.It is a tree search improvement procedure where elements are placed on a plate similarly to the placement in the BL (bottom-left) strategy.It makes it possible to cut off branches of the search tree where the trim loss (the sum of inserted complements), treated as the cost of a particular partial solution, is not less than the trim loss of the currently best solution found.
Comments on the pseudocode: (02) Branches of the search tree where the trim loss is not smaller than for the current best solution are cut off.
(08) The current placing point is found by minimization of the coordinate y and then (with the already determined value of the coordinate y) the coordinate x for the unused area of the plate.
(11) An element (rectangle) can be placed at the current placing point if its intersection with elements of the current cutting (excluding the edges of the rectangles) is empty and the constraint on the number of elements of the given type is not exceeded.
(19) The rectangle completing the cutting at the current placing point is a rectangle with maximum width which can be fitted to the minimum height of the neighboring ones (the shadow rectangle in Fig. 1).A complement is placed only if no element can be placed at the current placing point.

Procedure initiation:
Elements := current list of elements for cutting; MinTrimLoss := area of the entire plate or estimated minimal trim loss; initialCuttingPattern := the empty cutting pattern without any elements or complements; PA(initialCuttingPattern, 0); As a result of procedure PA, the variable BestCuttingPattern includes the cutting pattern with minimal trim loss found smaller than the initial value of the variable MinTrimLoss.
The described cutting algorithm is not an exact algorithm.There are cuttings which cannot be obtained by the application of this method.This results from the fact that from the set of all possible placing points which would need to be taken into account when placing a particular element on the plate, only that one is always selected (while rejecting other possibilities) which progressed most to the left among the lowest located points of the plate area where no elements have yet been placed.During experiments with the described tree search improvement procedure it was found that sometimes, before the initiation of the PA algorithm, it is sufficient to make a rotation by 90 • of both the plate and all elements to achieve better solutions in the case of certain testing problems than those achieved in the standard manner.Such rotation is in reality equivalent to changing the order of minimization of the coordinates of the placing point for the version of the algorithm without a rotation: first the coordinate x is minimized, and then (with the determined value of the coordinate x) the coordinate y.This operation does not in any way change the adopted assumptions-after obtaining a solution it is enough to rotate it to return to the assumed sizes of the plate and elements.Therefore it was decided that in the case of problems of small or moderate size our evolutionary algorithm would be initiated twice: once in the version without the rotation, and once with the rotation of elements and the plate.As the results of the computational experiments demonstrate, such an approach is justified.
This algorithm is used to improve the filling rate of the cutting after the evolution process and as a local optimization procedure in one of the mutation operators.It will be elaborated on later in the paper.
If in the above algorithm, instead of proceeding across all possible elements in a given placing point, one of the elements is selected at random (or an empty rectangular element if none of the elements fits), a random version of this method will be applied.In comparison with a simple BL algorithm, in the generated cutting patterns no gaps are formed where any more elements could fit.This random version of the algorithm is applied to generate the initial population of the evolutionary algorithm and in the mutation operators of this algorithm.It will be elaborated on later in the paper.

Estimation of the size of the search tree
The previously described PA algorithm can be also employed for estimation of the number of cuttings that can be obtained for a specific problem.In the estimation procedure for each placing point a set of all elements which can be positioned on the plate and placed at a given point is determined.The decision as to which element of this set will be used in the cutting is made randomly, and the probability of selecting each element is the same.
Let us assume that at a given ith placing point, k i elements (where 1 ≤ k i ≤ M) can be placed.Then the size of the tree search (more precisely, the number of tree nodes other than the root) can be evaluated by means of the following calculation: Since the achieved value depends on the results of the drawing of elements which will be located at subsequent placing points, the estimation procedure is generated many times (in our case 10,000 times) and then an average of the obtained estimates is determined.This average is adopted as the final estimation of the number of all solutions of a given problem possible to be achieved with the use of the PA algorithm.

Division into parts of large cutting problems
Plates in large cutting problems are divided into parts and the evolutionary algorithm is applied to each of them.The elements which were not yet used in cuttings of previous parts are applied for cutting each subsequent part.The setting of parameters of the evolutionary algorithm (in particular the stop condition) differs slightly depending whether it is the last part of the cutting or one of the previous parts.Exact settings of parameters are described in Sect.4.1.The division into parts is performed in such a manner as to be most natural.If the largest element (in terms of width or height) determines a natural division, i.e. this size is more or less one half (in the case of division into two parts) or one third (in the case of division into three parts) of the plate size, this is how the plate is divided.In other cases the plate is divided into two or three equal parts.The obtained pieces of the plate are set vertically, that is, first a section of the plate is rotated along with all elements for cutting, if necessary, and then the algorithm for seeking the best cutting is performed.The final cutting is again compiled with cuttings of relevant parts (with relevant rotations if necessary).

Main loop
The scheme of the evolutionary algorithm is as follows:

Coding of individuals
No special coding of cutting patterns is used in the algorithm.Each individual (cutting) has a natural geometric interpretation as a sequence of rectangles (both elements and empty pieces) placed within the rectangle of the plate subject to cutting.

Selection of individuals
In the evolutionary algorithm two quality functions of individuals are applied.The fitness function is used for the selection of individuals for the process of reproduction (mutation).In the selection process, the roulette method with linear scaling is applied (Michalewicz 1992).The valuation function is used for selection of the best individual in a given population, and it is this individual that is remembered as the best found in a particular generation.This allows the selection process of individuals for reproduction to be separated from the process of selecting the best individual according to the criteria of our choice.Individuals most suitable for reproduction, most promising in terms of improvement (fitness function), do not need to be the individuals with the best assessment (valuation function).However, the ultimate selection of the best individual in a generation is performed by means of the valuation function which reflects our criteria for the best individual.fillingRate is the filling rate of the individual; numOfElements is the number of elements in the individual; parE is a parameter determining how much the number of elements of the individual influences the value of the valuation function.

Valuation function
The main component of the valuation function is the filling rate of a particular individual, i.e. the filling rate of the cut plate.However, attention is also paid to the number of elements of which such individual is composed.Out of two cuttings with the same filling rate, the one which is composed of a smaller number of elements is better.With a small value of parE (as used in the present work), numOfElements distinguishes only individuals with the same filling rate.This is of particular importance in those problems where the plate is divided into parts.If the cutting of the first part of the plate contains fewer elements, it is more likely that the remaining larger number of elements will be able to fit better (one has more choice) in the next part of the cutting.In one-part cuttings, or in the last parts of multipart cuttings, it is of little relevance-the result will simply be an individual with the smallest number of elements among the cuttings with the largest filling rate.where: emptySpaceVertPos is the minimal coordinate y of placing points of empty pieces or the height of the entire plate if the cutting pattern of the individual includes no empty rectangles; parD is a parameter determining how much the structure of empty pieces influences the value of the fitness function.
The fitness function, apart from the filling rate and the number of elements of which the cutting consists, also takes into account the structure of the unfilled places of the cutting, the so-called empty pieces.The higher the empty pieces are located in the cutting, the larger is the value of the function.Two cuttings with the same value of the valuation function may differ in terms of the fitness function (Fig. 2).It may happen that one individual is better than the other in terms of the fitness function although it is worse in terms of the valuation function.Application of such a fitness function results in the movement of empty pieces in the evolution process up the cutting until (if possible) a cutting with full filling rate is achieved.The coefficient parD serves to indicate what percentage of the surface of the entire plate may be added to the value of the fitness function if there are no empty pieces in the cutting.

Mutations
In each generation of the evolutionary algorithm, after performing the selection, the reproduction process takes place.In this process three mutations are used.Each of them occurs with a fixed, predetermined probability.
M1 mutation This mutation consists in the random trimming of an individual (removal of some of the recent cutting elements) and then random completion.The maximum number of cutting elements which may be removed depends on the current number of the generation of the evolutionary algorithm.This value will be marked as maxNumOfElements and it will be calculated by: where: numOfGenerations is the total number of generations (iterations) of the evolutionary algorithm; generationNum is the number of the current generation; • denotes rounding up to the next integer.
Then an integer from the range from 0 to maxNumOfElements is randomized, and such number of recent cutting elements is removed.Now the completion process takes place.In the empty places of the cutting, random elements (or empty rectangles) are inserted, in accordance with single run of the random version of the PA algorithm.Thus the mutation cuts off and completes the cutting at random, and the further in the evolutionary process one is (the higher the number of the generation), the smaller number of final cutting elements stand a chance of being trimmed.
M2 mutation This mutation acts similarly to the M1 mutation; however between the cutting-off phase and the completion phase there is an additional operation, the socalled local optimization.In this phase the PA algorithm is produced, but only for a certain established (M2NumOfSteps) number of steps forward in the search tree.As a result, at this point in the cutting, an optimal (in terms of the PA algorithm) placement of cutting elements occurs.M3 mutation This mutation also attempts to optimize locally a selected cutting.The procedure below is repeated until a better individual (in terms of the fitness function) is achieved than the one subject to the mutation, or until all possibilities are exhausted: 1. Trim an individual at random (however, unlike in the previous mutations, always maxNumOfElements = numOfElements); 2. Remember the elements (and their sequence) which were removed; 3.At the current placing point find all the elements which can be fitted to the width or height of the neighboring ones in the trimmed cutting; 4. If such elements exist, choose one of them at random and place at the current placing point; 5. From the remembered cut-out elements, remove all those which have a common part (excluding the edges) with the inserted element; 6. Attempt to add the remaining remembered elements, and if one of them does not fit, insert a random fitting one (or an empty piece if none fits); 7. If there is still an empty place, complete the rest of the elements randomly, as in the previous mutations.
The diagram below (Fig. 3) shows an example trial of the operation of M3 mutation.From an output cutting the elements from 1 to 7 are removed (and remembered).Then, at the current placing point, a new element 8 is added, which fits to the width of the remaining cutting elements.From the sequence of the removed and remembered elements, those that have a common part with the added element 8 are removed, these being the elements 1, 2, 3.The remaining elements are attempted to be added without changing their order.In this case the following elements are added: 4, 5, 6.The subsequent element 7 cannot be added, thus a random element 2 is added and then the remaining empty places continue to be completed (at random).In the example this led to the total completion of the cutting.As an individual better than the initial one, it is selected as a result of the M3 mutation.

Stop condition
The evolutionary algorithm is terminated after one of three conditions: 1.The last generation is exceeded, i.e. the algorithm performed the maximal number of iterations numOfGenerations; 2. The number of different individuals in the population is smaller than the value of the parameter stopNumOfUnequalIndividuals.Equal individuals are those with geometrically identical cutting patterns.If the diversification of populations decreases and there are many of the same individuals, the algorithm is terminated; 3. The filling rate of the best individual is greater than (or equal to) the value of the parameter stopFillingRate, and in a number of iterations no better individual is found: generationNum > = parP * bestGenerationNum; bestGenerationNum = the generation number with the best current solution.

Improvement of the final solution
As all genetic operators applied in the evolutionary algorithm are compliant with the heuristic algorithm (PA), i.e. the arrangement of elements of each cutting could be achieved through the algorithm (PA), one can use it to improve the final solution.
Having obtained the best cutting in the evolution process, this cutting is used as a starting configuration of the algorithm (PA).It is run for a determined amount of time which (sometimes) makes it possible to increase the filling rate of the cutting.In the case of multi-part cuttings, this procedure is used only for the last part.Its application for the earlier parts could disturb the proper structure of the cutting achieved due to the operation of the fitness function.It could happen that a minimal increase of the filling rate occurs with a simultaneous large increase in the number of elements used in the cutting, which would be disadvantageous for the global solution.
• Number of individuals in the population: numOfIndividuals = 1,000.
• Stop conditions: stopNumOfUnequalIndividuals = 500.Other parameters depend on the part of the cutting (if it is divided): for the first part: stopFillingRate = entire filling rate, parP = 1.5; for the last part: stopFillingRate = entire filling rate, parP = 0 (the algorithm is terminated immediately when the entire filling rate is reached).
• The scaling factor of the roulette method in the selection process is equal to 1.5.
• Probabilities of mutations are the same and equal to 1/3.
• The time of the post-optimization is predetermined as 60 s (provided the optimal solution was not found by the evolutionary algorithm).

Experimental conditions
For each test problem, 28 runs of the algorithm for various settings of the random generator were performed.The results always specify the best and the average value.
The times of individual runs were also registered.The results specify the average time from all 28 runs.To the times of the runs of the evolutionary algorithm the time (60 s) of the post-optimization is added (provided it was performed).
A set of programs in the C# .net3.0 language of the server/computational clients was created which enables distributed computing.This was installed on a set of 28 computers with 2.0 GHz processors connected with the local network.On each computer, one computational client was activated, which made it possible to perform parallel computations of the aforementioned 28 algorithm runs.
In these problems the value of each element equals its area and, additionally, they have been designed in such a manner as to ensure that the optimal solution is a cutting with a zero trim loss.Thus for each of these problems the optimal value of the objective function adopted by us equals the area of the plate.It should be explained here that in the case of two problems in this set (LC2 and LYT2) from Leung et al. (2003) the dimensions of some elements were specified wrongly.In the problem LC2, the element 10 should have the size of 100 × 70, and in the problem LYT2 the correct dimensions of element 12 and 20 are 16 × 14 and 32 × 8, respectively.Since in the literature both variants of these two problems can be found, calculations were performed both for the correct version and for the version with erroneous data.
The problems in the first set can be considered to be problems of moderate and large (computational) complexity.The complexity of these problems was evaluated using the procedure described in Sect.3.2.1.Table 1 specifies the estimated dimensions of the search tree (the number of tree nodes) and basic information about the test problems.It should be recalled here that the evaluation of the problem size is performed based on the procedure of placing elements on the plate (PA algorithm) as applied by us, which does not guarantee the achievement of all possible cuttings related to a given problem.Therefore the actual dimensions of the solution space are larger than those given in Table 1.However, based on this data, the complexity degree of individual problems may be evaluated and compared.Based on the estimates obtained, a decision is made as to whether in a given problem a division of the plate into smaller parts (Sect.3.2.2) will be performed.
These problems are taken from works in which the objective is to maximize the total value of the pieces cut, and the value of the element does not need to correspond to its area.With such an assumption for these problems, the values of optimal solutions are known.It is assumed in our calculations that the value of a given element equals its area.In such case, optimal solutions are not known for all problems (so far the best results are found in Gonçalves 2007).
The problems in the second set may be considered to be problems of small and moderate size.Table 2 provides information regarding the estimated number of nodes of the search tree for the problems in this set.

Computational results
For each of the described sets of test problems a series of preliminary optimizations was performed with the purpose of selecting proper parameters of the algorithm.Based on these experiments, the values given in Sect.4.1 were assumed.It should be added that the determined values are a kind of compromise between the universality and efficiency of the algorithm.The point was to adopt such parameter values which would make the algorithm generate satisfactory solutions for a wide range of problems-however, this does not mean that these are optimal parameters of the algorithm operation for each problem.We realize that for some problems the results presented below could be still improved by adjusting parameter values to the specific problem rather than to the entire set of problems.
Despite the fact that as a result of the initial experiments the majority of algorithm parameters was assigned values which were not subject to further changes, in the case of some mechanisms it was still decided to make the manner of their operation conditional on the nature of the problem.Justification for this approach can be found in Table 3, where the calculation results for the first set of test problems are presented.
One of the mechanisms whose application is dependent on the complexity of the problem is the division of the cut plate into smaller parts followed by the initiation of the evolutionary algorithm for each part separately.It turned out that in the case of problems of high complexity the use of such a mechanism not only contributes to improving the results, but also results in a shortening of the calculation time.However, specification of the conditions which need to be met to perform the division may present a difficulty.Based on the computational experiments and determined estimates of the complexity degree of problems a decision was made to perform the division of the plate into two parts in the final version of the algorithm if the estimated size of the search tree will be between 10 30 and 10 130 nodes.In the case of problems of larger size the plate will be divided into three parts, while in cases of small size (below 10 30 ) there will be no division.It should be added, however, that in order to establish the principles of the division of the plate into parts in a more precise manner, experiments for a larger number of problems would need to be performed.Already based on analysis of the data in Tables 3 and 1 it can be stated that in the case of problem HT11 (estimated number of nodes in the search tree 1.43 × 10 41 ) slightly better results were obtained in the version without the division, whereas for problems LYT1 and LYT2 (with sizes of 1.67 × 10 32 , 8.19 × 10 44 ), the plate division contributed to a significant improvement of the results.This problem might be solved to some degree by determining such ranges of the problem complexity degree for which both versions of the algorithm would be initiated, with and without a division.
Moreover, for problems of small and moderate size (i.e.problems for which the division of the plate into smaller parts was not performed), it was decided that in the final version the algorithm will be initiated twice: once for the standard form of problems and once in the variant with rotated elements and plate.By analysis of the results in Tables 2 and 5, it can be stated that in some problems such an approach can bring an improvement in the obtained results.However, in such a case, the obtained computation times should be added.Additionally, the performed computational experiments proved that the application of the plate and element rotation procedure is particularly   advisable in the case of problems where the width of the plate is greater than its height.This is related to the fitness function applied by us, which prefers cuttings with empty pieces located as high as possible, which contributes to a better diversification of cuttings with the same filling rate.Therefore, in the case of problems of larger size, where the plate is divided into smaller parts, pieces obtained as a result of such division are always arranged in a vertical orientation.
The value of the M2NumOfSteps parameter, which specified the number of steps (search levels) performed by the PA algorithm used by the M2 mutation, also depends on the problem's degree of complexity.As was found from the results of the preliminary experiments, in problems where the plate division into parts was not made, better results were achieved applying the M2 mutation with the M2NumOfSteps parameter value set to 3, whereas in the problems of large size it was usually more advantageous to set M2NumOfSteps = 2. Increasing the value of this parameter caused a significant increase in the computation time.
Table 4 presents a comparison of the results obtained for set I using our algorithm (HEA) with the results provided by the following authors: • Binkley and Hagiwara (2007)-they present results of calculations for two algorithms which they developed based on the four corners packing heuristic in combination with either self-adapting parallel recombinative simulated annealing (marked as BH07a in Table 4) or the self-adapting genetic algorithm (BH07b); • Gonçalves (2007)-he designed a hybrid genetic algorithm based on the original procedure of placing elements on the plate.2009)-in their method (marked as BW09 in Table 4) complete cuttings are assembled from a certain number of rectangular layers of various lengths, while their width equals the width of the cut plate.The genetic algorithm is responsible for solution processing (shifting the layer between cuttings); • Gonçalves and Resende (2011)-they proposed a hybrid genetic algorithm based on random keys with a novel placement procedure (GR11).
In Table 4, the best solutions found for individual problems are distinguished with a bold font.Based on analysis of the results, it can be stated that the algorithm developed by us found solutions of a higher (for 15 problems) or equal value of the objective function for almost every problem, compared with the algorithms mentioned above.Moreover, for the four problems HT12, HT13, HT15, J2 (and, considering additionally different versions of the algorithm, also for problem HT11), our algorithm was the only one to generate optimal solutions.Figure 4 presents the cuttings obtained for two of those four problems.
In the case of problem HT12, the optimal solution was found both by the standard algorithm version (without plate division) and the variant of the algorithm with division of the plate into two parts.The cuttings obtained are shown in Fig. 5.
The averages calculated in our experiments for each problem based on the results from 28 algorithm runs are, for many test problems, higher than the averages presented by Binkley and Hagiwara (2007) and Gonçalves (2007).Equally good results are obtained for the problems from set II, i.e. problems of small and moderate complexity (Table 5).
For the problems in this set the algorithm developed by us found either the optimal solution (where it is known) or a solution with a value equal to the highest value found so far.For the first 16 problems, optimal solutions were found in each algorithm run, regardless of whether the elements were rotated or not.In case of problem okp1 the optimal solution was found only after rotating all elements.It can be assumed that without the rotation of elements, the applied procedure of placing elements on the plate could not generate this solution.Additionally, in the case of the last five problems rotation of elements brought an improvement in the average of the obtained values of the objective function.

Conclusions
In this paper a hybrid evolutionary algorithm for the non-guillotine cutting problem has been presented.Many, often specialized mechanisms were employed with the aim of improving the efficiency of our approach.Various mutation operators were developed and tested, and finally it was decided to use three of them.In addition, a procedure of post-optimization was applied to improve the solution generated by the evolutionary algorithm.In the case of test problems of large size a decision was made to perform a division of the cut plate into smaller parts.The developed algorithm was tested on a number of test problems derived from the literature, and the results obtained were compared with those presented by other authors, including those applying metaheuristics.The computational experiments performed demonstrate the high efficiency of our method.For almost all of the test problems our algorithm found a better or equally good solution as the solutions obtained by other authors, and in the case of some problems it was the only one that found an optimal solution.
Open Access This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.

Fig. 1
Fig. 1 Illustration of the PA algorithm The valuation function of an individual is calculated by valuation = fillingRate − parE * numOfElements, where:

Fitness
function The fitness function value of an individual is calculated by fitness = fillingRate + parD * W * emptySpaceVertPos −parE * numOfElements;

Fig. 2
Fig. 2 Two cutting patterns with the same value of the valuation function (the same filling rate and number of elements) but different values of the fitness function (different structure of empty pieces)

Table 1
Description of the first set of problems (corrected version in brackets)

Table 2
Description of the second set of problems

Table 3
Computational results for the first set of problems (corrected version in brackets)

Table 4
Comparison with other algorithms (corrected version in brackets)

Table 5
Computational results for the second set of problems