Optimizing the transportation route of fresh food in cold chain logistics by improved genetic algorithms

. At present, fresh food logistics transportation in China is still in the primary stage of development, transportation costs are rising, and cold chain logistics path design is unreasonable. Therefore, the optimization and prediction of the cold chain transportation route of fresh food has become the focus of the research in this ﬁ eld. Based on the principle of genetic algorithm, this paper designs an improved genetic algorithm to solve the problem of urban cold chain transportation path. In order to optimize the distribution path and minimize the total cost, a cold chain transport model is established. Through the simulation coding and calculation of the model, the in ﬂ uence of genetic algorithm on the optimization of the cold chain transport path is explored to reduce the cost and price of cold chain logistics transport, improve the transport ef ﬁ ciency, and thus improve the economic bene ﬁ ts of enterprises in this ﬁ eld. Through experiments, the optimal solution of the example is obtained, and compared with the traditional algorithm, it is proved that all the paths obtained by the improved genetic algorithm conform to the model with capacity constraint and time window constraint, and there is an optimal path for the most energy saving. In conclusion, the transport path of cold chain logistics calculated by the improved genetic algorithm is more optimized than the traditional algorithm and greatly improves the transport ef ﬁ ciency.


Introduction
Due to the development of food refrigeration technology and transportation technology, the cold chain logistics industry has entered an initial boom period. However, according to the actual situation, China's cold chain logistics distribution still has problems such as long distribution time and large distribution errors. Therefore, reducing the operating cost of cold chain logistics has become a hot issue for the industry and enterprises in this field. Wu [1] pointed out that logistics in China is now growing; the process of cold chain logistics is standardizing; enterprises in the industry are developing; and the industry has bright prospects. Therefore, Zhang et al. [2] designed a sensory perception system for fresh food in cold chain logistics. The system could provide early warning of environmental parameters in the process of cold chain logistics of fresh food, which was helpful to the level of refrigeration information. Wang et al. [3] designed and developed the combined coding technology of monitoring system based on radio frequency identification devices (RFID), Visual Studio 2005 and SQL Server 2005 to improve the cold chain logistics of quality control. The shelf life model was embedded into the system to predict the shelf life of products after transportation.
Due to the perishability of fresh food, the temperature control in the whole process is extremely critical [4]. Therefore, when calculating the total cost, it is not only the transportation cost of the distributor, but also the existing energy consumption cost of the vehicle itself and the inevitable damage cost of the goods. According to the basic principle of genetic algorithm, this study established a coldchain logistics transportation path model of fresh products based on an improved genetic algorithm, performed optimization selection on it, and solved it to obtain the optimal path combination, which reduced the total cost as much as possible.

Cold chain logistics transportation
Cold chain logistics [5] is a supply chain system that allows fresh products collected from the origin to be in a controlled low temperature environment during the process of processing and selling of goods, so as to ensure good and reliable quality of products, reduce energy consumption at the same time and reduce pollution and damage to the environment, which is different from other logistics systems. For fresh food, its supply chain system has a special demand for cold chain logistics. Developing cold chain logistics is an important basis and indispensable key link for quality assurance of fresh food in the supply chain. Food cold chain logistics industry can ensure the smooth development of the offline transportation process and the online platform of every fresh food through effective temperature control technology management means. The fresh supply industry and the fresh food industry have been stimulated, and the win-win benefits of distribution system, transportation system and e-commerce have been formed. The traditional optimization model of cold chain transportation of fresh products adopts the measures of integration of cold chain logistics [6]. From the perspective of vertical integration of supply chain [7], it reduces the deterioration degree and energy consumption of product in the process of distribution, improves the accuracy of distribution operation, and builds an efficient logistics operation system. The schematic diagram of cold chain logistics transportation is shown in Figure 1 3 Improved genetic algorithm 3.1 Basic concept and structure of genetic algorithm Genetic algorithm is a computational model that simulates the biological evolution process of natural selection and genetics. The genetic algorithm starts from the population, which consists of a certain number of genetic coding individuals. Each genetic coding individual is regarded as an entity with characteristic chromosomes. Generally, the following mathematical programming model is used to describe the genetic algorithm: where x is the decision variable, Maxf(x) is the objective function, x ⊂ R and R ⊂ U are the constraint conditions, U is the basic space, and R is a subset of U. Solution x is called feasible solution, and set R is called feasible solution set, which represents all solution sets satisfying constraints [8].
In genetic algorithm, the first problem to be solved should be the optimization of objective function, so the objective function that needs to be optimized is the adaptability of population to nature. Based on the individual biological population corresponding to the optimization variables, a new generation of population is generated by replication, crossover, mutation and selection from the current population. The process is repeated until the requirement of evolution time is reached or the population meeting the requirement is found. This is the basic idea of genetic algorithm to optimize the problem.
The basic structure of genetic algorithm [9] is shown in Figure 2.

