An adapted particle swarm optimization approach for a 2D guillotine cutting stock problem

– This paper focuses on the two dimensional rectangular non-oriented guillotine cutting stock problem in which pieces with diﬀerent dimensions need to be cut with diﬀerent quantities in order to satisfy customers orders. In order to optimize the raw material utilization, make-to-order and make-to-stock production strategies are combined by considering forecast plans with inventory constraints in addition to ﬁrm orders. An adapted version of Particle Swarm Optimization approach is proposed and combined to a hybrid heuristic. Results show that the proposed algorithm outperforms the hybrid heuristic in a reasonable computational time.


Introduction
The two-dimensional rectangular cutting stock problem (CSP) is the problem of cutting required number of small rectangular pieces of different sizes from a set of rectangular sheets at a minimum sheet cost.A solution of the CSP consists of several cutting patterns that are generally designed by solving corresponding cutting problems (CPs).Therefore, several researches solve the CSP by dividing it into different sub-problems formulated as CPs [1].The CP is defined as the problem of finding the best cutting pattern that maximizes the sum of the profit of small rectangles (pieces) obtained from a large rectangle (sheet) [1].Different sorts of CSP are considered in the literature with respect to the studied case and corresponding constraints.In this paper, the interest is focused on treating the problem encountered in the lumber industry, that is defined as a guillotine non-oriented unweighted problem [2].The cutting tool thickness represents a major constraint that should be considered in the lumber industry when designing patterns.However, this constraint is neglected in almost all formulations proposed in the literature of CSP, leading to unfeasible patterns when the cutting tool has a non-negligible thickness.
In industry, the CSP is considered at the beginning of each planning time period.This may result in excessive wastes through a time horizon.To deal with this issue, researches propose the reuse of residual plates (leftovers) a Corresponding author: omar.ayadi@yahoo.frfrom sheets cut in previous periods [3][4][5][6].Although these efforts allow interesting saving of raw material, this technique remains impractical in the lumber industry.In fact, holding and inventory management of residual lumber plates necessitates important spaces and costs as well as specific storages.In addition, long residual plates can be affected by plastic deformation caused by bending if they are stocked for long periods in inappropriate storages.A suitable solution is proposed in [2,7] for this problem, consisting of combining the make-to-order and the make-to-stock demand management policies in the CSP.This solution considers a multi-period planning with a rolling horizon, in which pieces to be cut in each period should fulfill firm orders and optimize the use of raw material by integrating forecast plans.Thus, sheets used in each period are totally cut; and instead of stocking residual plates, pieces belonging to forecast plans of future periods are generated.This issue leads to saving raw material, optimizing holding and inventory operations and avoids setup costs related to the reuse of leftovers.A hybrid heuristic combining the bottom left and the shelf algorithms is proposed in [2] in order to solve this specific problem.The proposed heuristic yields better results than the shelf algorithm, and it is shown that the integration of forecast plans improves the raw material use.However, the authors say that the proposed approach fails to generate high quality solutions for some cases, necessitating the improvement of optimization process.Since the CSP belongs to NP-hard problems [8], approximate algorithms should be adopted in order to generate solutions satisfying industrial needs, in reasonable computation time, especially for large instances.Different heuristics are well addressed in the literature of CSP, such as tabu search and simulated annealing.The reader can refer to [9,10], cited here as examples of corresponding research works.However, the Particle Swarm Optimization (PSO) approach seems to be less investigated in this research field [11].Recent publications show few efforts conducted for applying PSO to one dimensional and two dimensional CSPs [12][13][14].
In this paper, a new algorithm is proposed in order to effectively solve the CSP encountered in lumber industry.The proposed approach is a combination between PSO and the hybrid heuristic developed in reference [2].The cutting tool thickness constraint is integrated to the problem formulation.The approach is applied to instances of the computational experiments considered in reference [2] and corresponding results are compared with the obtained ones.
The remainder of the paper is outlined as following.Section 2 presents the mathematical formulation.The algorithm combining hybrid heuristic and PSO approach is detailed in Section 3. Section 4 addresses computational experiments as well as corresponding results and comparison with published ones.Section 5 draws some conclusions and proposes future work directions.

