Research on Logistics Distribution Center Location Based on Hybrid Beetle Antennae Search and Rain Algorithm

The location of logistics distribution centers is a crucial issue in modern logistics distribution systems. In order to obtain a more reasonable solution, an effective optimization algorithm is essential. This paper proposes a new hybrid method, named the beetle antennae search–rain algorithm (BRA), for the problem of logistics distribution centers’ location. The innovation of the BRA is embodied in three aspects. Firstly, the beetle antennae search (BAS) algorithm is embedded into the rain algorithm (RA); thus, the BAS is improved from an individual search to a swarm intelligent search and the global search ability is improved. Secondly, the search direction strategy of the BAS algorithm is incorporated into the RA, which can improve response speed while ensuring optimization performance. Finally, the search precision is improved by the mechanism of eliminating the inferior solution and generating a new solution. The BRA is tested on 10 benchmark functions and applied to solve the logistics distribution centers’ location problem. The performance of the BRA is compared to that of several classical heuristics by using relevant evaluation indexes and dynamic optimization convergence graphs. Experimental results show that the BRA outperforms the BAS algorithm, the RA and some other classic heuristics. It is also revealed that the BRA is an effective and competitive algorithm for logistics distribution centers’ location.


Introduction
The location of logistics distribution centers is a planning process to select a suitable location to establish a distribution center in a region, including several demand points [1]. The logistics distribution center is an important part of the logistics distribution system, which decides the whole function of the logistics distribution system [2]. The location decision of logistics distribution centers is not only related to the future operating income and the expenditure of the logistics distribution center, as well as the level of service to customers, but it is also related to the rationalization of the whole logistics system [3]. Considering the influence of complex conditions, such as transportation conditions, customer demand and the distribution of goods, the scientific selection of the location and the quantity of logistics distribution centers can effectively save the cost of investment and ensure the efficient operation of the whole logistics system, which is of great significance to the management of the whole logistics chain [4,5]. The location of logistics distribution centers is a non-convex mathematical model with complex constraints, which belongs to NP-hard nonlinear programming [6]. There are many classical methods to solve this mathematical model, such as the gravity method [7], the bilevel programming method [8], the Branch and Bound method [9] and so on. With the rapid development of the logistics market, the scale of the logistics distribution system is becoming larger and larger, and it is more and more difficult to solve this mathematical model by traditional methods [10]. Therefore, it is necessary to explore efficient algorithms to solve this problem. In recent years, heuristic algorithms have been widely used in complex optimization problems, and it also provides a new way to solve the logistics distribution centers' location problem. For example, Wang, Y. and Ma, X.L. et al. presented a hybrid particle-swarm optimization-genetic algorithm for a two-echelon logistics distribution region-partitioning problem [11]; Cui, H.X. and Qiu, J.L. et al. used an adaptive genetic algorithm to solve route optimization in township logistics distribution based on customer satisfaction [12]; Enrique, D. and José, M. proposed a neural model for the p-median problem, which is also one of the most popular and well-known facility location problems [13]; Thongdee, T. and Pitakaso, R. presented a differential evolution algorithms to solve a multi-objective, source and stage location-allocation problem [14]; Jha, A. and Somani, K. et al. used a modified adaptive differential evolution algorithm to minimize the transportation cost of a joint inventory location model [15]; Wang, L. and Qu, H. et al. adopted an effective hybrid self-adapting deferential evolution algorithm for the joint replenishment and location-inventory problem in a tree-level, supply-level supply chain [16]; Hua, X. and Hu, X. et al. presented an adaptive particle-swarm algorithm for the location of logistics distribution centers [17]; Qi, C.M. adopted an improved discrete particle-swarm optimization in the logistics distribution routing problem [18]; Liu, H.J. proposed an ant colony algorithm for cloud-computing adaptive task scheduling based on an ant colony algorithm [19]; Teschemacher, U. and Reinhart, G. presented ant colony optimization algorithms to solve and enable dynamic milk-run logistics [20]; and so on. The application of heuristics to the logistics distribution centers' location problem and the improvement of original algorithms to enhance the performance of solving the logistics distribution centers' location problem by scholars have a profound impact on the development of the logistics distribution centers' location.
Although these improvements have been made with the use of heuristic algorithm to solve the logistics distribution centers' location problem, it is worth further study because of its multiple constraints and complexity. Therefore, new algorithms to solve this problem have attracted more and more attention in recent years. The beetle antennae search (BAS) algorithm is an excellent bionic algorithm designed according to the feeding characteristics of beetles [21,22]. It has the characteristics of good generality and being easy to integrate into other algorithms, and it has been successfully applied in many fields, such as image processing [23], predictive controls [24], neural networks [25] and so on. The rain algorithm (RA) is a kind of swarm intelligence optimization algorithm based on the raindrop phenomenon in nature. It has a good fine-tuning ability to avoid the algorithm falling into local optimization, and it can maintain good diversity of the population [26]. In this paper, a hybrid algorithm named BRA is proposed based on the analysis of the disadvantages and advantages of the BAS algorithm and the RA, and it is used to solve the location problem of the logistics distribution center. The experimental results demonstrate the effectiveness of the hybrid algorithm.

