Research on Stability of Optimal Sheet-cutting Strategy Based on Improved Real-Coded Genetic Algorithm

. With the increasing advancement of automation, the demand for efficient and versatile sheet-cutting optimization solutions is imperative. In this paper, the real-coded genetic algorithm is employed as the core algorithm to realize the automatic planning system for cutting two-dimensional plates combined with the actual requirement. According to the practical investigation in the building materials market, a certain type of sheet material and the final product model is simulated from the perspective of various requirements in this paper, in which the utilization rates and suppliers’ profits are also calculated and predicted to implement the effectiveness and advancement of the algorithm. The results show that compared with other methods, the optimal sheet-cutting strategy based on improved real-coded genetic algorithm reduces the computational complexity and maintains high stability under the premise of high utilization, which is more appropriate for systems with various product types and quantity constraints.


Introduction
In manufacturing or processing industries, the sheetcutting problem refers to the fact that in the known one or more plates, if some necessary conditions are met, a mass of small objects are placed as much as possible without overlap, thereby making the process of maximizing sheet utilization rate or total value [1]. According to the classification rules of Wäscher and Lodi [2,3], the cutting problem can be divided into one-dimensional(1D) cutting problem, two-dimensional(2D) cutting problem and three-dimensional(3D) cutting problem. Among them, the 2D cutting problem is the most widely used, of which the research is also the most in-depth [4]. According to the shape of the object being cut, the 2D cutting problem can be divided into two types: rectangular workpieces and shaped workpieces (scilicet irregular ones). The study of rectangular workpieces is more fundamental, and in many cases, multiple parts can be regularly placed in a rectangular workpiece by graphic processing technology [5], which can transform the problem of shaped workpiece cutting into a special rectangular workpiece cutting problem. It can be seen that the research on the cutting problem of rectangular workpieces is more indispensable and at the meanwhile, rectangular workpieces are the most common machining workpieces [4]. Due to their strong regularity, it is more necessary to save time and improve efficiency in order to achieve large-scale operation of the factory, which means a more stable algorithm is needed for planning the sheet-cutting strategy.
Nonetheless, in the practical solution, the precise algorithm becomes the most popular algorithm in the early stage with higher optimization results. Liu [6] use Lingo software to optimize the cutting of the board based on multivariate linear programming, and the effect is better from the minimum gap problem. Nevertheless, there are too many combinations of calculations that need to be calculated, which is not conducive to solving the problem when there are too many types of workpieces. Yang [7] proposed branch and bound algorithm for four simple block layout. Pan [8] proposed a simple block angle layout method to construct a dynamic programming generation algorithm, which improved the optimization effect, but the calculation stability was not good. Since the solution space composed of feasible cutting methods is very large, the precise algorithm takes too long to solve large-scale problems, and it is often difficult to meet the practical application requirements.
Chances are the higher computational complexity for this kind of problem is reasonable, which is a complicated NP-complete problem. Later, some scholars proposed heuristic algorithms to seek local optimal solutions, and to improve the calculation speed and stability by sacrificing partial precision. At this stage, heuristic algorithms are mainly based on natural-like algorithms, such as ant colony algorithm, genetic algorithm, simulated annealing, etc. [9]. Pirlot [10] introduces a simulated annealing algorithm to obtain a high-quality solution with high robustness, of which the computational complexity is too large, however. Shao [11] proposed a hybrid heuristic algorithm combining simulated annealing and branch search. Zhou [12] proposed a new HGATS algorithm based on the Memetic algorithm according to the popular NFP strategy. It has made great achievements in cutting path optimization, but it has poor stability in large-scale operations.
In this paper, real-coded genetic algorithm is used as the core algorithm under the guidance of heuristic algorithm, of which the stability under different constraints is considered, and 500 sets of simulation comparison experiments are carried out to prove the effectiveness of the method.