Mathematical formulation
The studied CSP considers a multi-period planning with a rolling horizon.The problem is formulated for each time period t considering the inventory level of previous periods and forecast plans of future demands.Forecasts are represented by a threshold level for each piece type that should not be exceeded for inventory management purposes.It should be recalled that the main objective of integrating forecasts in CSP is the optimization of raw material use.It is assumed that all sheets have same dimensions and are available with unlimited quantity.
Let's consider the following notations: -Symbols: For each time period t, R wt : waste rate A sht : used sheets' area A pit : total area of pieces to be cut p jt : total number of pieces from the jth type to be cut d jt : net-order corresponding to the jth piece type The mathematical model of the considered CSP is formulated for each time period as following: Subject to See equations ( 6) and ( 7) next page.
Equation (1) expresses the objective function minimizing the total waste rate of the solution corresponding to each time period.The total waste rate is identified from the used sheets' area and the total area of pieces to be cut, that are respectively calculated using Equations ( 2) and (3).Inequalities (4) and ( 5) guarantee the orders fulfillment without violating inventory thresholds.Inequalities ( 6) and ( 7) fulfill the patterns feasibility with respect for each designed pattern to pieces and sheets dimensions, taking into account the cutting tool thickness.Equation ( 8) identifies the exact number of pieces to be cut from each type with respect to net orders calculated in (9) and forecast plans.Equation (10) calculates the inventory level at the beginning of the considered period.

Proposed resolution approach
The proposed approach generates optimized patterns that fulfill customer orders with respect to the formulation shown in Section 2. The approach consists of adapting PSO to the considered problem and combining the adapted version with a hybrid heuristic proposed by reference [2].In the following subsection, the algorithm steps will be presented and the proposed approach will be explained.The PSO adaptation will be detailed in Section 2.

Description of the algorithm
The different steps to solve the considered CSP are summarized in the flowchart of Figure 1.After reading the problem parameters and choosing PSO ones in the first step, pieces dimensions as well as corresponding ordered quantities and inventory levels and thresholds are collected in a matrix arranged with respect to the pieces decreasing height order.In the third step, net orders are calculated before initializing the vacant rectangles list in the fourth step.
Step 5 corresponds to the resolution of cutting problems representing sub-problems of considered CSP.The combination of PSO and hybrid heuristic concerns this main step of the algorithm.The idea consists in generating patterns using the hybrid heuristic following a pieces allocation priority defined by an adapted version of PSO approach.A particle is so represented by a reading vector containing the pieces types references ordered with respect to a specific allocation sequence.Since the considered CSP is a non-oriented problem, each piece can be allocated following two possible orientations.So, the proposed particle size is equal to 2 m t N max components, where N max = Ent(H/ min j∈{1,...,mt} (w j )).Each reference appears in the reading vector N max times for the first orientation and N max times for the second orientation.The pattern corresponding to a particle is designed through the allocation of the first pieces than can be integrated to a sheet following the hybrid heuristic.An equal number of pieces types references' appearances is chosen for each particle in order to guarantee an equi-probable affectation of the pieces types.
Step 5.1 represents the initialization stage, in which the first particle is defined.The corresponding reading vector follows the decreasing pieces' height order.It is composed of the m t N max references considered in the initial orientation followed by the same m t N max references considered in the second orientation and indicated by the addition of the imaginary number 90i that is added to each reference.
Step 5.2 corresponds to the definition of the first swarm through the particle dispersion.The order of the initial reading vector components is randomly dispersed in order to generate a fixed number of different particles.
In Step 5.3, patterns are designed on the basis of the different particles and corresponding waste rates are calculated.After the comparison of obtained solutions, the best solution is identified as the solution with the minimum waste rate.Two stop criteria are considered for the optimal pattern design procedure: reaching a pre-defined number of iterations or finding the same waste rates for all particles.If the stop criteria are not activated, the algorithm swops to Step 5.4.This step corresponds to the update of the particle swarm by applying adapted PSO operators.Each particle is represented, at this step, by its position (associated reading vector) x d and is updated using formulas (11) and (12); where v d is the particle velocity, c 1 , c 2 and c 3 are real parameters comprised between 0 and 1, p d is the best known position of particle d and g d is the best known position of the entire swarm.
The design of patterns corresponding to particles follows a procedure inspired and adapted from the concept of "available rectangles" [2,7].This procedure is based on dividing the pattern into different shelves and to affect pieces in available rectangles belonging to the shelf situated as bottom as possible.Table 1  1.Before affectation of piece #3, the pattern contains 3 available rectangles: R1, R2 and R3.