Logistics Distribution Center Location Model
This paper studies how to select some locations for logistics distribution centers in a limited number of locations, and how to provide transportation for all locations so as to minimize the total cost. Therefore, the following assumptions were made:

•
The logistics distribution center needs to satisfy the demand of all the locations.

•
Each demand location has and can only be supplied by one logistics distribution center.

•
The product of M d and N d is the smallest, where M d is the demand of each location and N d is the distance to the nearest distribution center.

•
Other costs are not considered in this paper.
The logistics distribution center location model based on the above assumptions is as follows [2,27]: where the objective function minF represents the minimum product of the demand quantity and the distance from the selected logistics distribution center j to the location i distributed by it; k represents the maximum distance from the selected logistics distribution center j to the location i to be distributed by it; M i represents the collection of other logistics distribution centers whose distance from other locations to the distribution center is less than k; h i is the demand for position i; and d ij represents the distance between location i and the nearest distribution center j. The distribution area shall be within k. Equations (2)-(6) represent the constraints of the model. Equation (2) guarantees that each demand point can only be served by one distribution center. Equation (3) indicates that there will be no customers at locations that do not have distribution centers. Equation (4) specifies that the number of distribution centers selected is r. Equation (5) indicates that z ij and e j are the 0-1 variables. Equation (6) ensures that the demand point is within the range of the distribution center.

The Original BAS Algorithm
The BAS algorithm is an intelligent optimization algorithm based on the foraging behavior of beetles, proposed by researchers Xiangyuan Jiang and Shuai Li in 2017. The beetle has two long antennae. During the process of feeding, if the left antennae receives a higher smell intensity than the right, then the beetle will, in its next step, fly to the left. Otherwise, it will fly to the right. Based on this simple principle, the beetle can effectively find food. The original BAS algorithm consists of the following steps:

•
Step 1: Build a search model that describes a random direction of the beetle's search, where rands( ) is a random function and D is the dimension of solution space.

•
Step 2: Create the space coordinates of beetle's left and right antennae, where x lt and x rt indicate the position of the left and right antennae of the longicorn beetle on the t iteration, respectively; x t indicates the position of the centroid of the longicorn beetle on the t iteration; and d 0 indicates the distance between the left and right antennae.

•
Step 3: The fitness function is used to judge the intensity of food smell received by the left and right antennae, that is, the values of f (x l ) and f (x r ). f ( ) denotes the fitness function.

•
Step 4: Update the position of the longhorn beetle based on Equation (9), where δ t denotes the step size factor at the t iteration and sign( ) is a symbolic function.

•
Step 5: Determine whether the current solution meets the stop condition. If this condition is satisfied, stop the execution. Otherwise, jump to Step 2 and execute the loop.

The Original RA
The RA is a swarm intelligence search algorithm proposed by researchers Chi Rui and Chi Xuexin, who were inspired by the natural raindrop phenomenon in 2022. This algorithm has three parts: generate the initial raindrops; split and recombine the raindrops; and flow to the lowest position. The steps of the RA are as follows:

