Two-Stage Vehicle Routing Optimization for Logistics Distribution Based on HSA-HGBS Algorithm

Aiming at the problems of complex urban road network, low efficiency of logistics distribution, and the difficulty of large-scale logistics distribution area division and routing planning, this paper proposes a two-stage logistics distribution vehicle routing optimization (VRP) method based on the establishment of a multi-factor complex road network constrained logistics distribution mathematical model. Considering the complex traffic elements and road network topological structure in logistics and distribution, in the first stage, a heuristic simulated annealing (HSA) distribution region partitioning algorithm is proposed with the objective of balancing vehicle task load to divide the urban logistics distribution network under complex road networks, so as to reduce the region scale and path search cost. In the second stage of route decision making, aiming at minimizing the total cost of logistics distribution, combining the VRP problem with complex road network conditions, a heuristic path search method combined with complex road network model constraints is proposed. In this stage, a hybrid genetic beam search(HGBS) algorithm is used to plan the path nodes, reduce the randomness of the model in the initial search for paths by heuristic genetic algorithms, then combine with Beam Search methods to reduce the space and time used for the search, and use optimization algorithms to improve the accuracy of independent sub-region routing optimization and the rationality of overall physical distribution route selection. Finally, the proposed method is validated in this paper with two practical cases. The experimental results show that the two-stage decision-making algorithm proposed in this paper has certain advantages in partitioning schemes, minimizing total cost and iteration times. Through comparison, the optimization ability of this method for logistics distribution networks is proved.