Specific improvement of genetic algorithm
(1) Coding. In order to convert data that can be recognized by computer, facilitate research and reduce the generation  of invalid solutions, the natural number coding method is adopted in the improvement. The central warehouse is represented by 0, the number of vehicles by m, and the buyers by n. The sub-path is the path between two distribution centers, that is, starting from 0 and returning to 0. By using integer coding, chromosomes can be expressed as: ð0; i 11 ; i 12 ; ::::::; i 1a ; 0; i 21 ; i 22 ; ::::::; i 2b ; 0::::::0; ::::::i m1 ; i m2 ; ::::::i mc ; 0Þ; ð2Þ where b,c represent any natural number.
(2) Initial population [10]. It is assumed that the population generates the initial solution randomly, the evolutionary algebra is T, and the current iteration algebra is t. The search iteration is continued according to certain rules and finally stopped after a certain condition is adapted or the number of iterations reaches the extreme value.
(3) Fitness function. It is used to indicate whether the solution is good or bad, and its value is proportional to the genetic possibility. The objective function needs to solve the minimum value. Therefore, it needs to be converted into fitness calculation. F i is the fitness value of the ith individual, and A is the target function value. Reciprocal method is used for conversion: Chaotic genetic algorithm [11] is used. This algorithm effectively avoids local optimum and tends to the actual biological evolution process. It avoids the low efficiency of local optimization and the risk of premature problem in traditional genetic algorithm. It can be expressed by autonomous difference equation: (4) Selection. Greater fitness means greater adaptability. The first m À 1 chromosomes with high fitness are disturbed, which makes the selected individuals chaotic again. Set the arc formed between every two points as (i, j) and vehicle as k. The population size is N, and the fitness of individual i is F i , so probability P i of selecting it is: The roulette strategy [12] is used. In this strategy, the fitness of the individual in the previous step is critical. The larger the F i is, the higher the P i is. This not only guarantees a certain degree of randomness, reflected in the "gambling", but also guarantees a certain degree of evolution, reflected in the "roulette". This kind of coverage has a wide range and is conducive to overall selection.
(5) Crossover. That is to say, in order to obtain new individuals, two chromosomal genes are exchanged. Firstly, a pair of parent chromosomes are selected according to the crossover probability, and then the loop points are found out; secondly, the loop nodes of one of the patent chromosomes are copied to the corresponding positions of the offspring; finally, another offspring are obtained by the same method. The crossover probability is 0.6. The following equation is derived step by step: The loop crossover operation method is used. In the process of operation, new individuals can inherit the superior genes of the previous generation, so as to improve the efficiency of cross-operation and obtain the new generation of individuals with better quality.
(6) Mutation. That is to maintain the randomization of individuals and avoid the convergence of new individuals after mutation. The probability of mutation operator is 0.005. The following equation can be derived: Flip mutation method is used for ensuring that individuals have a better chance of survival and a more natural genetic structure.
(7) End. The improved termination rule adopts the double termination condition [13], which is conducive to obtaining the real optimal solution when the solution of genetic algorithm approaches the optimal solution.
(8) In addition, for this model, besides improving the basic structure of genetic algorithm, it also needs to calculate transportation cost, goods damage cost and energy consumption cost.
Equation of transportation cost is: where m is the transportation cost per km of the vehicle and d ij is the distance between i and j.

Equation of goods damage cost is:
where c is product price, u is loss coefficient, e is loading and unloading efficiency, and p is selection probability. Equation of energy consumption cost is: where U is the heat conductivity (W/m 2 • C), Sw is the outer surface area (m 2 ), Sn is the inner surface area (m 2 ), t w is the outside temperature of cars (°C), t 0 is the inside temperature of cars (°C), b is the coefficient of vehicle opening degree, t k f is the time when the kth vehicle completes the distribution to the yard, t k s is the time when the car k starts from the warehouse, and v is the energy consumption cost per minute.
Finally, the objective function is obtained.

Experimental path 4.1 Experimental environment
MATLAB software was used to write the improved genetic algorithm, and SPSS software was used for principal component analysis of the original information. The experiment was conducted in a server lab with Windows7, I7 processor, and 16G memory configuration.

