Optimal loading method of multi type railway ﬂ atcars based on improved genetic algorithm

: On the basis of analyzing the complexity of railway ﬂ atcar loading optimization problem, according to the characteristics of railway ﬂ atcar loading, based on the situation of railway transport loading unit of multiple railway ﬂ atcars, this study puts forward the optimal loading optimization method of multimodel railway ﬂ atcars based on improved genetic algorithm, constructs the linear programming model of railway ﬂ atcar loading optimization problem, and combines with the improved genetic algorithm to solve the problem. The study also analyzes the structural characteristics of the optimal loading materials of multimodel railway ﬂ atcars, selects the optimal materials and inputs the relevant data into the computer, and uses MATLAB to program the optimal loading algorithm of multimodel railway ﬂ atcars. Through the analysis of the calculation example, the study discusses its scope of application. The experimental results show that the average general utilization rate of the proposed method is 73%, which has higher universality, more e ﬀ ective application, and fully meets the research requirements. It is veri ﬁ ed that the proposed method has a statistically signi ﬁ cant impact on the optimal loading of multi - type railway ﬂ atcars.


Introduction
Railway transportation has the advantages of large volume, fast speed, not easily affected by weather and seasons, and is suitable for long-distance transportation.It undertakes the important transportation task of modern logistics, and the optimal loading method of multi-type railway flatcars has also received extensive attention.In railway transportation, the loading problem of wheeled (tracked) vehicle equipment is often encountered.In order to facilitate equipment loading and reinforcement, railroad flatcars with wooden floors are generally used for transportation.Some special equipment have special requirements for flatbed trucks.To solve the main problems of low ignition point of the wooden floor of railway flatcars, it is easy to cause fire, poor mechanical stability, potential safety hazards, easy damage to the floor, short use time, and inconsistent maintenance schedule with other ordinary trucks.
Current scholars in related fields have made certain research on the optimal loading method of multitype railway flatcars.Song et al. [1] proposed an optimal loading method of multi-type railway flatcars based on seismic risk assessment, which combined the probabilistic seismic vulnerability analysis with probabilistic seismic loss analysis, designing a quantitative seismic risk assessment model for railway line optimization, designing three methods for vulnerability analysis of bridges, tunnels and earthwork sections, and developing a specific event tree for seismic loss.The risk assessment model is combined with the Step 5: Select individuals according to P c for crossover operation; Step 6: Perform mutation operations on breeding individuals according to P m ; Step 7: If a certain stop condition is not met, turn to step 2, otherwise go to step 8; Step 8: Output the individual with the best fitness value in the population.
In genetic algorithm, all individuals with high hindering fitness value are generated, and the fitness value of the individual greatly exceeds the average fitness value of the population.When selecting according to the proportion of fitness value, the individual will soon occupy an absolute proportion in the population, resulting in the early convergence of the algorithm to a local optimum.This phenomenon is called premature convergence.Therefore, an improved genetic algorithm is used to map the range of fitness function, which is called the scale transformation of fitness function.Assuming that the original fitness function is f and the calibrated fitness function is ′ f , the linear transformation can be expressed as follows: The coefficients a and b can be set in many ways, but two conditions must be met: According to the derivation formula derived from the above conditions, the coefficients a and b of the linear transformation can be obtained by solving simple simultaneous equations.The linear transformation method changes the gaps in fitness and maintains the diversity of the population.If the fitness of some individuals in the population is far lower than the average value, or even negative, in order to meet the condition that the minimum fitness is not negative, the following transformation can be carried out: The coefficients a and b under the condition of non-negative fitness value can be obtained through simple calculation.The difference from the basic condition is that the transformed fitness, which may be negative, is set to 0.
Railway transport flatcar loading mainly considers two factors: flatcar and equipment.The main considerations of flatcar are flatcar length, width, and flatcar load.In terms of equipment, the main considerations are the length, width, and height of the equipment, the weight of the equipment, and whether the equipment exceeds the limit [9].When establishing the model, the related factors are simplified, and only the most important factors are considered, that is, the length of flatcar and the length of the equipment.
The loading problem of vehicles can be described as that there are m kinds of equipment B B B , , ... , m 1 2 need to be loaded and transported.The number of each kind of equipment is known as . The length of the flatcar is l l l , , ... , i 1 2 respectively.The distance between the center of gravity and the front end of the equipment is , respectively.The weight is W W W , ,... , m 1 2 , respectively.There are , the length is , the vehicle distance is S S S , , ... , Q 1 2 , and the carrying capacity is Z Z Z , , ... , Q 1 2 . n um is the number of flatcars used; x ij is the number of the i type equipment loaded on the j flatcar in the series of flatcars used; D is the minimum allowable distance between two adjacent equipment; α j is the longitudinal allowable displacement of the total center of gravity of the equipment on the j flatcar; Y jt is the distance from the center of gravity of the equipment on the j flatcar to the front end of the flatcar; W jτ is the weight of the equipment on the j flatcar; l j is the distance from the center of gravity of the equipment on the j flatcar to its front end; d jt is the length of the equipment on the j flatcar; and ε j is the distance between the front end of the first piece of equipment on the j flatcar and the front end of the vehicle [10].The following relationships can be obtained by using the sequential loading method: ( ) There are many feasible loading schemes to meet the above requirements, and the objective of optimization is to find a scheme with least resources of flatcars from all feasible schemes [11].Due to the adoption of smooth loading, the number of equipment to be loaded on a flatcar mainly depends on the length of the flatcar and equipment [12].Therefore, the utilization rate of the total length of flatcars can be used as an objective function: Obviously, this is an integer programming problem, and the sum superscript in the above formula depends on the decision variable nm.Therefore, this problem is not a linear programming problem, and the traditional branch and bound method can not be used to solve the problem, so we must find another way to solve the problem [13].

