Batch optimization of rectangular parts

: In the field of modern industry, cutting material for industrial manufacturing essential basic process. In recent years, in order to meet the needs of national industrial development, the research on cutting has made rapid progress. Due to the different demands of different orders in the process of product production, and the cutting and cutting need to meet the constraints of "simultaneous cutting". Aiming at the common batch optimization problem of square parts, this paper mainly focuses on the two-dimensional three-stage shearing and cutting problem, aiming to minimize the use of original pieces and the lowest utilization rate of original pieces. By using genetic algorithm, product items or strip arrangement schemes are numbered to form chromosomes. Secondly, by initializing the population, evaluating the fitness of individuals in the population, selecting, crossing and other steps, Select the best layout solution. Finally, through the utilization rate of the original sheet, it is proved that the method proposed in this paper can effectively solve the typesetting problem of square parts, improve the utilization rate of raw materials, and improve the production flexibility to a certain extent.


Introduction
The manufacturing industry often encounters the problem of material segmentation, and square parts layout is the most common. Effective layout can not only improve the utilization rate of materials, but also simplify the cutting process [1] . The increase in the types of parts may improve the material utilization rate due to the combination of material cutting. The integration of multiengineering and multi-task large-scale parts for centralized cutting can obtain better economy [2] . The problem of square layout is a resource optimization problem. The purpose of optimization is to rationally plan the layout of square parts on the board, so as to reduce the waste of the board in the blanking process and simplify the cutting process. According to the size and number of square parts in the same production batch, select the specification and number of the original sheet, optimize the blanking layout, and maximize the utilization rate of the original sheet. A good blanking scheme meets three requirements under the conditions of production capacity: first, it should maximize the utilization rate of raw materials, i.e. the minimum amount of raw materials; Secondly, different feeding methods are required as little as possible; Also meet the respective lead times for each part [3] . Blanking problems generally exist in the production process of glass, steel plate, wood, paper, clothing and ship industries. According to the dimensions of raw materials and parts, blanking problems can be divided into one-dimensional, two-dimensional and three-dimensional blanking problems. Among them, one-dimensional blanking problem refers to the blanking of profiles and bars, three-dimensional blanking problem refers to the length, width and height of raw materials and parts have specific requirements [4] . The two-dimensional blanking problem mainly refers to the blanking of the plate, and all kinds of blanking parts are cut from the plane raw materials, so that the utilization rate of materials is the highest. In terms of computational complexity theory, two-dimensional blanking problem belongs to a class of optimization problems with the highest complexity: NPcomplete problems [5] . In the modern era of economic globalization, especially the cold development of the global steel industry affected by the COVID-19 pandemic, it is the only way for the current steel manufacturing industry to make reasonable and feasible cutting of existing raw materials and reduce production costs as far as possible, including raw materials, manpower and manufacturing time consumption, on the premise of meeting the demand of orders.
Therefore, improving the utilization rate of materials is the focus of current research. At present, the effective algorithms proposed by scholars at home and abroad can be roughly divided into two categories: one is heuristic algorithm, such as the knapsack algorithm proposed by Cao Ju [6] , Huang Wenqi proposed a heuristic algorithm based on the idea of occupying points [7] , Jia Zhixin proposed the lowest level emission algorithm. [8] All of them have achieved good results. Another kind of algorithm is mainly using modern intelligent algorithms, such as genetic algorithm, simulated annealing algorithm, ant algorithm, particle swarm algorithm and so on [9][10] .

1)
Only consider the head-to-head cutting mode (straight cutting, cutting direction perpendicular to one edge of the plate, and ensure that each straight cutting plate can be separated into two pieces); 2) The number of cutting stages shall not exceed 3, and the direction of cutting is the same at the same stage and the number of cutting knives is not limited; 3) Layout method is accurate layout; 4) Assume that the original sheet has only one specification and sufficient quantity; 5) The layout plan does not take into account the effect of the width of the saw seam (i.e. the width of the slit cut).
6) The delivery time of all orders is the same without distinction.

Represents the width of the original sheet
Cutting blanking is essentially an optimization problem considering the sorting of blanking schemes, and cutting blanking needs to meet the constraints of "one size fits all", it must be optimized for the sorting of blanking schemes, through the reasonable sorting of product items on the plate. In the optimization process, it is necessary to minimize the use of the blanking sheet, so that the subwood can be concentrated in a few blanking schemes. According to these characteristics, the multi-objective optimization problem of cutting materials was transformed into a single-objective optimization problem for solving, and the optimization objective of the blanking problem was set to minimize the number of schemes, as follows: Objective function: min (3) Formula (1) is the objective of optimization, that is, it requires the least amount of original plates consumed. (2)-(5) are the constraint conditions, where: (2) represents that the arrangement modes i and j on any two plates are not overlapping; Formula (3) represents the use times of the original layout mode of the j plate as mj, where mj is the integer decision variable; (4) Formula represents the total number of product item i; Formula (5) indicates that the premise must be satisfied.

