Introduction

Manufacturing and production industries very often come across the problem where a given stock material must be cut into a smaller set of shapes. In this paper, we consider a two-dimensional orthogonal rectangular strip packing problem (SPP) NP-hard in nature (Garey and Johnson 1979; Bortfeldt 2013). This class of combinatorial optimization finds significant relevance in different domains of operation research. In industries like paper and pulp, wood and textile, the problem is to determine how the arbitrary rectangular block set would be cut from the available stock. The problem variant like arrangement of articles, reports and advertisement is considered in the newspaper field. In pharmaceutical packing industry, many strip packaging approach seems ideal for high-speed sealing of coated or uncoated tablets, capsules or lozenges of any shape or size in aluminum foils, polythene, cellophane, etc. It is an interesting real-world industrial problem where the objective is to provide the best arrangement with the aim of waste minimization. There are two broad categories of the solution approach, namely exact and inexact. The major bottleneck with the exact approaches are that as the problem size grow and become complex, the computation time also grows exponentially. Thus, the researchers focus more on the inexact approach in comparison to exact.

Industrial application

In today’s world of industrialization, mass production and high material utilization are the crucial factors for growing industries that necessitate the need of finding correct cutting patterns which may result in a small improvement. In the long term, it leads to huge economical saving. These problems occur at wide scale in many industries such as wood, textile, rubber, glass, etc., where the complexity is determined by the shape of the item to be cut and the number of applicable constraints. Textile and shipping industries basically deal with irregular shaped items. Automation in a packing system saves much economic time and is preferred over the manual system. One case study discussing strip cuttings in wooden industries is discussed in Lefrançois and Gascon (1995) for a manufacturer of prefabricated doors and windows. These industries follow a daily production schedule where the desired length which may be wood, steel, plastic, etc., are cut to smaller length, either by automation or by manual labor. The policy followed is basically to meet the higher demand length first, followed by others in order of their decreasing length. The main concern for these industries is efficient utilization of available resources with minimum scrap production. The shorter length stock incapable of fulfilling any order demand is termed as scrap. The textile industry also tackles this problem, but under a different heading, namely Nesting and Marker making. It involves finding the best layout for the cutting of irregular shapes, where the shapes are allowed a rotation from 0° to 180°. Regular and irregular shape packing are addressed in the shipbuilding industries where it is required to investigate how the irregular size items can be packed and transported in huge containers. In today’s scenario of surplus demand, an automated system is required for efficient packing thereby reducing the transportation damage risk. The packing problem is not limited to industries, but can also be seen in other dimensions like in very-large-scale integration design, memory allocation during storage and in the field of optical fiber communication.