Affectation of piece #3 to R2
Substitute R 2 by R 4 and R 5 .

Test of inclusion
the rectangle R 4 is included in the rectangle R 1 R 4 is deleted.the rectangle R 5 is included in the rectangle R 3 R 5 is deleted.

4.
Vertical overlapping test R 1 vertically overlaps piece #3.Substitute R 1 by R 6 and R 7 (there is no need to create a 3 rd rectangle over piece #3 since it will necessarily be included in another rectangle)

Horizontal overlapping test R 3 horizontally overlaps piece #3
Substitute R 3 by R 8 , R 9 and R 10 .

5.
Inclusion test R 9 is included in the rectangle R 7 R 9 is deleted.

Final state
After the affectation of piece #3, there are 4 available rectangles: R 6 , R 7 , R 8 and R 10 .

Definition of adapted operators
The up-date of a particle in Step 5.4 necessitates the adaptation of mathematical operators of PSO to the considered CSP.Let's consider the following example of two particle positions x 1 and x 2 representing three pieces references for a problem in which This example will serve to illustrate the significance of proposed operators, following the considered adaptations.

Velocities addition
The addition of two velocities v 1d and v 2d multiplied by corresponding c j parameters is encountered in the definition of the particle velocity.The principle of this addition is given by formula (14):

Addition of a position and a velocity
The principle of adding a position to a velocity, as in formula (12), is given by formula (15): Let's consider velocity v d = x 3 .The application of this operator to the illustrative example yields the position x 4 :

