Research on shipboard material scheduling optimization based on improved genetic algorithm

In order to improve the loading optimization efficiency of the pipe fitting pallet assembly in the ship pipe processing workshop, the loading problem of the pipe processing workshop was studied for the low efficiency of pipe pallet transportation in the traditional workshop, and a mathematical model of loading with the goal of maximizing space utilization was established. According to the characteristics of pipe fittings and fusion of heuristic search methods, an improved genetic algorithm is proposed to solve the optimization problem of ship pipe fittings, and the effectiveness and practicability of the algorithm are verified through experiments.


INTRODUCTION
At present, a new round of scientific and technological revolution and industrial transformation in the world have been accelerated, and intelligent manufacturing is developing rapidly on a global scale, which has become an important trend of the manufacturing industry. As an important branch of the manufacturing industry, the shipbuilding industry plays a vital role in the country's construction of a manufacturing power and a maritime power. As the main part of the piping system, ship pipes are distributed throughout all parts of the ship. Ship pipe manufacturing takes a very high proportion of the work in the whole ship building process, which leads to heavy tasks in the ship pipe processing workshop. Therefore, the problem of ship pipe fittings loading optimization is solved. It is very necessary to help improve the production efficiency of the entire ship tube processing workshop.
At present, the research on the ship pipe processing workshop mainly focuses on workshop operation analysis, production scheduling, etc. There is very little research on the optimization of pipe fittings. Paula Fraga-Lamas [1] [2]and others proposed to improve production efficiency and safety by improving pipe fitting identification, traceability and indoor location; Lu [3] and others proposed a research on multi-objective production scheduling of ship tube processing workshop based on fruit fly optimization algorithm; Wang [4] and others proposed a lean research on double-pallet management and production operations in ship pipe processing workshops; however, there is a lack of relevant research on the optimization of pipe loading. For such problems, other fields can be used for reference. For example, Zhang [5] and others applied an improved particle swarm algorithm to optimize the online baggage loading for aviation baggage loading optimization; on the basis of analyzing the characteristics of general cargo ship loading, Shang [6] established a mathematical model of loading with space utilization as the goal to solve the problem of cargo loading optimization.
The loading and transportation of ship pipe fittings need to consider the quality, volume, and loading sequence of the pipe fittings and other constraints. In view of the current supporting facilities are not perfect of the ship pipe processing workshop, relying on the characteristics of pallet transportation, etc. This paper proposes an optimization algorithm for pipe fittings loading based on an improved genetic algorithm to study pipe fittings loading planning for production and maximize the space utilization of pipe fittings loading trays.

Problem Description
Combined with the actual status of the pipe processing workshop, in order to complete the daily production tasks, the pipe fittings in different groups that need to be processed are loaded, and then the pipe fittings in different groups are transported to each production location in the workshop according to the processing technology. The processing technology mainly includes cutting, pipe bending, pipe adjustment, welding, cleaning and polishing, and pump pressure testing.
The loading plan of ship pipe fittings needs to be set according to the actual production requirements and actual constraints. The loading problem of ship pipe processing workshop in this paper mainly studies the loading problem before pipe fittings production and transportation. This problem refers to the uniform pallet assembly of pipe fittings of different specifications according to the production plan, and the category, volume, location and other information of the pipe fittings can be known, so that the space utilization rate of loading pallets can be maximized.

Mathematical model
Considering the complexity of the shape of the pipe fittings, in order to facilitate the establishment of the model and the solution, the following assumptions are made.
a. Treat the hollow cylindrical pipe as a cuboid; b. The pipe fittings can be rotated during loading; c. Set the volume of the tray to a fixed value, that is, the volume of the cube with the tray as the ground; d. The pipe fittings have a certain load-bearing capacity, which can meet the requirements of multi-layer stacking; Set the bottom plate of the tray as the X-Y plane and set the Z-axis upward with the back-left vertex of the tray to establish a three-dimensional rectangular coordinate system, as shown in Figure 1.  According to the above description of the optimal problem and hypothesis of pipe fittings loading in the ship pipe processing workshop, the parameters and variables shown in Table 1 are introduced: (xi,yi,zi) The coordinates of the vertices of the lower left and rear corners of the pipe fittings into the box, (i=1，2，…，n);

Objective function and constraints
The optimization goal of the model is to maximize the space utilization of all pipe pallet assembly operations in the production plan. The objective function is: Restrictions: Constraint conditions (2) ensure that each pipe fitting cannot be allocated multiple times, and the pipe fittings cannot be embedded; (3), (4), (5) reflect the location constraints of the pipe fittings; (6), (7), (8) Reflects the placement direction of the pipe fittings; (9) is the given volume of the tray.
Pipe fitting loading is similar to the three-dimensional packing problem [7][8] [9], which is an NP-hard problem. It is particularly difficult to obtain the optimal solution, and an improved intelligent algorithm is needed to obtain the optimal solution. This paper uses an improved genetic algorithm to solve this problem.