Structure optimization of loading equipment for railway flatcars
For a long time, the floor of railway flatcar has been made of wood structure, which is the main part of loading cargo and reinforcement [14].The reason is that the special properties of wood, such as high friction coefficient, strong nail holding force, initial strength meeting the design requirements, and low cost meet the special needs of the flatcar floor.Fiber reinforced composite floor for railway flatcar adopts three-layer structure: reinforcing layer, foaming layer, and protective layer [15].The foaming layer is formed directly on the reinforced layer, and continuous production is realized through the transmission device.The protective layer is sprayed on the surface of the foaming layer with special equipment [16].In order to ensure the loading effect of railway flatcar, the structure optimization process of railway flatcar loading equipment is optimized as Figure 1.
Based on the process in Figure 1, the protective layer of damaged parts of railway flatcar loading equipment is removed, and the adhesive is applied on the surface of exposed foaming layer.After placing for 3 h, a protective layer is applied [17].In actual loading, some equipment belongs to the towed equipment, and the corresponding traction equipment must be adjacent to and installed in front of it.Some equipment is allowed to be straddled, so as to carry out intelligent verification when the computer automatically generates the "loading scheme," and filter out the "loading scheme" that does not meet the traction requirements on the same flatcar; for the flatcar that loads the towed equipment at the front of the flatcar, one flatcar needs to load the traction equipment at its rear as Figure 2.
Based on Figure 2, for each loading scheme, a constraint condition is added to the model: Based on this, the correctness of the straddle mounting method is analyzed as Figure 3.
This study analyzes the wrong loading method, and a specific structure is shown inn Figure 4. Based on the principle of the figure, according to the equipment database and the technical requirements of loading, we can calculate all the loading schemes of the unit through self programming, which is one of the key problems [18].Branch and bound search and improved genetic algorithm are used to calculate the loading scheme array.In the branch and bound search process, infeasible loading schemes are eliminated, such as the towed equipment with no corresponding traction equipment, and some difficult loading schemes are obtained using improved genetic algorithm, such as overlapping length of equipment  Optimal loading method of railway flatcars based on genetic algorithm  919 and relative crossing of gun barrel [19].In addition, the front (back) cross loading schemes need to be generated in pairs to sort out the array of loading schemes.There are a large number of loading schemes of the same kind in the array that are automatically generated by computer, which need to be merged [20].The so-called similar loading scheme means that for the same loading unit, although the order of equipment combination is different, the type and quantity of equipment are equal.After sorting, the number of loading schemes will be greatly reduced.