•
Step 1: A random number of raindrops are produced in dark clouds, as shown in Equation (10): where rand(0, 1) is a random number with uniform distribution. Step 2: The raindrop falls on the ground and splits into many small raindrops, as shown in Equation (11): where → u j t is the position of the split little raindrop. rand(−1, 1) is a group of uniformly distributed D-dimensional random numbers. R t represents the coverage radius of a raindrop that splits into small raindrops. R max and R min represent the maximum and minimum values of R t , respectively.

•
Step 3: These split small raindrops are recombined into large raindrops based on Equation (12): where N S represents the number of the split small raindrops.

•
Step 4: The weight ω t i of the raindrops is calculate and the position of the current individual → x t i is updated according to the range of ω t i , as shown in Equation (13): where rand(−1, 1) and rand(0, 1) are random numbers that conform to the normal distribution; V t Pi is the contraction factor of the current raindrop → x t i ; V P max and V P min are the upper and lower limits of V t Pi , respectively; V t Gi is the search factor of the optimal raindrop V t Gi ; and V t Pi and V t Gi are the upper and lower limits of V t Gi , respectively. V t Gi and V t Gi decrease linearly.

•
Step 5: The best raindrop is selected, it is determined whether the end condition is satisfied. If it is satisfied, the execution is stopped. Otherwise, the loop is executed after jumping to Step 2.

The Hybrid BRA Procedure
The BAS algorithm is an individual search behavior of a beetle in a solution space. It has a poor global search ability and easily falls into the local optimum. Even if it reaches near the global optimal solution, its convergence precision is lower than that of the swarm search algorithm. The RA is a kind of swarm intelligence algorithm, and its search strategy and BAS algorithm are close to each other; therefore, this paper embedded the BAS algorithm into the RA, proposing a hybridization called the BRA. This algorithm improves the location update equation from two aspects:

•
In the BAS algorithm, the search direction of the beetle is determined by the fitness values of the left and right antennae. In the RA, the individual can be improved as follows: • In the RA, from Equation (13), it can be seen that the individuals is introduced, and the position update equation is improved as follows: where ν is the maximum radius raindrops near the lowest position and can be modified by the user based on actual needs.
From the above description, the proposed BRA can be described as shown in Figure 1.
domly generated near best x and the search direction is introduced, and the position update equation is improved as follows: where ν is the maximum radius raindrops near the lowest position and can be modified by the user based on actual needs. From the above description, the proposed BRA can be described as shown in Figure 1.
The proposed BRA Set the initial parameters values. Generate a population of N individuals using Equation (7). Split and recombine the raindrops using Equations (11) and (12). Calculate the position weight t i ω and  of the raindrop using Equation (14). ) End if End for End while Output the optimal position

Experimental Studies on Benchmark Functions
This section is divided by subheadings. It should provide a concise and precise description of the experimental results and their interpretation, as well as the experimental conclusions that can be drawn.

Benchmark Functions
In order to verify the optimization performance of the BRA, 10 classic benchmark function optimization problems were selected for testing [28,29]. The specific function expressions are shown in Table 1 (the dimensions are denoted by D). Among these benchmark functions, 1 ( ) F x to 7 ( ) F x are the unimodal functions, which can validate the convergence speed and search precision of the algorithm, and 8 ( ) F x to 10 ( ) F x are the multimodal functions with many local minima, which can verify the global search ability of the algorithm. These functions are widely used to verify the optimization performance of the algorithm.

Experimental Studies on Benchmark Functions
This section is divided by subheadings. It should provide a concise and precise description of the experimental results and their interpretation, as well as the experimental conclusions that can be drawn.

Benchmark Functions
In order to verify the optimization performance of the BRA, 10 classic benchmark function optimization problems were selected for testing [28,29]. The specific function expressions are shown in Table 1 (the dimensions are denoted by D). Among these benchmark functions, F 1 (x) to F 7 (x) are the unimodal functions, which can validate the convergence speed and search precision of the algorithm, and F 8 (x) to F 10 (x) are the multimodal functions with many local minima, which can verify the global search ability of the algorithm. These functions are widely used to verify the optimization performance of the algorithm.