The World Packaging Organization (http://www.worldpackaging.org/i4a/doclibrary/index.cfm?category_id=4) report presented in 2008 with global packaging market statistics shows packaging growth is tied to the world economy. The fast growing economy of countries in Asia and Eastern Europe has created new opportunities for packaging suppliers. The world packaging market was valued at $427 billion in 2003, growing at an annual rate of 3.5 % since 1999. The global market for industrial and bulk (transport) packaging was valued at $105 billion in 2004, representing an increase of 5 % in 2003. At $30.8 billion, North America represents the single largest market with a 30 % share—set to fall to 27 %, behind Asia by 2009. Overall, sales are forecast to grow at an average rate of 2 % over the period to reach $117 billion. Such growing industry calls for the use of intelligent automated system for quick and efficient packing approach, particularly for real-time applications where computation time is hard bound.

Our contribution

In this paper, we have proposed a metaheuristic algorithm, namely genetic algorithm-based placement approach (GPA) for solving orthogonal strip packaging problem. The approach modifies the complex placement strategies by proposing simple ones, whereas in the genetic algorithm we have modified the stages of initial population generation, crossover and mutation to achieve our objective. The paper presents a novel fitness function to evaluate the design layout, which facilitates the selection of a best design layout for population evolution. The evolution process of forwarding the best individual to the next generation is maintained by the appropriate selection pressure. In placement approach, we have considered the creation of empty rectangular blocks to place the next rectangular block in a sequence. As the problem grows, the number of such blocks is likely to increase. However, this problem of stacking of empty rectangle, i.e., it controls the growth in number is tackled in our approach by using rectangle merging routines. In comparison to other approaches, the computation task of fitness evaluation for the placed rectangle is effectively reduced. We have designed the fitness function for the overall layout pattern by considering two crucial parameters, height and area utilization factor. The algorithm finds the most optimal solution in numerous cases and results illustrates that it compete well with the existing heuristic and metaheuristic approaches. The experimental result obtained confirms the applicability on large-scale instances.

The rest of the paper is organized as follows. “Background study” outlines the literature review for 2D orthogonal SPP in light of exact, heuristic and metaheuristic approaches. “Proposed approach” presents the proposed work. The work discusses the placement policies, empty block creation, merging and various aspects of GA. “Experiments and results” gives the computation results as the work is compared against the standard benchmark, along with a detailed discussion of how it outperforms the existing approaches. In “Conclusion”, we finally conclude our work by giving final remarks.

Background study

This subset of cutting and packaging problem is NP-hard in nature (Garey and Johnson 1979). Dyckhoff (1990) gave the first clear classification for cutting and packing problem. The characterization is based on the fact that many are similar in their logical structure, but different in application areas. There are various categories in packing which include cutting stock problem, knapsack, bin packing and loading problem. Cutting stock involves cutting off available raw stock to meet customer demand such that trim loss is minimized. Knapsack is mostly considered as a sub-problem in many cases where certain weight is associated with the object. The objective is to pack these objects in a fixed size larger container to maximize the overall weight. Bin packing aims at packing items into bins. The dimensions are bounded, such that the remaining space in the used bin and the overall bin required to pack all items are minimized. All these problems range from single to multidimensions. Strip packing is considered in higher dimensions like two (2D) and three (3D).

The literature reveals that rectangular strip packing is solved using many exact and inexact approaches. Christofides and Whitlock (1977) and Beasley (1985) used tree search methods to solve guillotine and non-guillotine variants of SPP. Exact approaches like a branch and bound were used by Martello et al. (2003). Lesh et al. (2004) modified the approach by adding the pruning method with branch and bound to solve a small subset of this problem. Another variant of branch and bound was presented by Kenmochi et al. (2009), where the branching scheme was based on some placement scheme and bounding operation was governed by dynamic and linear programming. However, a general observation follows with the exact approach, which is: as the number of rectangles to be packed grow in number, it is difficult to get the optimal solution in an acceptable time as the time also grows exponentially. This behavior of the exact motivates researchers to focus on heuristic and metaheuristic approaches to find optimal or near optimal solution. The benefit of using these approaches is their ability to give approximate solutions in a reasonable computing time. The most popular and common approach of placement bottom left heuristic (BL) was given by Baker et al. (1980). This approach considered sequential placement of rectangular blocks at the bottom left, where in the beginning each rectangle was placed at the top right corner and then slowly moved down to a position where it could not be further lowered; the block was then shifted toward left ensuring that it resulted in no rectangular overlap. The heuristic was improved by Hopper and Turton (2001) bottom left fill (BLF) heuristic in which the gap that existed in between the already placed rectangle was given preference over the placement of the new rectangle. A further improvement in these strategies was observed by Asik and Özcan (2009), who introduced a bidirectional best-fit (BBF) heuristic, sequencing the placement based on height or width of the rectangle. The method was studied by Imahori and Yagiura (2010), considering both horizontal and vertical gaps for the best placement location. They used the concept of placing rectangles, taking the reference of skyline, good searching technique to determine the placement position for the next rectangle to be packed and also used efficient data structure for storing the details of the remaining rectangles. Leung and Zhang (2011) proposed fast layer-based heuristic with the strategy of stacking rectangles. The approach determines the reference line by first placing a reference rectangle and then stacking some others on it. The techniques are based on a greedy search where the lowest available space is determined under the reference line; the fitness of the remaining unplaced rectangle is determined and based on the fitness value the best-fitted rectangle is selected. Özcan et al. (2013) presented an extension to the original BBF heuristic; rather than considering single rectangle placement, different combinations of rectangle pair were selected. The heuristic approach also includes brick layering (Zhang et al. 2008), which is inspired by the process of building the wall, as it involves a number of placement phenomena during creation of the wall. Here, we now discuss a number of metaheuristic approaches from literature which are also used for the evaluation of the proposed approach. These include genetic algorithms (Jakobs 1996; Ramesh Babu and Ramesh Babu 1999; Dowsland et al. 2006; Gonçalves 2007), simulated annealing algorithms (Dagli and Hajakbari 1990; Lai and Chan 1996; Martins and Tsuzuki 2010), neural network algorithms by Dagli and Poshyanonda (1997) and some hybrid metaheuristic algorithms by Hopper and Turton (2001), Hifi and M’Hallah (2003), Bortfeldt (2006).

High computing time is a major concern in hybrid neural-based model posed by Dagli and Hajakbari (1990). The scale factor concept was given by Martins and Tsuzuki (2010), where he used limited depth breath search and crystallization heuristic to fit the polygon in the container. Jakobs (1996) and Liu and Teng (1999) used GA for evolution of sequence for packing the rectangles, where GA was coupled with the bottom left heuristic. On the other hand, in another metaheuristic approach, Ramesh Babu and Ramesh Babu (1999) used deterministic heuristic in combination with GA. Hopper and Turton (2001) in their paper investigated a number of metaheuristic approaches which included simulation annealing and GA by combining them with a number of existing heuristics like BL and BLF. In addition, the non-deterministic algorithms are time-consuming and least applicable for problem dealing with huge enumeration of rectangle. Bortfeldt (2006) gave a sequence algorithm titled SPGAL that did not use any encoding and worked directly on the resolution layouts. Burke et al. (2009) enhanced the BF rule (Burke et al. 2004) with the crossbred simulated annealing and BLF rule of Hopper and Turton (2001). Alvarez-Valdes et al. (2009) planned an activated greedy randomized adaptive search procedure (GRASP) which improves for instances of smaller size as reported in Alvarez-Valdes et al. (2008). The main feature of this approach is its ability to fix suitable parameters by analysis and learning of information. Belov et al. (2008) presented two heuristics, namely sequential value correct (change knapsack job) [SVC (subKP)] and bubble search (BS, bottom left–right). The coercive rule of SVC proved to perform well in many instances. Wei et al. (2009) gave least waste first heuristic (LWF) based on the position evaluation which is improved after union with the simulated annealing algorithm. LWF outperforms many other approaches facing difficulty to pack rectangles. The solution approaches like SPGAL, discernment, BF+SA, SVC and LWF, although are well-designed algorithm based on good formulating placement strategies and giving acceptable results in reasonable time. However, the computation time for these algorithms is subject to correct parameters setting. Moreover, as the problem becomes complex when the number of rectangles to be packed increases, the execution time for several algorithms generally rises to find an appropriate solution. In Leung and Zhang (2011), fast layer-based heuristic inspired by brick packing does not depend on parameter setting and was designed to handle large instance as by Huang et al. (2007). However, computation time is large for this approach. Wei et al. (2011) proposed iterative doubling binary search (IDBS) which when combined with tabu search outperformed many of the approaches from the literature. A number of new and improved level-based heuristics are reported in literature. Yang et al. (2013) recently presented a randomized algorithm based on least waste strategy with simplified parameter adaptation. It can quickly find a solution, but the quality of the solution is worth improving further. Efficiency and robustness are the two crucial factors for any algorithm applied to any real-world application, particularly in the logistic field.

Proposed approach

So far, the heuristic and metaheuristic approaches require a pre-processing on the available set of rectangles to select the best one among them which can fill the current gap exactly. Here, we propose a simple approach where the rectangles are placed in sequential order governed by placement policies in an appropriate empty rectangular block. Thus, it avoids the computational overhead of pre-processing and selection of the best-fit rectangle. The approach has major contributions like the rectangle placement strategy, a modified genetic algorithm and a novel fitness function for better convergence of optimum results. The new approach is constructive in nature which places each rectangular block one at a time in the container. The role of genetic algorithm is to evolve the ordering of the rectangle or chromosomes which represent the rectangular block packing sequence.

Two-dimensional strip packaging

The two-dimensional SPP (2D-SPP) deals with a set of rectangular blocks that must be arranged in a given container of fixed width and infinite height with the objective of minimizing the highest point of any rectangle in the solution. A feasible placement is one where no rectangles overlap one another within the container and are arranged parallel to the container edge, i.e., orthogonally. An additional constraint like rotation of blocks by 90° is not considered in this work.

The 2D-SPP is presented as follows (similarly addressed by Thomas and Chaudhari 2013): consider a huge rectangular container of dimensions, say W × H where W stands for fixed width and H denotes the infinite height for the container. Consider m rectangles of smaller dimension as compared to the container to be packed, where the ith rectangle dimension is w i × h i . The placement is subjected to non-guillotine cut, i.e., the rectangles are placed parallel to the edge of the container. Furthermore, they are not subjected to rotation by 90°. The problem can work with both integer and real dimensions easily without any extension or change. The placement problem is well explained with the help of Fig. 1. The shaded rectangle shows different arbitrary size rectangular blocks that are packed into the given container. The optimum height denotes the minimum possible height achieved after placing all the rectangles. The sub-problem for strip packing, i.e., the 0–1 knapsack is indeed NP-hard in nature. This degenerative case makes the entire problem NP-hard. The model can be formulated by maximizing the area occupancy that in turn results in minimizing the overall height of the layout which is as follows:

max i = 1 m w i h i λ i .
(1)
Fig. 1
figure 1

A view of 2D strip packing

λ i can take the value 0 or 1 indicating whether the ith rectangle is placed or not. We designate each rectangle bottom the left most corner coordinate of the rectangle as ( x i , y i ) . The governing constraints are defined as

x i + w i W i = 1 , , m
(1a)
y i + h i H i = 1 , , m
(1b)
x i + w i x j or x j + w j x i or y i + h i y j or y j + h j y i i , j where i j
(1c)
λ i { 0 , 1 }
(1d)
x i , y i 0 .
(1e)

The constraints 1a, 1b and 1e ensure that the rectangles are placed within the boundary of the designated container used for packing. Constraint 1c checks the condition that no two rectangles overlap each other. Here, we have considered the generality that all the dimensions are integer. Constraint 1d indicates whether a rectangle is placed or not. The objective is to place the entire rectangle in the given area such that the occupancy is maximized and no constraints are violated. Thus, a design layout is feasible if it satisfies the above constraints.

Placement approach

The idea of the placement approach is to consider the given container to be divided into X and Y coordinates. The limit range of X-coordinate is from 0 to width (W) and that of Y-coordinate is from 0 to height (H) where theoretically H is considered to be of infinite height. However, practically we have set an upper limit for H based on the computed optimal height values. The placement of each rectangle results in the creation of new empty rectangular block space. The creation of empty space for rectangle placement is illustrated in Fig. 2. Each time a new rectangle is to be placed, one of the best-suited empty rectangle is selected from the available ones.

Fig. 2
figure 2

Creation of empty rectangle

The selection of empty rectangle is governed based on the following constraints: area of the rectangle to be placed is less than or equal to the empty rectangle area. Among the empty rectangle fulfilling the premier first constraint, the one is chosen with the lowest Y-coordinate The third governing criteria in the selection are that if the first constraint is satisfied and there exist say more than one empty rectangle space with the same minimum Y-coordinate. Among all, the approach selects the one with the least X-coordinate.

Empty block creation

As the placement of the rectangle determines the empty block creation, we in this subsection discuss all possible cases for placement and their possible block creations.

Case 1 For Fig. 2a, the placement of initial rectangle into the container results in a number of empty block creations. E1 denotes the block space of height equal to the placed rectangle height and width as W-place rectangle width. This creation of empty block is not essential because of E2 creation, but such block is required when we deal with the general cases. Another empty block E3 is created for the empty area above the placed rectangle. In the initial case, its width is W and height is equal to the assumed height—placed rectangle height.

Case 2 Figure 2b shows how the placement of the next rectangle results in the creation of new and merging/removal of old rectangles. The case discussed is when R2 height is more than that of already placed R1. The creation of E1, E2 and E3 is the same as initial Case 1 and E4 is the left section empty block created. The creation of new E1 will remove the earlier block formed by the initial placing of R1. The diagonal coordinates of E4 block will be X-coordinate as (x1 coordinate of R1, y2 coordinate of R1) and the Y-coordinate as (x1 coordinate of R2, y2 coordinate of R2).

Case 3 Figure 2c shows the third placement case where the height of R2 is less than that of the already placed R1. In this case the new creation will replace most of the already existing empty rectangles.

The creation of empty block is tracked, as each iteration results in the creation of new as well as removal of some of the existing empty blocks. The rectangles removed are basically for the one which are selected for rectangle placement and for all those empty rectangle blocks that overlap with the newly created blocks. We have used a merge rectangle routine that merges the small rectangle formed during placement into a larger one. This routine keeps a check on the growing number and stacking of empty block rectangles.

Merge rectangle routine

The merge routine deals with two major cases. Let us consider the case where we have two empty rectangular block spaces, say E1 and E2 with the diagonal coordinates (x11, y11), (x12, y12) and (x21, y21), (x22, y22). The cases are as follows.

Case 1 Combine rectangles in which the difference of x2-coordinate of first and the x1-coordinate of the second is zero, i.e., (x12x21) or vice versa. The new empty block formed (E 1 ) as shown in Fig. 3 will have the diagonal coordinate as (x1*, y1*) and (x2*, y2*), where x1* = min(x11, x21), x2* = max (x12, x22) and y1* = y12 or y21, y2* = min(y12, y22). Here, the convergence property of X-coordinate holds for E1 and E3.

Fig. 3
figure 3

Merging empty rectangular block (X-coordinate)

Case 2 Combine rectangles having difference of y2-coordinate of first and the y1-coordinate of the second as zero (y12y21) or vice versa. The new block coordinates as shown in Fig. 4 will be (x1*, y1*) and (x2*, y2*) where x1* = x11 or x21, x2* = min(x12, x22) and y1* = min(y11, y21), y2* = max (y12, y22).

Fig. 4
figure 4

Merging empty rectangular block (Y-coordinate)

The merging module removes the smaller ones by combining smaller empty space into a large one, thus facilitating the placement of the larger rectangles at the lower Y-coordinate. The module also helps to overcome algorithm space limitations.

Genetic algorithm

GA is inspired by the Darwin’s principle of survival of the fittest, where in the computing environment the stronger individual has a higher probability to be the survivor. GA uses a direct analogy to the biological process of evolution as shown in Fig. 5 and also discussed in Gómez and de la Fuente (2000). The process is based on the fact that individuals are the key elements for the potential solution to any problem, which can be represented by some feature set. These features are nothing, but genes corresponding to the chromosome which can be represented using data structure like string, binary or numeric array, tree structure or other representation. The evaluation of any chromosome to determine its feasibility in any population is based on its fitness value. The fitness value is related to the objective function.

Fig. 5
figure 5

Overview of genetic algorithm

Biased random key-based genetic algorithm: an overview

For solving sequential problem, Bean (1994) introduced random key or also called random key generation algorithm. In this approach, representation of each chromosome is by randomly generated vectors having real values in the range lying between [0, 1]. The values obtained are sorted to obtain the chromosome sequence, i.e., in our case the rectangular block placement sequence into the container. The initial population is made up of p vector of m random keys, where p is the number of population in each generation G and m is the number of rectangular blocks to be placed. For each population, the fitness value of each individual is computed. The population is partitioned into two: elites (e) and non-elite. The elite is a small group containing individuals with maximum fitness values. The elite population is directly transferred from one generation to the other. The elite group size may vary from problem to problem. In this case we have set the group size to be 1/8 the total size of the population. We have kept this factor small to handle the worst case scenario where the sequential pattern evolved may not be suboptimal or optimal. The elite population is carried forward to the next generation without change and directly plays a role in generating next population.

Thus, we keep a check so that not many chromosomes are transferred from one generation to another. To evolve the population for the next generation, the elite population is copied as it is to the next generation. The remaining pe population is evolved from performing crossover between elite and non-elite chromosome as discussed crossover function section. A biased random key genetic algorithm proposed by Gonçalves and Resende (2011) has a different approach for selection of parents for mating. In this mating process, one parent from the elite population and another from a non-elite population are selected to produce the offspring. When the number of elites is less, it indicates that one parent can produce more than one offspring. The operation is detailed in the crossover section.

Chromosome representation

Each chromosome in the population represents a set of parameters to any problem that GA is trying to solve. The initial population in the proposed approach is generated by random strings of real numbers in the interval range of [0, 1] having the same length, where length represents the chromosome size. The chromosome size is nothing, but the number of strips to be packed in the given container. This evolutionary strategy was proposed by Bean (1994) and also used by Gonçalves (2007). The obtained random sequence is then sorted in an increasing order to generate the placement sequence for the strip. The placement sequence is illustrated in Fig. 6.

Fig. 6
figure 6

Chromosome decoding

Crossover function

The placement sequence after sorting is further modified by the crossover operation. The evolution cycle for GA is enhanced by two fundamental operators: crossover and mutation. Here, we have considered biased random key method which integrates both these operators. The approach discussed by Gonçalves (2007), Goncalves and Resende (2011) says that rather than performing mutation on the entire population, certain mutants with specific mutation rates are introduced in the non-elite section of the population. In our case we have kept the mutation rate to be very low as the approach is capable of dealing with the low convergence rate problem by itself. Thus, we prefer the existing non-elite population than mutant introduction for crossover. As the elite parents are more feasible to be the solution for the given GA problem, BRKGA proceeds by selecting one random elite parent and another non-elite. Such a selection ensures that the new generated offspring would carry some features from the elite parent. As elite population individuals are less as compared to non-elite, repetition of parents is allowed. That is, one elite parent can generate multiple offsprings.

In contrast to the original approach, we have used maximal preservative crossover (MPX), as in Mathias and Whitley (1992), over the parameterized uniform crossover used by Gonçalves (2007) for the mating process of the chromosome. MPX is preferable as it produces offspring by directly copying a small segment from the elite parent to the offspring. In this crossover approach, two random crossover points are generated. These crossover points decide the range of segment that would be copied in the offspring from the elite parent. The remaining offspring is generated by copying the gene from the second parent provided that the gene does not already exist in the offspring.

For example in Fig. 7, while copying the gene from the second parent to the offspring, gene 7 is already present in the offspring so it is skipped and the next gene is evaluated and placed based on the nonexistence in the offspring. We assume that any random key vector can be decoded into a solution, and then the offspring resulting from mating is always valid, i.e., it can be decoded into a solution of the combinatorial optimization problem. When the next population is complete, i.e., when it has p individuals, fitness values are computed for all of the newly created random key vectors and the populations are partitioned into elite and non-elite individuals to start a new generation.

Fig. 7
figure 7

Maximal preservative crossover (MPX)

Fitness evaluation

The quality of any evolved solution is judged by its corresponding fitness value. These values help in the selection process, i.e., to select the fitter individual to be the parent which can share their properties to evolve better offsprings for future generations. The goal is to minimize the packing height for the strip in the given container. Thus, the fitness evaluation of any individual is based on the height parameter. We have calculated individual score for each placed rectangle. These individual score for the rectangle is determined by the minimum space left in packing between the placed rectangles.

The overall score of the layout would be the summation of score for each individually placed rectangle. This layout score is considered in the evaluation of the fitness function. The score is given by

Score ( r i ) = w i h i W H - i j , j B w j h j
(2)

where r i is the rectangle with width w i and height h i placed in a container. W denotes the width of the container and H represents the height. In this problem, we assume that the container’s height is infinite. However, to determine the score we set an approximate height of the container to a value slightly higher than the computed optimal height, to tackle worst cases as the ordering is random in nature. Here, B is the number of rectangles already placed. The optimal/expected height is calculated as

optimal\_height = i Area ( r i ) W .
(3)

The second parameter that we use for fitness evaluation is the best height (BH). This parameter indicates the height achieved by the layout. The fitness function must hold on both the aspects of the score and BH. Thus, utilization factor or score is not the only criterion for fitness value assignment. Hence, the fitness function is evaluated as

Fitness j = score ( j ) × BH ( j ) j th rectangle sequence pattern .
(4)

Both score and BH are crucial in governing fitness function and are directly proportional to the fitness value of the layout.

Improvement on existing genetic algorithm

The genetic algorithm-based approaches such as those by Hopper and Turton (2001), Bortfeldt (2006) and Gonçalves (2007) show that the performance of the algorithm basically depends on the evolution of the rectangle placement sequence. But, in comparison to other approaches, we do not perform any pre-processing like sorting of rectangle based on maximum area, perimeter, etc. The selected MPX crossover as shown in Fig. 9 operation helps us to find a different ordering sequence to determine a better solution, and thus improve the convergence rate of the algorithm towards optimum. Figure 8 shows the various stages in the GPA algorithm. The algorithm has two main computation stages, one for a number of generations which involves the initial population, crossover and fitness evaluation and another for the empty block creation, selection and removal. For each population, the rectangle block placed is governed by simple placement policy. The crossover operation helps us to maintain the ordering sequence, and thus helps to improve the height generation after generation. Each population is assigned a fitness value that helps in further population evolution. Another improvement shown over existing GA algorithm is the reduced computation time to obtain the optimal solution and the ability to handle large instances. In the next section, we further compare our results with the latest algorithms on benchmark dataset (Fig. 9).

Fig. 8
figure 8

GPA algorithm

Fig. 9
figure 9

MPX_crossover

Experiments and results

Parameter selection: the population size is considered as ten with the number of generations 50. The mutation probability is set as low as 0.3. The results from various existing recently and published algorithms are used to verify the performance of GPA on the benchmark dataset. Most data instances used have known optimal solution and zero trim loss. The details of dataset with known optimal height used for comparison are as follows:

Jakobs (1996): two small instances J1 and J2 with the number of rectangles to be placed being 25 and 50, respectively.

Ramesh Babu and Ramesh Babu (1999): a single instance with 50 rectangles to be placed.

Hopper and Turton (2001): test set C containing 21 instances. The instances are divided into seven categories, with each category containing three instances with the number of rectangles to be packed ranging from 16 to 197. These groups are categorized on the basis of similarity in achieving optimum height and container width.

Wang and Valenzela (2001): the dataset contains real values of the rectangle dimension which are rounded down to an integer by multiplying by 10. In “Comparison with genetic based approach”, while comparing with the GA-based approach, we have considered no rounding up odd dimensions. The dataset discusses two different types of instances grouped into two categories of nice and path. Nice contains data with similar dimensions; on the other hand, path has a rectangle with varying dimensions. The rectangle range in both the dataset is from 25 to 1,000.

Burke et al. (2004): Burke generated test instance to test the best-fit (BF) algorithm. The number of rectangles to be placed is subsequently increased from as small as 10 (i.e., N1) to too large as 3,152 (i.e., N13).

Figure 10a, b shows the results of 50 runs of the algorithm, all for a maximum of 75 generations, but terminating if the fitness function attained the value 150 (which is the optimum height) for N9 benchmark dataset. The optimum value was attained in 22 runs of 50. The algorithm gives optimal and suboptimal solution in most of the runs. The value above 153 is found in only one run. The number of generations taken to attain the ‘optimum’ value appears independent of the value of the optimum, but dependent on problem size.

Fig. 10
figure 10

a Number of generations. b Frequency of occurrence of different values of best fitness in 50 runs of the algorithm

Comparison of the proposed approach with the existing heuristic and metaheuristic approach

Table 1 reports the computational results for three different data instances. It shows a comparation table where the performance of the proposed approach is compared to the well-known existing algorithm, like BL-DH, BLF-DH, BF and so on, as discussed in the literature section of the paper. In comparison to many existing heuristic approaches, GPA is able to find the optimal solution for most of the instances reported. On Jakobs and Ramesh Babu data instance, the approach is at par with BBFM Özcan et al. (2013), both producing the optimum results. On C data set instance apart from C2.2, C2.3, C4.3 and C5.3 having a slight gap of one unit from the optimal, the results in all other remaining instances are optimum. It is further observed that GPA outperforms other approaches even for large-scale instances. The results marked in bold shows the distinction for the optimum solution found.

Table 1 Computational results for Jakobs, Ramesh Babu and C test instance

Table 2 shows the result for the Burke dataset N. The proposed approach is compared to 13 instances with the well-known BF approach and other methods. The method BF+SA is considered as the best algorithm among all the variants of BF+metaheuristic, fast heuristic better on N large instances, BBF and its modified version (BBFM). The table analyzes the result on all the 13 instances with respect to the solution found and GPA computation time. BF and BF+SA give nearly the same performance in many instances, whereas FH, BBF and BBFM improve the solution which is furthermore improved by our approach. Not only for small instances the algorithm performs comparatively better, but also for large instances, like N12 and N13, GPA is metaheuristic, is able to find optimum solution and outperform the existing approaches. Figure 11 shows the optimum packing sequence for the N13 instance. Now we consider non-zero waste Valenzuela et al. nice and path instances. The result of comparing the GPA on these non-zero trim losses over the heuristic approach is reported in Table 3.

Table 2 Computational result for test instance by Burke
Fig. 11
figure 11

Optimum packing for N13 (Burke et al.)

Table 3 Computational results for nice and path test instance (Valenzuela et al.)

It is observed among the 12 instances that the reported GPA finds the optimal solution for eight instances. In the entire 12 instances reported, the GPA finds the smallest height and outperforms all the existing heuristic approaches within reasonable time. GPA performed worse only for one instance, i.e., Path 5. The analysis of this worst case behavior for GPA was observed to be due to a large number of small-scale instances and the variation in dimension was quite less. However, on large instances the approach gives an optimal solution. Consider the large non-zero trim loss dataset with real dimensions. Table 4 shows the computational results on NiceL1–NiceL3 and PathL1–PathL3 for FH, GRASP and SVC. As reported, GPA efficiently solves and gives an acceptable performance.

Table 4 Computational results for large test instances

Table 5 makes a comparison against existing approaches in terms of % gap where it is defined as the ratio of (obtained solution − optimal height)/optimal height multiplied by 100. The results are reported for the Hooper and Turner data instance from the literature along with the total number of optimal solutions found. Further, these calculations are used for the statistical analysis of the approach.

Table 5 Performance in terms of % gap and optimum result found

The % gap is computed for well-known techniques from the literature. % gap is computed against different approaches where BF is used coupled with other techniques. BF+SA is one of the most used heuristic approaches that gave comparable results than BS+GA, BS+TS. A nonsystematic search technique like squeaky wheel optimization by Burke et al. (2011), iteratively single constructive heuristic SVC (subKP), reactive GRASP, stochastic approach like intelligent search algorithm (ISA), and IDBS combined with tabu search is also used for the comparison. IDBS is till now state of the art, outperforming the entire algorithm. Our approach finds the optimal solution in 16 out of 21 cases and is far better than existing approaches and at par with IDBS in most of the cases. In instances like C4, C5, C6 (all instances), C7.2, C7.3, the GPA is able to find the optimum height where other heuristic approaches fail. In other cases, the solution is near to optimal and misses only by a single unit. GPA stands second in finding the number of optimal solutions (i.e., 19) after IDBS which finds the optimal result for all the data instances. Our metaheuristic approach is reported based on the average number of runs to find the optimal solution.

Statistical analysis for the heuristic approach

To validate the results, an ANOVA is applied to check if the observed differences between the algorithms are statistically significant. This will help to identify which algorithm and scenarios perform the best. ANOVA works by comparing the variation between groups to the variation within groups. Tukey’s multiple comparison test is one of several tests that can be used to determine which means among a set of means differ from the rest. Tukey’s multiple comparison test is also called Tukey’s honestly significant difference test or Tukey’s HSD.

Figure 12 shows the mean plot and Tukey CI for the evaluated algorithm where the mean values are encircled a and line is used for showing the respective confidence interval. Statistical analysis reveals that the proposed approach significantly differs from almost all the approaches except ISA and IDBS. The computational results and statistical analysis show the acceptable performance of the proposed GPA algorithm.

Fig. 12
figure 12

Means plot and Tukey confidence intervals (CI) for the evaluated algorithms

Comparison with genetic-based approach

The approach being metaheuristic is also compared to similar genetic-based approach based on the relative difference from the optimal solution and a statistical analysis is carried to justify the performance of GPA in the next section. Hopper and Turton (2001) investigated simulated annealing, naïve evolution and GAs metaheuristics approach in combination with the placement strategies of BL and BLF such as GA+BLF, SA+BLF, NE+BLF. Table 6 reports the comparison against such algorithm along with SPGAL, Iori et al. and the Goncalves approach. SPGAL is better and clearly dominates the comparison against the other earlier approaches with the % gap of just 1. HPA gives a better performance, but the result reported is the average result on the basis of the number of runs for each instance. The performance of GPA is best without averaging the number of runs.

Table 6 Comparison of % gap for genetic based approaches for Hooper and Turton test instance

Statistical analysis

Figure 13 shows the statistical analysis of different metaheuristic approaches. GPA shows a vast deviation from the mentioned approaches as it is able to find the optimal result in most of the cases. The plotting also shows that HPA and GPA are statistically not much different.

Fig. 13
figure 13

Means plot and Tukey confidence intervals (CI) for the metaheuristic algorithms

Algorithm complexity

The analysis of algorithms is considered for both space and time. Linear storage space is required for storing the parameters corresponding to the rectangle being packed and current status of the designed layout. The algorithm is analyzed for all the cases. In the best case, the initial placement sequence generated is the required one, thus the complexity of the algorithm is O(1). The algorithm does not use level-oriented packing. The average and worst case behavior where the population is evolved to find the optimal pattern sequence is O(n2).

Conclusion

In this paper, a metaheuristic solution is proposed for the 2D-SPP. The approach couples GA approach with a proposed placement strategy to obtain the optimum solution. To our knowledge this is a first GA-based paper that provides optimal solution for such large instances of dataset. The proposed strategy is simple without inclusion of problem-specific operations. MPX crossover is used to preserve the mutual relation between rectangles and provides sufficient flexibility to search. The performance of metaheuristic is often governed by the selection of initial parameters. However, in this case the selection parameters are not crucial; only the crossover and evaluation of fitness function play an important role in the evolution. On the basis of exhaustive computation carried out on a benchmark dataset from literature, we conclude that the performance is far better in comparison to many known heuristic and metaheuristic approaches discussed in the paper. Our metaheuristic gives high-quality solutions in a reasonable computational time. GPA proves its dominance even in the larger instances. Obtained results motivate the use of these techniques in industries for more economical saving.