Material and methods
The workpieces are going to be arranged on the board reasonably in this section. Due to the randomness of sheet-cutting strategy, the two-dimensional discharge problem has a high computational complexity. By consulting the data, we found that the strategy can be divided into orthogonal cutting and non-orthogonal cutting [13]. The orthogonal cutting is a cutting method in which the cutting direction is perpendicular to one side and tangential to the parallel side when cutting, which is a common cutting method for processing rectangular workpieces. Therefore, according to the actual situation, it is only considered the case where the long side of the processed rectangular workpiece is parallel or perpendicular to the long side of the plate, that is, the case where the corresponding edge of the workpiece and the corresponding edge of the plate are not considered, so as to simplify our model.
Take the lower left corner of the board as the origin, the long side is the X-axis, and the wide side is the Y-axis to establish the coordinate system. The position of each point on the sheet can be determined by its coordinates (i, j), where i is the distance from the point to the Y-axis and j is the distance from the point to the X-axis. It is assumed that the length and width of the sheet materials and the products are as shown in Tables 1 and 2, so that the position coordinates of each product are integers in the case where the individual workpieces are seamlessly fitted. Table 1. The size of assumed sheet materials.

Sheet Materials
Length/mm Width/mm S 0 3000 1500 In order to accurately describe the situation of the remaining plates after each cut, a matrix of 1500 rows and 3000 columns have been established as Fig. 1. It is assumed that the element of the i-th row and j-th column is ij x , whose value is to represent the state of the small block in 1 with the coordinate of (i, j): I. 0 ij x = indicates the piece of block has been cut.

II.
1 ij x = indicates the piece of block has not been cut and may still be used in the following process.
III. Elements in the initial matrix are all 1, indicating that the entire sheet has not been cut.
The state of each cut can be represented by a fourdimensional vector , where ( , ) i j is the coordinates of the lower left corner of the cut, and i ∆ and j ∆ are the cut lengths of the cut in the direction parallel to the X-axis and the Y-axis, respectively. Therefore, the conditions that the lower left corner coordinates need to satisfy can be expressed as: The change in the state of the remaining board can be indicated by assigning the element mn x whose range of ( , ) m n is within to a value of 0.
Hiams and Freemam's regular methods are often used for rectangular nesting when the number of parts to be spared is not limited, which means that the rectangular part is placed at one corner of the slab at each step [14]. According to this theory, the workpieces are placed as far as possible in the lower left position of the sheet, that is, move a workpiece down as much as possible (not coincident with the already cut part), then move it as far as possible to the left, then down, then left. Until it can't be moved, and its final position is represented by its lower left corner coordinates. When placed, if a workpiece inevitably overlaps the cut portion, the block is temporarily not placed and the next model is tried until the workpiece cannot be placed.
In this case, it is only necessary to determine the horizontal and vertical arrangement of the placed workpiece to determine the cutting condition of the last sheet-cutting strategy. Thus a one-dimensional vector can be employed to represent the arrangement of the i-th workpiece, with 0 indicating that the workpiece is cut transversely, and 1 for vertical cutting. By replacing the above-mentioned four-dimensional vector with a onedimensional vector, the problem is greatly simplified, which provides us with the possibility to establish a sheet-cutting planning model based on improved realcoded genetic algorithm.

Real-coded Genetic Algorithm
The process of settling the optimization problem is to select the optimal solution from a multitude of solutions, which is very similar to the process in which the "survival of the fittest" in biological evolution makes it possible for the optimal chromosome to have a better chance of being preserved. In the above process, interpretation of related concepts of genetic algorithms is showed in Table 3. Table 3. Application of biological genetic concept in real-coded genetic algorithm. Therefore, real-coded genetic algorithm is employed with the principle of "survival of the fittest". According to the selected fitness function, it is screened by natural selection, inheritance, crossover and mutation, and the individuals with higher adaptability are retained. The genetic algorithm can jump out the local optimal solution with probability 1 for the nonlinear extremum problem and find the global optimal solution, in which the jumpout characteristics is based on the crossover and mutation selection in the algorithm. In the traditional genetic algorithm, the mutation operation is emphasized based on the crossover operation. In this paper, the mutation operation is stripped from the crossover operation to make it independent and juxtaposed in the crossover optimization operation. The specific steps of the model establishment are as follows: Step 1. Parameters setting. Set the parameter values required by the model, that is, define the population number as M, the chromosome coding length as L, the maximum evolution algebra as G, the genetic crossover probability as pc, and the mutation probability as pm.
Step 2. Chromosome coding strategy. For chromosomes, binary coding is used, with 0 indicating that the workpiece is cut transversely, 1 for vertical cuts, and random numbers for chromosomes; each random sequence corresponds to each individual in the population.
Step 3. Initialized population creation. The initial population M group is randomly generated according to the roulette method.
Step 4. Population fitness function setting. In order to ensure the utilization of the board, we need to set the corresponding fitness function and select the combination with the highest utilization.
Step 5. Select operation. A deterministic selection strategy is adopted, in which the M individuals with the largest target function value are selected to evolve into the next generation in the parent population and the offspring population, thus ensuring that the superior characteristics of the father are preserved.
Step 6. Crossover and mutation operation. Using a single-point crossover, the principle of "doorto-door" is used to sort the fitness function values of the parent, and the fitness function values are small and small, large and large. The chaotic sequence is then used to determine the location of the intersections, and finally the intersecting terms are crossed. After that, selecting genes according to a given mutation rule for mutation, and using chaotic sequences to change genes at these two positions into new gene values, thereby obtaining new chromosomes. Although the amount of workpieces does not necessarily reach 60, the final set of chromosomes under such conditions may not necessarily affect the distribution results, so such genetic code length setting is reasonable. In order to reflect the fitness of the population through a specific numerical value, we need to set the fitness function to reflect the utilization of the plate:

Related parameter settings.
i X in the formula is the corresponding individual, and N is the maximum number of workpieces that can be arranged in the arrangement. The larger the value of ( ) i f X , the higher the fitness of the individual. Based on the above basic methods, we have done the following five cases of experiments from the simple to the complex, as showed in Table 4. Table 4. Description of five cases of experiments.

Case I.
Cutting a workpiece on a plate to give the highest cutting efficiency.

Case II.
Cutting two kinds of workpieces on one plate, giving the cutting plan with the highest utilization rate of the plates.

Case III.
Given the number of two kinds of workpieces, the number of plates is not limited, giving the cutting plan with the highest total utilization rate of the plates.

Case IV.
Given the number of four kinds of workpieces, the number of plates is not limited, giving the cutting plan with the highest total utilization rate of the plates.

Case V.
Given the number of plates, the number of each of the four workpieces is not limited, giving the cutting plan with the largest total profit. In the case where the product type is not unique, the rule that prioritizes the workpiece to the lower left is still valid. However, in this case, the values of i ∆ and j ∆ will change, because each type of workpiece has two layouts, and there are 2n possible arrangements for n workpieces. Thus  is defined to represent the arrangement of the i-th workpiece, which will be discussed based on Table 5. Due to the increasing number of workpieces, in order to accurately reflect the utilization of the plates, the fitness function Equation (2) needs to be revised to: i X is the corresponding individual, and k N is the maximum number of workpieces in the case where i Ar is k-distributed when the workpiece can be normally arranged. The larger the value of ( ) i f X , the higher the fitness of the individual will be.
When considering the profit of the cutting plan, we still need to revise the corresponding fitness function as follow: Pr in the formula is the profit of the workpiece corresponding to the arrangement. Obviously, the fitness function intuitively reflects the utilization rate of the sheet, the higher the utilization rate of the sheet, the larger the value of the fitness function, and the better the individual. With the constant correction of the fitness function, the method can be applied to various situations.

Results
In view of the five situations mentioned above, MATLAB software is employed in this paper to carry out experiments based on the improved real-coded genetic algorithm. The effect of sheet metal cutting is shown in Fig. 2. In the Fig. 2, blue indicates that the portion on the sheet is cut as workpieces, while the yellow portion indicates the trim. The improved real-coded genetic algorithm can directly work out the number of various workpieces and the final utilization rates. In the first case, the number of W1 that can be cut on single one plate is 59, and the utilization rate of the plate is 98.30% at the maximum. In the second case, the number of W1 and W3 is 23 and 26 respectively, and the utilization rate of the board can reach 92.04%. In addition, the total utilization rate of the plates in the remaining three cases reached 82.91%, 83.36%, and 88.00%, respectively, and the total profit of the last case was 86,750 dollars.