Algorithm design
The following is a brief introduction of some common algorithms to solve the rectangular strip layout problem.
1) The search algorithm based on the lowest horizontal line is one of the earliest and most widely used heuristic algorithms for solving rectangular strip layout problems. Bottom-up left-justified has two obvious disadvantages [11] : One is that some particular problems cannot be solved optimally; second, it is easy to produce the left side of the high result.
2) Heuristic recursive algorithm is a very effective algorithm proposed by Zhang Defu [12] . In this paper, a heuristic strategy is used for the product item discharge, and the recursive idea is used to divide the space, and the problem is decomposed into a set of layout problems and rectangular layout problems.
3) Branch and Bound recursive algorithm is based on the partition idea of solving strip layout problem recursively. Cui Yaodong [13] proposed an algorithm combining branch and bound method with recursion idea to solve rectangular strip layout problem. When the product item is discharged on the plate original, the branch and bound method is used to limit and constrain the product item emission, so as to improve the efficiency of recursive operation. Figure 1: Flowchart of the overall process of genetic algorithm 4) Genetic Algorithms [14] (GA) is a kind of self-organizing and adaptive artificial intelligence technology inspired by Darwinian evolution-survival of the fittest. It simulates the process and mechanism of biological evolution in nature and solves problems. In essence, it is an efficient, parallel and global search method, which can automatically acquire and accumulate knowledge about search space in the search process, and control the search process adaptively to obtain the best solution. In Output the optimal parameter sample value End i=i+1 N N Y the genetic algorithm, a number of numerical codes, namely chromosomes, are generated randomly to form the initial population. A numerical evaluation is given to each individual through fitness function, and individuals with low fitness are eliminated, while individuals with high fitness are selected to participate in genetic manipulation. After genetic manipulation, the collection of individuals forms the next generation of new population. And then we move on to the next evolution of this new population.
Based on the logic of this paper, we choose genetic algorithm. The specific process is shown in Fig 1. 6. Case application

Problem analysis
In the square batch optimization problem, that is, the blanking optimization problem, the main research is how to reasonably arrange the position of the product on the plate, so as to establish a reasonable programming model. n square pieces of li*wi with the original size of 2440*1220 (mm 2 ) are cut from m pieces. And I want m to be as small as possible without being able to cut n.  A preliminary analysis of plate data set C was conducted, and the results were shown in Table 2.

Preliminary data processing
By unifying the units of length and width of the products in each list in dataset C as (m), find the area of each square component as S. Sorted by product area, the results are shown in Table 3.

The validity and complexity analysis of the model
Effectiveness of genetic algorithm: 1. Genetic algorithm does not have too many mathematical requirements for the optimization problem solved. Due to its evolutionary characteristics, it does not need the intrinsic nature of the problem in the search process, and can handle any form of objective function and constraint, whether linear or non-linear, discrete or continuous. 2. The aergodic properties of evolutionary operators enable genetic algorithms to carry out probabilistic global search very effectively. 3. Genetic algorithm can provide great flexibility to construct domain-independent heuristics for various special problems, so as to ensure the effectiveness of the algorithm.
Complexity of genetic algorithm: Genetic algorithm is a double iteration, its time complexity is not more than n square genetic algorithm is a global optimization probabilistic algorithm. Space complexity: It is the extra storage space required by the program to run. General recursive algorithms will have o (n) space complexity. Simply put, recursive set calculation is usually repeated calls to the same method, recursion n times, it needs n space. Time complexity: The time taken by an algorithm is directly proportional to the number of statements executed in the algorithm. The algorithm with more statements executed takes more time. The number of statements executed in an algorithm is called statement frequency or time frequency.
The whole idea of this algorithm is genetic algorithm. The advantage of this algorithm is that it is easy to think about, but the disadvantage is that it is difficult to implement, especially in the face of large data sets need to consider many possible situations. The order of objects is very important when genetic algorithm is used to solve the model, which directly affects the result index. This algorithm is the most friendly to the primary goal, if the primary goal is used as the standard to measure the solution result, then the result can be perfect. However, it is not very friendly to the secondary goals and the later planning goals, and can only get the near optimal solution. The time complexity of the algorithm reaches o (n2), and the best case is o(n). The running time of the program on set C data is about 20 minutes.