I. INTRODUCTION
distribution is of great significance to reduce logistics opera-27 tion costs and improve customer service satisfaction. There-28 fore, the research of vehicle routing optimization (VRP) for 29 multi-factor complex road network constraints has been paid 30 more and more attention. 31 Since Dantzig and Ramser [1] proposed the truck schedul-32 ing problem, researchers have been studying the relationship 33 between vehicle routing planning and delivery planning. It is 34 considered a typical case of VRP, involving the distribution 35 With the gradual increase of the problem scale, some 92 scholars propose to use heuristic search algorithm to solve 93 the vehicle path planning problem. General computational 94 intelligence heuristic search algorithms are divided into ten 95 types: biological based, social based, chemical based, phys-96 ical based, music based, mathematics based, sports based, 97 population-based, plant-based and water based [8], [9]. The 98 heuristic algorithm is based on the optimization algorithm. 99 Its basic idea is to give a feasible solution to the combi-100 natorial optimization problem within an acceptable range. 101 In the VRP Problem, the heuristic search algorithms mainly 102 used in VRP problems include evolutionary algorithm [12], 103 particle swarm optimization algorithm [13], ant colony algo-104 rithm [14], genetic algorithm [15], intelligent water drop, tabu 105 search [7] and their improvement types [16], [17], [18]. Com-106 pared with the exact search algorithm, the heuristic search 107 algorithm has better robustness and feasibility when dealing 108 with large-scale VRP problems. 109 Based on the existing research, both exact search algorithm 110 and intelligent heuristic search algorithm can be used to 111 solve VRP and related problems. Exact algorithms can find 112 the optimal solution for the problem. However, it is highly 113 dependent on the solution space, the number of constraints 114 and the number of decision variables in the problem model, 115 and cannot provide a general solution strategy for different 116 types of variables, objectives and constraints [7], [9]. How-117 ever, when the scale of the problem becomes larger, there 118 will be a ''combination explosion'' phenomenon in exact 119 algorithm that will consume too much computing power and 120 storage space. By designing the heuristic function, heuristic 121 algorithms can get the optimal solution to a search problem 122 in a very short time. For the NP problem, it can also get 123 a better solution in polynomial time. Heuristic algorithms 124 can further improve the accuracy of vehicle routing. The 125 classification and advantages and disadvantages of vehicle 126 routing optimization methods for logistics distribution are 127 shown in Table 1. 128 At present, there are three kinds of data used in VRP 129 research The first is the standard Solomon data-set [19], 130 which is limited to dozens of points. However, in the actual 131 distribution process, especially in industries closely related 132 to daily life, such as garbage collection, milk collection 133 and distribution, cigarette distribution, and so on, the cus-134 tomer group consists of residents or retailers distributed in 135 all corners of the city, and the scale of the problem to be 136 solved is often in the order of 100 or 1000. Whether exact 137 algorithms or heuristic algorithms are directly used to solve 138 large-scale problems, they have limitations. The second is 139 the data set based on experimental simulation. Compared 140 with the standard data set, the scale of this kind of data 141 will expand. For example, Li et al. [ The urban road network has complexity, which is mainly logistics distribution. In the first stage, aiming at bal-203 ancing the vehicle task load, the overall distribution 204 region is divided into independent sub-regions by sim-205 ulated annealing algorithms, so as to reduce the region 206 scale and path optimization range, reduce the path 207 search cost, and improve the path search effect.

208
(3) In the second stage of route decision-making, aiming 209 at minimizing the total cost of logistics distribution 210 and considering the complex road network constraints 211 in each sub-regions after the partition of the regional 212 road network, a hybrid genetic beam search algorithm 213 is proposed to realize vehicle routing optimization and 214 enhance the accuracy of independent sub-region rout-215 ing optimization and the rationality of overall physical 216 allocation routing selection. Traditional VRP can be defined as [1]: (1) Multiple customers 223 need transportation services at the same time, and multiple 224 vehicles are required to solve customer demand problems. 225 (2) Each customer can only be visited once by one vehicle. 226 (3) All vehicles start from the depots and finally return to the 227 depots. (4) All vehicles must meet the loading capacity con-228 straints. Under the above constraints, reasonably arrange the 229 distribution lines to minimize the total distribution distance 230 and shorten the distribution time.

231
The precondition for solving the traditional VRP is that 232 the location of the logistics distribution center, the location 233 of the customer point, and the shortest path between any 234 two customer points are known. On this basis, the customer 235 is assigned to different vehicles, and the customer access 236 sequence is arranged for each vehicle, so as to determine the 237 problem solution.

238
The search traversal network graph of traditional VRP is 239 relatively simple, which is an undirected graph with cus-240 tomers as nodes and the shortest known path as the edge. 241 The search network graph of the VRP model considering 242 complex road networks is a directed graph composed of path 243 nodes(refers to the intersection of two roads) [27], customer 244 nodes, and paths, with additional consideration of actual road 245 traffic restrictions (such as one-way driving and motor vehi-246 cles). Therefore, the VRP model considering complex road 247 networks is more practical. In logistics distribution, urban road conditions (mainly 251 reflected in the complexity of urban road networks) affect 252 the operation of the whole distribution system. The complex 253 road network basically reflects the road network structure 254 of the real city. Its complexity is mainly reflected in the 255 detailed and complex traffic elements and complex topology. 256 Specifically, there may be many connection paths between 257 two points. The traffic network data in the process of logistics 258 distribution and transportation belongs to spatial information.

259
Before modeling, it is necessary to grid the urban logistics 260 distribution region according to the road network.

261
The model of the urban complex road network can be 262 expressed as: and road grade on road capacity is evaluated, import formula 281 P = (P 1 × U 2 )/(P 2 × U 1 ), (P 1 and U 1 are the average fuel 282 consumption and speed of national roads in plain regions. P 2 283 and U 2 are the corresponding parameters of a certain class 284 of highway in a certain place), and then, in formula (6), 285 P(G) indicates that when path nodes v i to v j are passable, 286 road congestion information P(v i , v j ) including all path nodes 287 exists.

288
The demand information of the customer distribution cen-289 ter can be described as: In formula (7), the customer distribution center demand is 295 represented by set C, where, c d is the demand information 296 of the d th customer distribution node J d , and S is the total 297 number of customer distribution points, d = 1, 2, 3, . . . , S. 298 VOLUME 10, 2022 indicates that the customer distribution node J d is on the 301 traffic side where v u points to v p (that is, there is a path 302 between any two path nodes). q d represents the distribution to the actual situation.

350
(3) When the customer distribution center is just beside 351 the street, it is necessary to consider that the two customer 352 distribution centers are distributed on different sides of the 353 two-way traffic road and there is an isolation belt in the center 354 of the road. At this time, the ideal shortest distance between 355 the two customer distribution centers should be the driving 356 distance of the vehicle entering the node of the road network 357 first and then turning back to the customer distribution center 358 on the other side.

359
(4) Vehicle transportation path description: the vehicle 360 transportation path is described by the arrangement of path 361 nodes and customer distribution points, indicating the path 362 nodes and customer distribution points that the vehicle passes 363 through in turn.

365
The partitioning of the logistics distribution region is a com-366 plex and comprehensive problem that needs to consider many 367 factors. For many years, it has been a research hotspot for 368 scholars, involving logistics regional segmentation, vehicle 369 scheduling, vehicle optimal combination, facility scale, dis-370 tribution time, and distribution cost. These problems will 371 directly affect the efficiency, cost, capacity, and service level 372 of logistics distribution regional planning.

373
The problem of logistics distribution region partitioning is 374 to determine a set of large and small car distribution schemes 375 and then determine the selection of transfer stations and the 376 attribution division of distribution units, so as to minimize the 377 total cost of the objective function. The schematic diagram 378 before and after region partitioning is shown in Figure 1.

379
The logistics distribution partitioning considering of com-380 plex road network can more easily deal with all links of 381 logistics distribution, and carry out effective management and 382 decision-making analysis on the problems involved, so as to 383 meet the requirements of modern logistics and help logis-384 tics distribution enterprises make effective use of existing 385 resources, reduce consumption and improve efficiency.

386
In the first stage, the heuristic simulated annealing algo-387 rithm is used to divide the vehicle distribution region. Firstly, 388 the heuristic simulated annealing algorithm is used to gen-389 erate the initial partition decomposition: In the first stage, 390 heuristic simulated annealing algorithm is used to divide the 391 vehicle distribution region. First, the heuristic SA algorithm 392 is used to generate the initial partition decomposition:

398
(2) Whether m is less than or equal to the limited number of 399 vehicles N , if so, proceed to (3); Otherwise, it indicates that 400 the division is completed, the algorithm ends, and turn to (6) 401 to evaluate the solution.   The logistics distribution model considering the complex 426 road network constructed in the previous stage is taken as 427 the input of the first stage decision-making, the distribution 428 region NC m of divided N vehicles is taken as the output, and 429 transmitted to the second stage decision-making as the input. 430

431
After the first stage decision is completed, the distribution 432 task set NC of N vehicles will be output. For the second stage 433 of decision-making, a heuristic hybrid genetic-beam search 434 algorithm is proposed in this paper. The total cost of vehicle distribution considering the com-446 plex road networks can be expressed as: no practical operational significance. Equations (14) and ( 1, 2, . . . , k , . . . , m, . . . , N ) ω: Time delay cost corresponding to unit distance D: set of distribution centers and customers V = D\{v 0 }: s customer distribution nodes FY : Cost matrix, cost fy vi,vj ∈ FY corresponding to each path a vi,vj ∈ A v i = v i (x, y): Coordinates of path node v i Q: Loading capacity of the vehicles A: The set of paths is composed of the shortest paths between any two points in D. is a heuris-488 tic graph search algorithm, which is usually used when the 489 solution space of the graph is relatively large. In order to 490 reduce the space and time occupied by the search, some 491 nodes with poor quality are cut off and some nodes with high 492 quality are retained during each step of depth expansion. This 493 reduces space consumption and improves time efficiency.In 494 the second stage, the hybrid genetic-beam search (HGBS) 495 algorithm is used to plan the path nodes.

496
The algorithm flow is shown in Figure 3. The algorithm 497 takes the customer node as the starting point of initialization 498 and the path search minimization cost as the output. The 499 specific steps are as follows: The route information and distribution information are 502 chromosome coded, and the two-dimensional chromosome 503 coding method is adopted.  The chromosomes encoded are illustrated in Table 2. For 508 example, [1,(3,1)] represents in the sub-region 1, the NO. Two individuals w r and w l are randomly selected from the 542 parent generation, and the connection values are randomly 543 and independently selected for exchange. The cross operation 544 at bit b is as follows: where β is the random number between [0,1].

548
Complete uniform mutation with a predetermined proba-549 bility to improve individual fitness and approach the optimal 550 solution from a local point of view. The new gene value after 551 mutation is: where w max , w min are the maximum and minimum values of 554 the initial individual, γ is the random number between [0,1]. 555 To sum up, after many cross variations, the optimal path of 556 urban logistics distribution region is obtained.

558
In this section, we use Matlab 2020a to carry out simulation 559 experiments. The experimental equipment is a computer with 560 i7-7500 2.90GHz CPU. The computer system is windows10 561 64 bit Professional Edition with 4G RAM.     Table 4 lists the coordinates of some customer distribution 588 nodes and road network nodes and the demand information 589 for customer distribution nodes.

590
In the second stage of decision-making, we first discussed For the simulated annealing algorithm, the initial temperature 604 is 600 • , the cooling coefficient is 0.99, the cooling times are 605 1000, the number of internal cycles before each cooling is 606 100, and the number of distribution vehicles is set according 607 to the number of distribution centers. Since each customer distribution node usually contains more 621 than 20 customers, the requirements of the Solomon data-set 622 or extended Solomon data-set are collected for each cus-623 tomer. In order to better reflect the actual distribution demand 624 of each customer point, in this embodiment, the customer 625 delivery demand of RC1_2_1 in Solomon data set [19] is 626 multiplied by 20 as the delivery demand, that is, the data set 627 is expanded to meet the actual distribution demand.

628
For the HGBS algorithm, setting vehicle carrying capacity 629 Q = 2000, the fixed cost of vehicles F = 500, the fixed cost 630 of vehicles F = 500, the maximum transportation distance 631 of vehicle LD = 35 mile, the beam Search width of bundle 632 search bw = 4, the maximum number of generations is 633 S max = 500, the crossover probability p c = 0.8, the mutation 634 probability p m = 0.02.

635
In the first step, the fusion methods of the three algorithms 636 are compared and verified on the Solomon data set. The 637 minimum cost, number of iterations, and algorithm running 638 time obtained by random experiments 5 times are shown in 639 Table 5.

640
It can be seen from Table 5 that before the chromo-641 some crossing, the beam search algorithm is integrated, 642 and the pruning function is introduced to cut the chromo-643 some sequence that does not meet the transportation dis-644 tance limit and vehicle capacity constraint, and pruning is 645 performed once before the chromosome crossover, after the 646 chromosome mutation, both before and after the chromosome 647 crossover. The experimental results show that after five sim-648 ulation experiments, the experimental results show that the 649 average total cost of pruning before chromosome crossing is 650   solution cannot be accurately obtained. Therefore, in this 665 study, we chose to prune before crossing. In addition, the 666 number of iterations of the algorithm is significantly better 667 than that of the other two cases in both minimum cost and 668 optimal results. Pruning the unqualified chromosome before 669 the chromosome crossing ensures the best of the father gen-670 eration, and the offspring obtained after the cross mutation 671 basically inherits the best of the parent, so as to ensure the 672 relative optimal result. However, if the chromosome is pruned 673 after the cross mutation, it is pruning in the offspring, which 674 cannot guarantee global optimization, so the result is optimal. 675 In the second step, the efficiency of the proposed heuristic 676 hybrid algorithm is verified on Solomon data set. We use 677 the same Solomon dataset to implement and test different 678   Table 6, Table 7, and Table 8. When HGBS algo-  For statistical analysis, t-test method has been performed, 707 as shown in the last column of Table 6 and Table 7. H a : It is argued that there is a meaningful difference 713 between the means. In the t-test, there are two hypotheses, H 0 and H a . When 722 the p value is less than 0.01, the H 0 hypothesis is rejected and 723 H a is accepted. When p value is greater than or equal to 0.01, 724 H 0 hypothesis is accepted and H a is rejected. If the test result 725 value of P is less than 0.01, there is a significant difference 726 between the two groups of data. The smaller the P value, the 727 more obvious the difference is, and the greater the difference 728 is from the benchmark data.

729
It can be seen from Table 6 and Table 7 that compared with 730 HGBS algorithm, the p-values of the other eight algorithms 731 are significantly less than 0.01 and all are negative. The t-test 732 of ts-moea is relatively optimal, which is −1.18. The t-test 733 results show that the results obtained by this algorithm are 734 relatively good compared with other algorithms, and the t-test 735 results of ACO are relatively poor, which is −28.65. The t-test 736 results show that the results obtained by this algorithm are 737 relatively poor compared with other algorithms.

738
Based on the t-test results, both the distribution cost per day 739 and the number of iterations are significantly different than 740 each of the other methods. Compared with the Genetic Algo-741 rithm, the total cost of the algorithm is reduced by 14.1%, and 742 the number of iterations required to reach the optimal solution 743 is reduced by 152 times. The reason why HGBS algorithm has 744 achieved this experimental effect is that the pruning operation 745 is carried out before the chromosome crossing of GA, which 746 99656 VOLUME 10, 2022  ensures the optimal selection of the parent generation, so that  In addition, as can be seen from Table 8  Compared with the other four algorithms, HGBS algorithm 771 has the following merits:

772
(1) HGBS algorithm is a hybrid algorithm combining 773 genetic algorithm and beam search algorithm, which has 774 global and local search capabilities.

775
(2) BS algorithm is a graph search algorithm, it is similar 776 to the directed graph of logistics distribution constructed by 777 the logistics distribution model considering complex road 778 networks.

779
(3) The unique pruning function of BS algorithm in the 780 search process can set the search width for the next node 781 search at any time according to the quality of the customer 782 points obtained from the expansion.

783
(4) HGBS algorithm has inherent advantages and can 784 be applied to large-scale logistics distribution network with 785 thousands of customers. As shown in Table 6 and Table 7, 786 the number of iterations of HGBS algorithm is signifi-787 cantly less than that of other methods. As the number 788   of customers increases, this advantage will become more 789 obvious.

790
In summary, the HGBS algorithm proposed in this paper  However, the algorithm still has some disadvantages, such 811 as high computational complexity, imperfect decision space 812 performance, and difficult experimental parameter setting. 813 In the follow-up study, the above factors need to be com-814 prehensively considered to improve the performance of the 815 algorithm.

816
The proposed hybrid algorithm can obtain a better optimal 817 solution for most of the randomly generated initial popula-818 tions, but for those poor initial populations, the pruning func-819 tion rarely appears in the optimal solution. Compared with 820 other methods, the optimization success rate of the method is 821 very high (3 times in 10 times).

822
Finally, according to the regional division results of two 823 examples in the first stage decision-making, the logistics dis-824 tribution vehicle route is optimized, and the classical genetic 825 algorithms GA, EPSO-GA [4], IPSO [42], and HPSO-HGA 826 [18] are compared to verify the effectiveness of the method 827 proposed in this paper on two examples. The operation com-828 parison results are shown in Table 9.

829
The experimental results of the two practical cases are 830 shown in Table 9. The average total cost of the two-stage 831 algorithm proposed in this paper on Case1 is about $28912, 832 which is about 1.8% lower than the optimal HPSO-HGA 833 ($29434) among other algorithms, the number of iterations 834 of the algorithm is reduced by about 5.4%, and the execution time of the algorithm is increased by about 23.2%. The aver-836 age total cost on Case2 is $31174, which is about 7.2% lower 837 than the optimal HPSO-HGA ($33409) in other algorithms, 838 the number of algorithm iterations is about 4.7%, and the 839 algorithm execution time is about 25.6%. As can be seen from Table 9, on the premise of considering the complex urban road Although the two-stage decision algorithm proposed in this 890 paper can better optimize the large-scale urban logistics dis-891 tribution considering the complex road network, there are still 892 some defects. For example, the complex road network con-893 sidered in this paper is limited to the complex road network 894 problem composed of detailed and complex traffic elements 895 and the topological structure of the road network. Although it 896 reflects the actual road network situation to a certain extent, 897 further analysis is still needed in terms of traffic rules, pop-898 ulation density, and measures of motor vehicles (or more 899 accurately, road parameters causing problems). In addition, 900 building a more realistic distribution data set is also the focus 901 and difficulty of the next research.