Discussions
It can be seen that when the plate and the workpiece are both rectangular, the total utilization rate of the single workpiece for cutting the plate is the highest, which can reach 98.3%. In the process of cutting different workpieces, in order to carry out the directness of the calculation results, the utilization rate has been sacrificed slightly, but it can still be maintained between 80% and 90%.
In the case where the workpiece type is not unique, the values of i ∆ and j ∆ will change, which means that there are 2n possible arrangements for n workpieces. Then  is employed to represent the arrangement of the i-th workpiece as stated in Table 5. In the case of the four types of workpieces considered in this paper, the value of i Ar has a total of 8 values from 1 to 8. In this way, we only need to consider the size of the workpiece and the order of the horizontal and vertical, and then calculate the final position of the lower left corner of the workpiece, which will determine the cutting condition of the unique sheet. It is also on this basis that we have modified and set the relevant parameters of the optimized layout model based on improved real-coded genetic algorithm.
Furthermore, this paper has also made 100 group comparison experiments for each case, and the results all express the applicability and stability of the method, which is shown in Fig. 3 and Table 6. It can be clearly seen from the Fig. 3 that for each of the five cases, the fluctuation is relatively gentle which means excellent stability, to be more specific, some statistical parameters such as Range, Standard Deviation and Average Deviation are summarized in Table 6. The Range is used to indicate the amount of variation in the statistics, that is, the maximum value minus the minimum value, which is the maximum range of the change in the data set.
The Standard Deviation is most commonly used in probability statistics as a measure of the degree of statistical distribution. It is the square root of the arithmetic mean of the square of the unit value of the population and its mean square, reflecting the degree of dispersion between individuals within the group and the stability of the data.
The Average Deviation is one of the values indicating the degree of difference between the values of the respective variables, and refers to the arithmetic mean of the absolute values of the deviations of the values of the respective variables and the average. The larger the value is, the more the difference between unit values in data set will be.
Apparently, all the values of Standard Deviation and Average Deviation are less than 0.01, which is a very small value, and this is consistent with the conclusion we obtained from reading the Fig. 3. To further indicate the problem intuitively, the box plots of the data distribution in the five cases is shown in Fig. 4. Obviously, except for the special first case, the other data distributions are very similar in their respective value ranges, which means that the transformation is consistent with all the above analyses. In addition to the stability of each calculation result, there is one more point worth discussing, that is why the utilization rate of Case V ranks third in these five cases? Obviously, with the increase in the number of processed workpieces, in order to ensure the stability and applicability of the algorithm, the utilization rate is inevitably decremented, but in the Case V considering all four kinds of workpieces, it can exceed the Case III and Case IV.
It is because the unique operation for Case V, the revision of corresponding fitness function considering the profit of each workpiece, like Eq. 4. After that, the biggest profit has become a new planning goal, so the fitness function is changed to select the individuals with higher profits to enter the genetic process.

Conclusions
In this paper, the research on automatic planning of sheetcutting strategy based on improved real-coded genetic algorithm is carried out. In order to express a piece of workpiece on a sheet in mathematical language, a 2D sheet-cutting planning model is established. The cutting situation is represented by a four-dimensional vector, which is reduced to a one-dimensional vector in combination with reality. Then, considering the defect that the traditional optimization algorithm is easy to fall into the local optimal solution, the real-coded genetic algorithm is employed as the core idea to establish an optimal layout model to find the optimal planning strategy. The algorithm is also modified for multiple models, quantity limits, and profit considerations.
The results emphasize that the proposed algorithm has excellent stability and applicability, and can be applied to systems with various product types and quantitative constraints, which has a wide range of applications. Through reasonable assumptions and constraints, many unreasonable situations are eliminated, the calculation rate is increased, and then the utilization rate of the plate can be maximized to some extent. The idea of using genetic algorithm reduces the complexity of the operation, and it also has a good solution convergence for largescale engineering problems, and a satisfactory solution is obtained.
Nevertheless, the main problem and drawback is that the algorithm in this paper is only suitable for the cutting of rectangular workpieces with orthogonal cutting method. It is not applicable for workpieces that need to be chamfered and not rectangular. At the meanwhile, the thickness of the material, the texture, and the width of the slit are not taken into account.
In subsequent studies, the value of i Ar can be gradually upgraded to characterize the cutting angle of the workpieces of different shapes on the plates, which can be applied to more situations.