Parameter Setting
In this paper, the BRA is compared with particle-swarm optimization (PSO), the genetic algorithm (GA), the bat-inspired algorithm (BA) [30], the BAS algorithm and the RA, comparing and analyzing their calculation results. For the above 10 classical function optimization problems, each algorithm runs independently 50 times under the same running environment (Intel Core i5-7200U 2.50 GHz processor, 4.0 GB memory and Windows 7 operating system with Matlab 2013b). The population size of the algorithms is denoted by N = 20, and the maximum evolutionary algebra is denoted by t max = 2000. The other parameters of these algorithms are set as follows:

Numerical Results and Analysis
The results of PSO, the GA, the BA, the BAS algorithm, the RA and the BRA for the above 10 function optimization problems are calculated, and the best value (Best), worst value (Worst), mean value (Mean) and standard deviation value (Std) are taken as the evaluation indexes of the performance of these algorithms. Table 2 shows the results of the six algorithms for 10 function optimization problems. The optimal results for each evaluation indexes are shown in bold. For the vast majority of these 10 function optimization problems, the BRA can obtain smaller results and perform better optimization performance. The Best and Worst evaluation indexes represent the interval of the optimal value obtained by the algorithm in 50 independent runs. The smaller the value of these two evaluation indexes, the higher the accuracy of the algorithm. The Mean and Std evaluation indexes measure the stability of the algorithm in 50 independent runs. The closer the two evaluation indexes are, the higher the stability of the algorithm is. As can be seen from Table 2, for the unimodal function F 1 − F 7 , the Best and Worst values of the BRA are both minimum, and the Worst values of the BRA are smaller than the Best values of the other five algorithms. The results show that the BRA is much more accurate than the other five algorithms. The Mean and Std values of the BRA are of the same order of magnitude, which shows that the BRA can ensure high accuracy and good stability and robustness. For the multimodal function F 8 and F 9 , the values of the four evaluation indexes for the BRA are all 0, which shows that the algorithm obtained the theoretical optimal value in 50 independent runs, and it can easily jump out of the local optimal value. It shows excellent global search ability, high precision and reliable stability. For the multimodal function F 10 , although the BRA did not find the theoretical optimal value, but compared with the other five algorithms, the value of its four evaluation indexes is the smallest, and it shows excellent optimization performance. To sum up, the BRA, for the 10 benchmark functions in Table 1, can obtain relatively good results.
In order to directly compare the performance of PSO, the GA, the BA, the BAS algorithm, the RA and the BRA, the following convergence curves of 10 typical function optimization problems are given. The vertical axis of the graph represents the optimal value obtained by each generation of the algorithm (for ease of comparison, the logarithm of the optimal function value obtained is based on 10), and the horizontal axis of the graph represents the evolutionary algebra of the algorithm.
As can be seen from Figure 2, for the F 1 , F 3 , F 4 , F 8 and F 9 functions, the BRA had the best convergence speed and solution accuracy compared with the other five comparison algorithms. The BRA can quickly reach the optimal value in the early stage, and then reach local optimization to improve the accuracy of the solution. For the F 2 , F 5 , F 6 , F 7 and F 10 functions, the convergence speed of the BRA is not outstanding in the early stage, but the convergence speed and solution precision of the BRA in the later stage are improved greatly, which shows the excellent ability of the algorithm in balancing global and local optimization.
which shows that the BRA can ensure high accuracy and good stability and robustness. For the multimodal function 8 F and 9 F , the values of the four evaluation indexes for the BRA are all 0, which shows that the algorithm obtained the theoretical optimal value in 50 independent runs, and it can easily jump out of the local optimal value. It shows excellent global search ability, high precision and reliable stability. For the multimodal function 10 F , although the BRA did not find the theoretical optimal value, but compared with the other five algorithms, the value of its four evaluation indexes is the smallest, and it shows excellent optimization performance. To sum up, the BRA, for the 10 benchmark functions in Table 1, can obtain relatively good results. In order to directly compare the performance of PSO, the GA, the BA, the BAS algorithm, the RA and the BRA, the following convergence curves of 10 typical function optimization problems are given. The vertical axis of the graph represents the optimal value obtained by each generation of the algorithm (for ease of comparison, the logarithm of the optimal function value obtained is based on 10), and the horizontal axis of the graph represents the evolutionary algebra of the algorithm.
As can be seen from Figure 2, for the 1 F , 3 F , 4 F , 8 F and 9 F functions, the BRA had the best convergence speed and solution accuracy compared with the other five comparison algorithms. The BRA can quickly reach the optimal value in the early stage, and then reach local optimization to improve the accuracy of the solution. For the 2 F , 5 F , In a word, 10 classic function optimization problems were selected to test the optimization performance of the BRA. Compared with five well-known algorithms (PSO, GA, BA, BAS, RA), the results were analyzed statistically, and the hybrid strategy of the BAS algorithm and the RA presented in this paper can improve the performance of the two original algorithms. In a word, 10 classic function optimization problems were selected to test the optimization performance of the BRA. Compared with five well-known algorithms (PSO, GA, BA, BAS, RA), the results were analyzed statistically, and the hybrid strategy of the BAS algorithm and the RA presented in this paper can improve the performance of the two original algorithms.