Numerical result
The partial plate cutting of data set C is shown in Fig. 2. Partial results of plate data set C are shown in Table 3.

Further analysis
During the processing of data set C, there are no restrictions on orders, and the same order can be in different batches. On this basis, further constraints were added to establish a mixed integer programming model. Therefore, all orders in another set of sheet data set D were grouped, and then each batch was arranged independently. In order to meet the order requirements and related constraints, the consumption of sheet original was minimized. The requirements are as follows: 1) If and only if each order appears in one lot; 2) Only items of the same material in each batch can use the same sheet original for layout; 3) To ensure the rapid flow of processing links, the total number of items in each batch should not exceed the limit value; 4) Due to the limited capacity of the factory, the total area of each batch item shall not exceed the limited value; 6.6 New problem solving 6.6.1 Preliminary data processing Data set D is preliminarily analyzed, and the results are shown in Table 4: Unify the units of length and width of the products in each list in the data set D as (m) and find the area of each square component as S. Sorted by product area, the results are shown in Table 5.

Establish the optimization model
Order group batch, the material in each batch is required to be the same, according to statistical analysis, there are 220 material orders in the data set, the batch should be greater than or equal to 220.
Objective function: min j1 W j zy    (6) s.t. (8) Where yi represents the number of plates consumed in the order of batch j. The model of the initial problem is adopted to obtain the optimal layout result. Mi represents the number of product items in batch j, gi represents the area occupied by product items in plate i,

Model validity and complexity analysis
The time complexity (also known as time complexity) T (n) of an algorithm is the time consumed by the algorithm and a function of the size n of the problem solved by the algorithm. When the size n of the problem approaches infinity, the order of magnitude (order) of the time complexity T (n) is called the asymptotic time complexity of the algorithm. The time complexity of an algorithm depends not only on the size of the problem, but also on the initial state of the input instance. The time complexity of the algorithm reaches o (n2), and the best case is o (n). The running time of the program on D sets of data is about 20 minutes.

Result presentation
Product items in D1 are divided into 43 batches to complete, and some results are shown in Table  6.

Model advantage
(1) In data processing, in addition to the hard restriction conditions in the actual situation, the material rate is also taken as a constraint condition, so as to meet the cutting requirements as far as possible.
(2) The model is easy to understand and operate, and the algorithm processing selects a relatively simple way to solve the cutting problem.

Model Shortcomings
(1) For the analysis of residual materials, some residual materials have not been compared with actual operations, so the accuracy of the algorithm needs to be improved.
(2) If the data is too large and the algorithm is not optimized enough, it may need to process more data, resulting in slow operation speed

Outlook
The problem of layout of rectangular parts is widespread in many trades of national economy. It is of great theoretical and practical value to study this problem. Genetic algorithm (GA) is a kind of bionic evolutionary computing technology. At present, there are many researches on this algorithm. It is of great practical value to study how to apply this algorithm to solve practical problems. The algorithm described in this paper is based on genetic algorithm. According to the characteristics of specific problems, the corresponding genetic operator is designed to solve the RSPP. This paper mainly completed the following work: (1) Combined with the requirements of some production processes and applications in special occasions, this paper adopted the phased shear layout scheme to solve the RSPP problem. (2) Design the corresponding genetic operator. According to the requirements of the layout scheme, the genetic manipulation was designed in layers and piles, which ensured the inheritance of good genes in the parent genes and accelerated the efficiency of calculation. In the process of chromosome decoding, the idea of heuristic is used to make the decoding process simple and easy to implement. According to these methods, the detailed steps of genetic algorithm to solve RSPP algorithm are given. (3) A rectangular strip layout system based on genetic algorithm is developed. Through a large number of experimental tests, the experimental results are compared with those of various algorithms, and the effectiveness of the proposed algorithm is verified from the aspects of material utilization rate and the simplicity of layout scheme. However, any algorithm has certain pertinence and is closely related to the specific application field, so it is very difficult to construct a general layout strategy that can achieve the best results in various situations. On the basis of the research in this paper, the following work can be further carried out: (1) Chromosome decoding is the most frequent operation in genetic algorithm, so it is an improvement direction of the algorithm in this paper to design more efficient computation or to seek some strategy that can reduce the computation frequency. (2) In the process of layout, the blank with similar size is divided into groups, which can not only reduce the scale of the problem in a disguised way, but also further simplify the layout results. The design of grouping strategy is also not completed in this paper. The problem of layout has influenced modern people's life closely since it was put forward. It is hoped that the work of this paper can play a role in introducing jade, and more peers will invest in this research, so that more good algorithms can play a greater role in solving layout problems.