Selection of optimal loading scheme for multi type railway
In fact, the loading problem of railway flatcars can be regarded as a packing problem.They are essentially the same, that is, they all study how to load the same amount of goods and how to use the least flatcars or boxes [21,22].A greedy strategy is adopted in most approximate algorithms of packing problem, that is, the overall planning for the optimization result is simplified at each step, that is, a local selection method is specified for each packing, as different greedy selection methods produce different strategies [23,24].Improved genetic algorithm is a randomized search method derived from the evolutionary laws of the biological world (survival of the fittest genetic mechanism).Its main feature is to directly operate on structural objects without the limitation of derivation and function continuity [25,26].It has inherent implicit parallelism and better global optimization capabilities.Using probabilistic optimization methods, it can automatically obtain and guide the optimized search space, and adjust the search direction adaptively, without the need for definite rules.First, establish the initial population, and then calculate the fitness, select individuals with high fitness, and disrupt the order of existing individuals to generate new individuals.The new individual is put back into the population, and after this process, a population is finally put out, and the optimal solution is obtained.
The control parameters (crossover rate and mutation rate) of genetic algorithm have an important impact on the performance of the algorithm.The control parameters of the basic genetic algorithm are determined in advance and remain unchanged in the process of genetic evolution.In the process of evolution, "good" individuals and "poor" individuals experience the same crossover and mutation rate, so it is difficult to ensure the recovery of gene information lost in the process of genetic evolution (that is, there is no gene in all individuals).For this reason, the crossover rate and mutation probability can be adjusted adaptively, and these excellent individuals can reproduce through the selective replication operation of survival of the fittest, which helps the algorithm gradually approach an optimal state.The crossover and variation rates of individuals with small fitness function values are high.Constantly updating these individuals with low fitness function values is helpful to restore the lost effective genes.
The implementation steps of the improved genetic algorithm are as follows: Step 1: Initialize genetic algebra: ← G 0; Step 2: Randomly generate the initial population ( ) P G , and calculate the fitness of each body of the population; Step 3: Divide ( ) P G into multiple subgroups: In Formula (13), n is the number of divided groups.
Step Step 7: Judgment of termination conditions.If the termination condition is not met, ( ) , skip back to step 4; if the termination condition is met, the optimal result is the output, and the algorithm ends.
Due to a large input length n of the bin packing problem in practice, the trade-off between the time cost of approximate algorithm and the optimization degree of solution is very important.
(1) Define variables and arrays for loading; (2) Take out an equipment and prepare to load it.If there is no equipment, go to 6; (3) Check whether the remaining length of the existing flatcar is greater than or equal to the equipment length.If it is 4, it is not 6; (4) Load the equipment on the current inspection flatcar, and give x the value the remaining length of the original flatcar minus the length of the equipment; (5) Compare x with the minimum value S. If x ≥ s, jump to 6, otherwise mark the current flatcar as the most suitable flatcar, and then jump to 6; (6) If the current flatcar is the last one, load the equipment on the most suitable flatcar.The remaining length of the most suitable flatcar is equal to the original remaining length minus the equipment length, and then jump to 2; if it is not the last flatcar, then change to the next flatcar and jump to 3.
There are m kinds of equipment to be transported.Among them, M 1 is equipped with A 1 pieces, M 2 is equipped with A 2 pieces M i is equipped with A i pieces M m is equipped with A m pieces.The railway flatcars used are K 1 , K 2 , …, K f type.First, consider the case that one loading unit is one flatcar (the special loading scheme with two or more flatcars as one loading unit is supplemented later).All possible loading schemes are shown in Table 1 [27].In the table, P(i,j) represents the number of loading equipment M i under the j loading scheme for one loading unit.Based on this, parameter evaluation and standard treatment are carried out for all possible loading and cutting methods as Table 1.
There are many combination methods on a whole train, but the number of combinations on one flatcar will be greatly reduced (the "loading scheme" mentioned below is for one loading unit).In general, one loading unit is one flatcar; considering the existence of straddle loading or some fixed loading schemes, it can be more than two flatcars in succession).Practice has proved that one flatcar can only carry no more than three kinds of equipment, even if there are many kinds of equipment with very small length, so that it is possible to load four or more kinds of equipment on one flatcar.These equipment can also be combined into one kind of "equipment" for processing [28].This can ensure that in any loading scheme, the number of equipment types does not exceed 3.After such treatment, the number of loading schemes is greatly reduced, and the linear programming model is established as follows: Let X j be the number of times that the j loading scheme is used (equal to the number of flatcars used), and C j the cost of flatcars corresponding to the j loading scheme.The objective of optimization is to use the least number of flatcars, and its objective function is