Application Studies on Logistics Distribution Centers' Location
In order to verify the effectiveness of the BRA for the location selection of the logistics distribution center, this study obtained the information of 31 urban geographic locations that need logistics distribution and selected Equation (1) as the objective function. The mathematical model of the logistics distribution centers' location was established, and the BRA was compared with PSO, the GA, the BA, the BAS algorithm and the RA. A total of 31 cities were supposed to need one demand point each, and 6 were chosen as logistics distribution centers from 31 demand points. The location and demand of address are shown in Table 3. Table 3. The coordinates and capacity of each demand point.  Figure 3 shows six algorithms for the location of the logistics center, and the distribution center shown in the figure is the algorithm for the optimal solution. Taking Figure 3a as an example, distribution center 27 is responsible for the distribution tasks of demand points 26, 28, 30, 31, and distribution center 25 is responsible for the distribution tasks of demand points 20, 21, and 24. Distribution center 17 is responsible for providing services for demand points 3, 18, 19, 22, and distribution center 12 is responsible for delivery services for demand points 1, 11, 13, 14, 15, and 29. Distribution center 16 provides distribution services for demand points 2, 4, 5, 6, 7, 23, and distribution center 8 provides distribution services for demand points 9, 10. By analogy, Figure 3f shows the location scheme of the BRA, which is well understood. The box represents the distribution center, the dot represents the demand point, and the line between the box and the dot indicates that the goods at a demand point are distributed by the logistics distribution center. The BRA proposed in this paper is used to optimize the location model of the logistics distribution center, and the solution is [5,9,12,17,20,27].
In order to compare the results of these six algorithms for the logistics distribution centers' location problem more intuitively, the convergence curves of these six algorithms are shown in Figure 4. The vertical axis of the graph represents the optimal value of the objective function, and the horizontal axis represents the evolutionary algebra of the algorithm. As can be seen from Figure 4, compared with PSO, the GA, the BA, the BAS algorithm and the RA, the BRA has the best solution precision and optimization speed. The solution quality and convergence speed of the RA are second only to the BRA. The GA is inferior to the BRA and RA in accuracy and convergence speed, but superior to PSO and the BA. The BAS algorithm has the slowest searching speed and the lowest solution precision.  In order to compare the results of these six algorithms for the logistics distribution centers' location problem more intuitively, the convergence curves of these six algorithms are shown in Figure 4. The vertical axis of the graph represents the optimal value of the objective function, and the horizontal axis represents the evolutionary algebra of the algorithm. As can be seen from Figure 4, compared with PSO, the GA, the BA, the BAS algorithm and the RA, the BRA has the best solution precision and optimization speed. The solution quality and convergence speed of the RA are second only to the BRA. The GA is inferior to the BRA and RA in accuracy and convergence speed, but superior to PSO and the BA. The BAS algorithm has the slowest searching speed and the lowest solution precision.   Table 4 shows the optimal results of six intelligent algorithms, PSO, G RA and BRA, for the logistics distribution centers' location problem.