Improved genetic algorithm steps
In order to effectively solve the pallet loading optimization model of the ship pipe processing workshop in Chapter 1, a model solving method based on an improved genetic algorithm is proposed.
Integrate heuristic search methods and use the heuristic information possessed by the problem to guide. For example, when pipe fittings are loaded, large pipe fittings are usually loaded first, and then the next step is loaded along its direction; according to the principle of survival of the fittest, the elite offspring are retained; at the same time, to prevent falling into the local optimal solution instead of the global optimal solution, insertion operation is introduced to ensure the diversity of the population. How to use this method to solve the optimization problem of pipe fitting pallet loading in ship pipe processing workshop is as follows:

Chromosome coding
As the pipe fittings assembly involves multiple constraint conditions such as pipe fitting sorting and placement direction, the matrix coding method is adopted, and the two-dimensional matrix is used to represent the coding structure of the chromosome, and the array elements represent the chromosome genes, and the coding is easy to implement.
Chromosome S=(L,N,T), the specific vector is explained as follows: The vector L=(L1, L2,..., Ln) is the arrangement of the pipe fittings to be assembled; The vector N=(N1,N2,..., Nn) is the arrangement of Ai corresponding to L; The matrix T=(x,y,z) is the coordinate of the assembly pipe fitting corresponding to the arrangement L; Take a single assembly of pipe fittings {1,2,3,4,5,6,7,8,9,10,11,12} with 12 pipe fittings as an example, the pipes are divided into batches from left to right according to a given integer string and tray capacity limit, and then the chromosomes are converted into a loading batch and pipe loading sequence scheme to realize chromosome decoding. The gene fragments in the loading sequence can be expressed as: 5 9 2 7|8 12 3 10|1 4 11 6

Population initialization
The population is generated after chromosome coding. The number of chromosomes in the initial population is usually determined by experience, and the number is not limited. The larger the size of the chromosome population, the final optimal value obtained by the algorithm is closer to the optimal solution of the problem. We set the number of chromosome genes and pipe fittings to be the same. In order to improve the efficiency of the algorithm, this paper applies a heuristic search method, combined with pipe fitting experience, preferentially place larger pipe fittings, and then randomly produce the remaining genes.

Fitness function
Each chromosome corresponds to a fitness value, and the selection criteria for evaluating each feasible chromosome need to be described.

Select operation
Select a certain number of chromosomes from the currently feasible chromosomes and put them into the matching pool. The higher the fitness value of the chromosome, the greater the probability of being selected. The probability of chromosome k being selected is: Among them, ∑Fitness is the sum of fitness values of all chromosomes in the parent population.

Cross operation
Partial cross-mapping hybridization method is used for crossover operation. For the parental samples grouped in pairs, two crossover points are randomly determined, and the gene fragments between the crossover points of the parent chromosomes are exchanged. The specific part of the operation process of cross mapping and hybridization is as follows:

Mutation operation
The mutation operation allows each gene in the offspring's chromosomes to have a smaller probability of exchanging its information with another gene.

Insert operation
In this paper, the genetic algorithm is improved, and the insertion operation is introduced to improve the local search ability. Insertion operations can insert genes in chromosomes into random positions. For example, to insert the gene at position R1=5 into R2=11, the specific process is as follows: Original chromosome: (3 8 4 9 7 10 11 2 6 12 5 1) Chromosome after insertion: (3 8 4 9 7 10 5 2 6 12 11 1)

CASE VERIFICATION
Combined with the production plan of the pipe processing workshop, there are currently 100 small pipe fittings that need to be processed. Type A pipe fittings have a diameter of 50cm and a length of 80cm, and there are 36 in total. Type B pipe fittings have a diameter of 40cm and a length of 90cm, and there are 42 in total. C The diameter of this kind of pipe is 60cm, the length is 40cm, there are 22 pieces in total; the tray capacity is 2.2m*1.9m*1.8m.
Set the experimental parameters as shown in Table Ⅱ . According to the above data, combined with the improved genetic algorithm in this paper, the experiments are carried out, and the relevant conclusions are drawn through the experimental comparison, so as to prove the effectiveness of the improved genetic algorithm in optimizing the loading of pipe fitting pallets in the ship pipe processing workshop.
The simulation effect diagram is obtained through experiments. It can be clearly seen from the pipe stacking effect diagram that the simulated pipe fittings optimized by the improved genetic algorithm are placed compactly and the remaining space is greatly reduced. Through comparative analysis, if the pallet is loaded according to the traditional method, only the same kind of pipe fittings are installed at a time, and the space utilization rate is low. As shown in Fig. 3 and Fig. Only B-type pipe fittings are installed, and the space utilization rate is 76.6%. Because the required number of C-type pipe fittings is small, it is not considered. After applying the improved genetic algorithm, the tray can be loaded according to the optimal situation each time, and the space utilization rate has been greatly improved, which can exceed 85%. Therefore, compared with traditional loading methods, the algorithm in this paper can effectively solve this problem.

CONCLUSION
This paper studies the pipe fitting loading optimization problem in ship pipe processing workshop, considering the constraints such as the volume of pipe fittings and loading order. Taking the space utilization of pallet as the optimization objective, an optimization model based on maximizing loading space is established. An improved genetic algorithm is used to load the pallet of pipe fittings. Experiments verify the feasibility and applicability of the algorithm.