Computational experiments
Height instances from reference [2] are considered for the experimental study.The instances are randomly generated with a number of piece types between 2 and 18, pieces heights and widths between 150 and 600 mm for each type and the firm order of the initializing period between 1000 and 20 000.Three categories are considered with respect to demand evolution through the time horizon: instances #1, 2 and 3 are characterized by increasing trends, instances #4, 5 and 6 by decreasing trends and the orders of instances #7 and 8 have variable evolution.For each instance, 12 periods representing the time horizon are considered and the sheets dimensions are fixed to 2500 mm × 1850 mm.The cutting tool thickness e is assumed to be equal to 2 mm.Three sets of tests, labelled FSD1, FSD2 and FSD3 respectively, are considered for each instance.The tests sets differ in the First Swarm Definition (Step 5.2), by modifying the dispersion principle of the initial ordered particle: -FSD1: The particles of the initial swarm are obtained through a completely random dispersion of the initial ordered particle components.-FSD2: The particles of the initial swarm are obtained in two steps: a completely random dispersion of the initial ordered particle components, followed by the addition of the reference of the piece characterized by the biggest area to each particle as its first component.The corresponding reference is affected following its initial orientation for the first E/2 particles, and rotated by 90 • for the last E/2 particles, where E represents the swarm size.-FSD3: In this set, the first two components of each initial swarm particle are fixed to the piece reference characterized by the biggest area.A decrease of the optimization process intelligence is also considered in the random generation of particles in this tests set.
For all considered tests, the PSO parameters are fixed to the ones suggested by [15] and shown in Table 2. Tables 3 to 10 present the results of the tests for the considered instances for each time period.For each test, the tables show the waste rate, the number of used sheets as well as the computational time.Corresponding results obtained by applying the hybrid heuristic (HH) proposed by reference [2] are also reported in Tables 3 to 10 in order to compare the results of the developed approach with the literature.Table 11 summarizes the whole time horizon performances for each considered instance and each test set.Reported performances concern the number of used sheets (NUS ) as well as waste rate average (R w ) and corresponding improvement percentage (ImpR w %) compared to the results of the HH.Best results are highlighted in bold type.The last column of Table 11 gives the total waste rate corresponding to all instances for the whole planning horizon considering the HH (8.62%) and the best results obtained by applying the developed approach (4.68%).Figures 2 and 3 illustrate a graphic comparison of the horizon performances corresponding to the different resolution approaches.
Results show that the developed approach outperforms the HH by reducing the total waste rate from 8.6% to 4.7% (cf.Table 11), in a reasonable computational time (less than 70 s for each considered test; cf.Tables 3 to 10).Except instance #1, the developed resolution approach yields better performances than the HH developed by reference [2].In fact, based on results shown in Table 11, the improvement of corresponding waste rates average varies from 23.1% (instance #5) to 55.37% (instance #4) with respect to the considered instance, compared to the one generated by the HH.Corresponding waste rates are comprised between 3.2% (instance #3) and 6.1% (instance #8) counter a waste rate generated by the HH comprised between 7% (instance #5) and 11.5% (instance #8).
Moreover, results show that the best performances are obtained using the proposed approach with the second and third initialization principles (FSD2 and FSD3).These two initialization principles force the algorithm to use biggest area pieces in the first patterns.This decreases the algorithm intelligence when designing the first patterns in order to favor a global optimization of the problem by conserving small pieces -when they exist -to be cut in the last patterns.This assertion is supported by the results of FSD1 tests.In fact, by analyzing corresponding patterns, we observe that the first generated patterns are well optimized using small pieces whose net orders are fulfilled by sheets cut following these patterns.However, the last generated patterns are characterized by high waste rates since the number of small pieces becomes limited, thus limiting the optimizing configuration possibilities and leading to high total waste rates.Concerning instance #1, the developed approach generates a higher waste rate (equal to 8.8%) than the one obtained using the HH (equal to 6.4%).This can be explained by the fact that this specific instance contains only two pieces references while the number of pieces references is comprised between 6 and 16 for the rest of instances.Indeed, when the number of pieces references is limited, the random dispersion of particles may generate, in the inner of patterns, some vacant rectangles that cannot include any piece, thus increasing the total waste rate.These rectangles can be useful for the optimization of the raw material use in case of instances with several pieces dimensions as in Instances #2 to #8.However, the HH juxtaposes pieces from the same reference without creating inner wastes.This heuristic should so be more appropriate for instances with limited number of pieces references.

Conclusion
In this paper, a new algorithm is proposed in order to effectively solve the CSP encountered in lumber industry in the context of a multi-period planning with a rolling horizon.PSO approach is adopted with an adaptation of corresponding operators to the considered problem.An adequate combination between adapted PSO and a published hybrid heuristic (HH) is proposed.Three versions of the proposed algorithm are defined with different initializing principles.
Computational results prove the efficiency of the developed approach compared to the HH in almost all tested cases.Based on these results, the proposed algorithm outperforms the HH by reducing the total waste rate of considered instances from 8.6% to 4.7%, thus yielding an improvement of 45% in the performances.The total number of sheets used throughout the planning horizon is also reduced from 260 604 sheets using the HH to 248 329 sheets using the proposed approach.
As future work, we propose to adapt the proposed approach to non-guillotine cutting stock problems.Another interesting issue consists of combining the considered multi-period planning CSP with lot sizing problems.This can be studied by optimizing total production cost

Table 1 .
presents an example of a piece affectation in order to illustrate the procedure of available rectangles list update.The optimal pattern designed in Step 5 is reconsidered with the maximum number of copies respecting inventory related constraints in Step 6.After that, net orders and inventory threshold levels are updated in Step 7. Steps 5, 6 and 7 are then repeated until fulfilling firm orders.Example of piece affectation and available rectangles update.

Table 11 .
Horizon performances of HH vs. proposed approach.