Algorithms
Optimal Distribution Center (j)  j1  j2  j3  j4  j5  j6  PSO  27  16  25  17  8  12  GA  30  20  9  14  17  5  BA  19  9  25  20  8  4  BAS  16  25  9  18  14  17  RA  5  30  9  20  12  17  BRA  5  27  9  20  12  17 From the statistical results in Table 4, it can be seen that, compared wi five known algorithms, the BRA proposed in this paper has the smallest opt that is, the lowest cost. The optimal fitness function value . The results of the GA are worse than those of the BRA but better than those of PSO, the BA and the BAS algorithm, and the fitness fu . On the whol better than the other five contrast algorithms, and it has the lowest cost. The ues obtained by the RA and GA are slightly worse than those obtained by th the cost is in the middle. The optimal values obtained by the BAS algorithm ha results, and the cost of obtaining is the highest.
To sum up, the BRA proposed in this paper is used to solve the location logistics distribution centers, which further verifies the optimization perform BRA by comparing the calculated results with those of known algorithms P BAS, and RA. The statistical analysis shows that the convergence speed and so  Table 4 shows the optimal results of six intelligent algorithms, PSO, GA, BA, BAS, RA and BRA, for the logistics distribution centers' location problem. From the statistical results in Table 4, it can be seen that, compared with the other five known algorithms, the BRA proposed in this paper has the smallest optimal results, that is, the lowest cost. The optimal fitness function value f * ( → x ) = 5.54 × 10 5 is obtained at solution → x * = (5, 27,9,20,12,17). The optimal value obtained by the RA is second only to the BRA, and a better fitness function value f * ( → x ) = 5.67 × 10 5 is obtained at solution → x * = (5,9,30,20,12,17). The results of the GA are worse than those of the BRA and the RA, but better than those of PSO, the BA and the BAS algorithm, and the fitness function value f * ( → x ) = 5.74 × 10 5 is obtained at solution → x * = (30,20,9,14,17,5). On the whole, the BRA is better than the other five contrast algorithms, and it has the lowest cost. The optimal values obtained by the RA and GA are slightly worse than those obtained by the BRA, and the cost is in the middle. The optimal values obtained by the BAS algorithm have the worst results, and the cost of obtaining is the highest.
To sum up, the BRA proposed in this paper is used to solve the location problem of logistics distribution centers, which further verifies the optimization performance of the BRA by comparing the calculated results with those of known algorithms PSO, GA, BA, BAS, and RA. The statistical analysis shows that the convergence speed and solution quality of the BRA are better than those of the contrast algorithm, and the BRA can be used to solve the location problem of logistics distribution centers, which can provide reference for actual logistics location planning.

Conclusions
A hybrid algorithm has been designed to solve the problem that the individual search in the BAS algorithm easily falls into the local optimum, as well as the slow convergence speed and the low searching precision. The hybrid algorithm embeds the BAS algorithm into the RA, which makes up the shortcomings of using the BAS algorithm for individual search and integrates the dynamic step strategy of the BAS algorithm into the RA effectively. The RA can effectively balance all and local search capabilities. Finally, by eliminating the inferior solution and generating the same number of solutions in the region near the global optimal solution, the diversity of the hybrid algorithm is improved, and the ability of the BRA to fine tune is enhanced, which reduces the possibility of the algorithm falling into the local optimum. The BRA was used to solve 10 function optimization problems, and the simulation results verified the effectiveness of the proposed algorithm. It was used to solve the location problem of logistics distribution centers, and the comparative analysis shows that the algorithm is an effective method to solve the location problem of logistics distribution centers. It can provide a new idea for decision makers to carry out scientific logistics network planning.