Model
Type Equipment type Quantity of various equipment loaded Optimal loading method of railway flatcars based on genetic algorithm  921 After further optimization, following results can be obtained: When there is only one type of flatcar, the objective function is the least number of cars; when there is more than one type of flatcar, the unit freight (yuan/car kilometer) of different cars should be considered, and the objective function is the latter.Nonnegative constraint: > = X j n 0, 1, 2, ...

j
. The number of times used by each loading method must be an integer, so there are integer constraints: X j is an integer, = j n 1, 2, ... , .The constraint condition for all equipment to be fully loaded is .
The above algorithm can be abbreviated as According to the loading standard, the fixed loading scheme for some equipment can adopt 2 cars with 3 pieces, 3 cars with 4 pieces, and 3 cars with 5 pieces.Then, the number of flatcars for each loading scheme should be multiplied by 2, or 3 (two or three flatcars are used as one loading unit).For each such loading scheme, a coefficient λ j is defined, = λ 2, 3 j .Then the objective function is rewritten as Further conversion can be obtained as follows: Considering all the factors in flatcars and equipment, combined with mathematical modeling theory, this study establishes a model, analyzes and optimizes the model, and then uses a variety of approximate algorithms to calculate it, draws a conclusion, and compares and analyzes the conclusions, so as to select the optimal loading scheme and standby scheme, and ensure the loading effect of the railway flatcars.

Experimental results
In order to verify the practical application effect of the optimal loading method of multimodel railway flatcar based on the improved genetic algorithm, select 300 multimodel railway flatcar equipment as experimental variables, to test the above method is verified by 100 kinds of 300 pieces of equipment (the specific parameters are omitted).The calculation results are compared with that of a heuristic algorithm.The comparison of material performance indexes is as shown in Table 2.
As an important means of transportation, whether the flatcar can meet the loading requirements of the equipment is an important sign of the success of the development of the composite floor.On the basis of wide listening to experts' opinions and suggestions, the mechanical property test verification system of railway flatcar fiber reinforcing composite floor is determined.When the problem of straddle loading is not considered, the optimization problem of the railway flatcar loading scheme is suitable to be solved by integer programming method.For less than 50 kinds of equipment (the number of which is not limited), the number of loading schemes of railway flatcars is generally less than 1,000, and there is no additional constraints; the test is carried out on PC above P III, and the solution time is within 5 s, so the influence of cross loading problem on the solution time of the algorithm is not obvious.If the straddle position is fixed, the increase of solving time is not much, which can be ignored; otherwise, the increase of solving time cannot be ignored.It is concluded that the number of solving equipment types is less than 100 (in most cases, it is far less than this number), there is no straddle equipment, or the straddle position is fixed.The algorithm is suitable for the flatcar loading planning problem where the straddle loading position is not fixed, but the number of straddle equipment types is not more than 5, and the total number of equipment types is less than 20.Railway flatcar is an important means of railway transportation.It is of great significance to find the exact optimal solution for train echelon flatcar loading scheme and reduce the number of flatcars as much as possible to save the cost of railway transportation.The results obtained by using the platform car loading algorithm demonstration software are shown in Table 3.
According to the data in Table 3, when the number of devices is 300, the average universal use of the traditional method is 42.7%, while the average universal use of the method in this study is 73%.It can be seen that the universal use of the text method is high.Based on the analysis of loading characteristics of railway flatcars equipped with equipment and the fact that multi-channel railway flatcars are one loading unit, an algorithm for calculating the global accurate optimal solution is proposed.The experimental results show that the algorithm has good generality.When there is few straddle equipment or the straddle position is fixed, the calculation result of the algorithm is better than that of the heuristic algorithm, and has better time complexity.Considering its computational complexity, two methods can be used to determine the loading plan of military equipment railway flatcars: first, consider the straddle loading equipment, when the straddle loading is not too much (in most cases), use the proposed integer programming method, otherwise, use the heuristic method.In this way, if it is used for a long time, the effect is significant in the sense of probability, the calculation result is much better than the heuristic algorithm, which can better select the optimal loading and unloading method and ensure the loading and unloading effect of railway transportation.
To further verify the statistical evaluation results of different methods, the P values obtained by significance test were compared.When P < 0.05, the difference is considered to be statistically significant, indicating that the difference inferred from this study is statistically significant.The statistical evaluation results of different methods are shown in Table 4.
According to the data in Table 4, the P value of the traditional method is 0.07356, while the P value of the proposed method is 0.03861.It can be seen that the analysis results of the proposed method are statistically significant, which has a significant level, indicating that the difference obtained by the statistical inference of the proposed method is statistically significant.