Experimental data
Taking a fresh food company in Chongqing, China as an example, with central warehouse in Shapingba as the distribution center, it was assumed that cold chain vehicles provided distribution services to 10 distribution points. The product was chicken breast, the price was 2500 yuan/ton; the temperature of the carriage was controlled at À2.0 to 1.0°C, and the temperature difference between the storage box and the outside environment was 25.0°C. The handling efficiency of logistics operators was 2.0 tons/hour, the speed of logistics vehicles was 50.0 km/hour, the carrying capacity was 5.0 tons, and the volume was 15.0 m 3 . Each delivery point needed to be delivered once a day and the delivery time was concentrated between 5:00 am and 8:00 am. The departure time of the vehicle was 5:00, and the vehicle would return to the distribution center after completion of the distribution. The time window was 30 minutes. Specific requirements are shown in Table 1. The distribution center number was 0.
The goods distribution time of the fresh food company is shown in Table 1. Through the calculation of the actual operation, it is confirmed that the actual time is basically consistent with the time shown in Table 1. If there is no severe traffic jam, the error is within 1 min. For convenient, the transportation time is the same as the time shown in Table 1, and moreover the situation of severe traffic jam is not considered. By taking points on the map, the distance traveled in the minimum time could be obtained. d ij is the distance between starting point i and ending point j. The distance between delivery points is shown in Table 2.

Experimental results
Considering the vehicle transportation cost, refrigeration cost, heat consumption and other cost problems, after several iterations, the optimal individual was extracted and decoded, and finally the optimal path of cold chain logistics was obtained. H was set as the cost and the objective function was obtained: where r is pyroconductivity and s is area.
For the improved genetic algorithm, after many random experiments, the optimal solutions obtained after multiple random experiments are shown in Table 3.
The experimental results showed that the maximum number of iterations was satisfied at the 72nd time of iteration, and the optimal solution was 2480.145. That is to say, the total cost of cold chain logistics transportation in this model was 2480.145 yuan. In addition, three specific transport paths were obtained under this optimal condition: 0-6-5-2-0, 0-6-1-9-7-0, 0-4-2-8-0, thus forming the optimal distribution path combination.
However, if the traditional genetic algorithm was adopted and the data of this model were also substituted, the optimal path was 2889.205. Compared with the traditional genetic algorithm, the transportation cost of the optimal path obtained by the improved algorithm was greatly reduced and the average adaptive value was relatively high. The improved genetic algorithm could greatly reduce the financial and human resources needed by the cold chain logistics transportation company, thus better reducing the total cost and achieving the maximum profit. At the same time, the cost was reduced. It meant that fresh transportation companies had more advantages in terms of transportation prices, which was beneficial to expand the company's market and attract more passengers. The comparison of the two algorithms in transportation, cargo loss and energy consumption cost is shown in Figure 3. It was assumed that the encoding, initialization population, fitness function, selection, crossover, mutation and termination processes in the process of improving the genetic algorithm were represented by number 1-7 respectively. The comparison of the error degree between the traditional algorithm and the improved algorithm is shown in Figure 4.
The optimization process of the traditional genetic algorithm may be premature, which will lower the search efficiency of the whole population. The improved genetic algorithm accelerates the speed of the algorithm and effectively avoids the loss of satisfactory solutions. Meanwhile, it greatly improves the efficiency of optimization, reduces errors, ensures the accuracy and efficiency of logistics transportation, and makes the selected path more optimized. At the same time, it further reduces the risk of higher price due to the increase of cost caused by error transportation to some extent.

Conclusion
Taking the optimization of the route of fresh food cold chain transportation as the starting point, a specific model case was built, and the costs generated in the whole process were calculated. The improved genetic algorithm was used for planning in the process of exploration. Finally, the cost result of the improved genetic algorithm was compared with the traditional genetic algorithm to obtain the optimal transportation path group. The experimental results demonstrated that the improved genetic algorithm obtained the optimal solution after 72 times of iterations, three vehicles were needed, the transportation routes were 0-6-5-2-0, 0-6-1-9-7-0 and 0-4-2-8-0, and the total cost was 2480.145 yuan; the traditional genetic algorithm needed a total cost of 2889.205 yuan, and the transportation cost, cargo damage cost and power consumption cost of the improved genetic algorithm were lower; the degree of error of the improved genetic algorithm remained at a low level in the calculation process.