Analysis and discussion
The country's railway industry is developing rapidly in the direction of high speed and heavy load, and the requirements for line engineering are increasing.At present, the theoretical research on the line is getting more in-depth, but there are still many shortcomings.This is the design of this study.Based on the improved genetic algorithm for the optimal loading method of multi-type railway flatcars, the railway loading is further studied.By analyzing the loading of railway transport flatcars, the two factors of flatcars and equipment are mainly considered, and related models are established and simplified.The vehicle loading problem is described as a variety of equipment that needs to be loaded and transported, and the utilization of the total length of the flatcar is taken as an objective function.The fiber-reinforced composite floor for railway flatcars is changed to a three-layer structure, including a reinforcement layer, a foam layer, and a protective layer.The equipment structure optimization process is optimized according to the equipment database and loading technical requirements, through automatic programming.When calculating all loading plans of the loading unit, using the branch and bound search and improved genetic algorithm to calculate the array of loading plans could greatly reduce the number of loading plans.Most of the approximation algorithms for packing problems use a greedy strategy, which simplifies the overall planning of the optimization results at each step.Based on the above-mentioned optimal loading method for multi-type railway flatcars based on the improved genetic algorithm, the experiments in this study show that the algorithm has good versatility.When the cross-equipment is small or the cross-location is fixed, the calculation result of this algorithm is better than the heuristic algorithm and has better time complexity.The method in this study can reduce the number of flatcars and is of great significance for saving railway transportation costs.

Conclusion
According to the requirements of railway transportation, the necessity and feasibility of establishing a railway flatcar loading problem model are analyzed, and a multimodel railway flatcar loading optimization method based on an improved genetic algorithm is proposed.On this basis, the railway flatcar loading model was initially established, the algorithm required for modeling was designed, and some algorithms used in the modeling were analyzed.The linear programming model of railway flatcar loading optimization problem is constructed using the improved genetic algorithm.Through parallel computing, the efficiency of the algorithm is improved and the convergence accuracy of the algorithm is guaranteed.This study analyzes the structural characteristics of the optimal loading material of multi model railway flatcar, selects the optimal material and inputs the relevant data into the computer to realize the optimal loading of a multi model railway flatcar.Through experiments, it can be seen that the algorithm in this study has better versatility, better time complexity, can reduce the number of flatcars, and is of great significance to saving railway transportation costs.However, the proposed method only considers the case that the specifications of all goods to be loaded are cuboids.In practical problems, the shapes of goods may be various.Therefore, in the next research, it is necessary to further optimize the algorithm model to solve the problem, so as to better solve the optimal loading problem of multimodel railway flatcars.
Calculate the fitness value F of each individual in the group;Step 3: Evaluate the fitness, and calculate the fitness ( ) F p i for each individual P i in the current popula-

Table 1 :
Schematic diagram of all possible loading methods

Table 2 :
Comparison of material performance indexes

Table 3 :
Comparative analysis on loading effect of railway flatcars

Table 4 :
Statistical evaluation results of different methods