Comparative Study of Swarm-Based Algorithms for Location-Allocation Optimization of Express Depots

­e location and capacity of express distribution centers and delivery point allocation are mixed-integer programming problems modeled as capacitated location and allocation problems (CLAPs), which may be constrained by the position and capacity of distribution centers and the assignment of delivery points. ­e solution representation signicantly impacts the search eciency when applying swarm-based algorithms to CLAPs. In a traditional encoding scheme, the solution is the direct representation of position, capacity, and assignment of the plan and the constraints are handled by punishment terms. However, the solutions that cannot satisfy the constraints are evaluated during the search process, which reduces the search eciency. A general encoding scheme that uses a vector of uniform range elements is proposed to eliminate the eect of constraints. In this encoding scheme, the number of distribution centers is dynamically determined during the search process, and the capacity of distribution centers and the allocation of delivery points are determined by the random proportion and random key of the elements in the encoded solution vector. ­e proposed encoding scheme is veried on particle swarm optimization, dierential evolution, articial bee colony, and powerful dierential evolution variant, and the performances are compared to those of the traditional encoding scheme. Numerical examples with up to 50 delivery points show that the proposed encoding scheme boosts the performance of all algorithms without altering any operator of the algorithm.


Introduction
Since 2014, the express delivery volume in China has ranked rst in the world for six consecutive years [1]. Statistics show 107.7 billion pieces of delivery in China in 2021, with a 31% growth compared with 2020 [2]. e rapid growth of the Express Delivery Industry has brought erce competition among the participants. e primary delivery companies actively improve service quality and delivery e ciency. For regional express delivery service suppliers, the location of the service center has a signi cant impact on e ciency and, hence, the overall operation cost.
Such a problem is typically modeled as a logistic distribution problem, which minimizes total distances between the distribution center (DC) and associated delivery points (DPs) under certain constraints. e problem is twofold: one considers the location-allocation problem (LAP) of the distribution centers and the other considers the vehicle routing problem (VRP) that starts at the distribution center and goes through each delivery point and back to the distribution center. e joint problem is the location and routing problem (LRP) [3]. Both LAP and VRP are NP-hard, and the combined LRP has attracted attention since the 1960s [4]. e problem structure of LRP is shown in Figure 1.
In LRP, the optimal route associated with a given distribution center may change with the demands of the delivery point or the policy of distribution centers. erefore, the VRP may be left to the distribution centers to solve. Since the delivery points for each distribution center are not many, the local VRP can be solved easily. erefore, the separation of LAP and VRP could signi cantly reduce the complexity of the problem. e LAP may apply to a broader region, such as a country, state, or province. e options for locations are limited to a list of lower-level cities, and the options for allocation are subsets of delivery points. e solution of location usually uses binary representation because the number of options is xed. e solution of allocation usually uses integers to denote the belonging of delivery points.
Since the total number of distribution centers and delivery points is xed, the size of a solution can be xed as well. However, for a city-level LAP, the model and solution representation may vary because the available options for distribution centers can be many, and the setup cost and capacity of di erent options have a signi cant impact on the total cost. On the other hand, the NP-hard nature of LAP makes heuristic algorithms favorable, among which swarm-based algorithms are representative [3,5,6]. e solution representation plays a vital role in applying the algorithm because an e cient encoding scheme may reduce the length of the solution string, smooth the solution space, or eliminate the constraints. For example, choosing N distribution centers out of 100 candidate locations requires 100 binary bits to represent the solution, whereas a oating number representation of the coordinates needs only 2N numbers. When considering the capacity of a distribution center, the binary representation quantizes the solution space and loses smoothness. Finally, the LAP constraints may result in many infeasible solutions, hence reducing the search e ciency.
is paper discusses the city-level express distribution center location problem and provides a new perspective for simplifying the LAP. Floating numbers denote the coordinates of distribution centers, and the delivery point assignment for each distribution center is determined by the decoded sequence of delivery points and the capacity of the distribution center. e total distance between the distribution center and delivery points, setup costs, and operational costs is used to evaluate the solution. Representative swarmbased algorithms, including particle swarm optimization (PSO), di erential evolution (DE), arti cial bee colony (ABC), and a powerful variant of DE, and LSHADE-cnEpSin [7], are compared under two solution encoding schemes.

Literature Review
e LAP tries to determine the location of distribution centers and the delivery points assigned to each distribution center simultaneously. LAP can take various forms in different scenarios. For example, distribution centers are sites for distributing medical services in public health emergencies, and delivery points are a ected in literature [8]. Distribution centers are wastewater treatment plants in the wastewater treatment problem, and delivery points are processing units in literature [9]. Distribution centers are web servers in web services, and delivery points are user centers in literature [10]. For an express distribution center location problem, the operational cost involves the capacity and location of each distribution center, and the capacity is either determined or constrained by the assigned delivery points. Such a problem is called a capacitated location-allocation problem (CLAP) [11].
Much e ort has been put into this issue. Pham et al. [12] applied a hybrid of the Fuzzy-Delphi-TOPSIS approach to identify the critical criteria for choosing the logistic distribution center. Yang et al. [13] considered the distances between manufactory and distribution centers and between the distribution center and customers and combined tabu search and genetic algorithm to select four distribution centers out of ten candidates. Karaoglan et al. [14] modeled the LRP with simultaneous pickup and delivery, which re ects the practice of beer distribution and empty bottle collection. e problem is then solved using an improved version of the simulated annealing (SA) algorithm. e solution of CLAP may bene t from a geospatial information system (GIS) since the regional division and distance between two points can be more precise. Vafaeinejad et al. [15] developed a vector assignment ordered capacitated median problem (VAOCMP) model to describe the re station location and allocation problem. In the VAOCMP model, the arrival time of the re engine to demand points and the capacity of the re facility are considered. e closeness of the re facilities ranks the demand, and a facility will be lled up with closer demands. e problem is then solved by tabu search and simulated annealing (SA). Zheng et al. [16] proposed that the underground metro might be used as a complement to the urban logistics system. ey utilize GIS to nd the shortest path through all the most demanding points. e demanding points are allocated by the Voronoi diagram, which partitions a plane into polygons such that all the points inside a polygon are closest to one of the communities [17].
e demand for delivery points may be stochastic. Expert opinions can be introduced to build the distribution model of the customers with a lack of data. Zhou and Liu [18] used fuzzy numbers to model the customer demand, and the expected cost was used as the minimization goal. e expected cost is obtained by fuzzy simulation, and the model is solved by network simplex programming and genetic algorithms. e location of the demands may also be stochastic. Mousavi and Niaki [19] used the normal distribution to model demand location and fuzzy variables to model the amount of demand. ree cost functions were proposed: (1) minimization of the fuzzy expected cost, which is the integration of the credibility of fuzzy events; (2) the β-cost minimization model, which minimizes the upper bound of transportation cost that has credibility greater than β; and (3) the credibility maximization model. e model is then solved by using fuzzy simulation and a genetic algorithm.   Discrete Dynamics in Nature and Society Noticing the redundancy of express terminal nodes that different express service suppliers establish in the same city, Meng et al. [20] proposed the express terminal nodes optimization integration problem (ETNOIP). e goal of ETNOIP is to establish the minimum number of shared express terminal nodes that could serve a given number of customer clusters. e capacity and scope of an express terminal are included in the cost as well. e model is then solved by SA with neighbor search and shows advantages over immune genetic algorithm (IGA) and CPLEX, an IBM optimization solver.
Many swarm-based algorithms and their variations have emerged in the last two decades. Many swarm-based algorithms have been applied to LAP as well. Xu et al. [21] used the wolf-pack algorithm to optimize the total distance. Bao et al. [6] applied particle swarm optimization (PSO) to a logistic vehicle routing problem. A supported vector machine was introduced to distinguish the state of a particle, and the state will determine whether or not a group of particles will be updated. Moonsri et al. [5] discussed the poultry logistics planning problem, which routes vehicles to each established depot. A new mutation formula is developed in the reinitialization phase of differential evolution (DE) to protect the local structure of the solution, and a location search of partial variables is used to enhance the exploitation ability. Guo and Zhang [3] considered the vehicle routing problem and location-allocation problem as a whole and applied a discrete artificial bee colony (ABC) to determine the choice of recycling centers, the vehicles that serve the recycling center, and the route of the vehicles.
Various models have been proposed in the past decades to describe different scenarios, and more algorithms have been developed to solve the proposed models. e NP-hard nature of CLAP and the constraints that come with it make algorithms unable to reach their full potential. Taking the express distribution center location-allocation problem as an example, we propose a general encoding method for swarmbased algorithms, which eliminates the capacity constraint in allocating delivery points and improves the efficiency of the compared algorithms.

Particle Swarm Optimization (PSO)
. PSO is the most representative swarm-based algorithm. e core mechanism is defined as follows: (1) e position of particles represents the candidate solutions. e symbol x t+1 i,j denotes the j-th coordinate of a particle i in the t + 1 generation, which is updated by the velocity v t+1 i,j associated with each particle. ree parts determine the velocity of a particle in the next generation: (1) Current velocity is weighted by a linearly decreasing factor w(t).
(2) e difference between the current position and the global best position x gbest i,j is scaled by the social learning factor c 1 and a uniform distribution random number rand ∈ [0, 1].
(3) e difference between the current position and the personal best position x pbest i,j is scaled by the personal learning factor c 2 and another uniform distribution random number rand ∈ [0, 1]. e last two parts represent social learning and self-learning. (DE). DE is another widely used swarm-based algorithm that uses other solutions in a swarm, instead of the global or personal best, to generate new solutions. Many mutation operators have been proposed in the literature. In this paper, we adopt the "DE/rand/1" strategy as follows:

Differential Evolution
e mutated solution v t+1 i,j is generated from three solutions that are randomly selected from the swarm and are different from the current solution and each other. e difference between the two is scaled by a factor F and then added to the third solution. Note that only some bits of the selected solution are mutated by probability CR, allowing a subtle modification of the solution. Additionally, randn(1, D) is a random natural number in the range [1, D], ensuring that at least one bit is mutated. e candidate solution u t+1 i,j is retained if the corresponding cost is better than the current one. Given the differential nature of the mutation operator (2), DE conducts large-scale exploration in the early stages and subtle exploitation in the later stages.

Artificial Bee Colony (ABC)
. ABC produces new solutions in three ways that mimic the behaviors of three types of bees: employed, onlooker, and scout bees. e food sources represent the current best solutions. e employed and onlooker bees share the same mutation operator as follows: e difference between the current solution x t i,j and a randomly selected solution x t r,j is scaled by a random number in [−1,1], and added to the current solution. is mechanism allows employed and onlooker bees to search for the alternative to the current solution.
e behavior difference between employed and onlooker bees is that the employed bees make sure each food source is visited once in a cycle. In contrast, the food source i is visited by an onlooker bee with a probability p i defined as follows:

Discrete Dynamics in Nature and Society
where nPop is the population size and fit i is the fitness of the food source i. e onlooker bees are dispatched based on the roulette selection-the solutions with better cost have a higher chance of being visited. Each food source (solution) has a visiting limit. If there is no better solution found around the current solution after a certain number of visits, the food source is abandoned, and a scout bee is sent to generate a new random solution in the search space. e mechanism of employed bees maintains the diversity of the swarm; onlooker bees exploit the neighbors for better solutions, and the food source visiting limit ensures that the algorithm will not be stuck on some solutions.

Ensemble Sinusoidal Parameter Adaptation Incorporated with LSHADE (LDES).
e parameter settings of DE partially depend on the problem. erefore, research on the parameter settings of DE [22] and the adaptive parameters of DE [23] is proposed to tackle this problem. In the research stream of adaptive DE, Zhang and Sanderson [24] proposed a self-adaptive DE, JADE, which generalizes the "DE/current-to-best" mutation strategy to "DE/current-to-p-best" and controls the parameters in a self-adaptive manner. Tanabe and Fukunag [25] proposed a Success-History-Based Adaptive DE (SHADE). As an enhancement to JADE, SHADE utilized a history-based parameter adaptation scheme and ranked third in the real-parameter single objective optimization competition, CEC 2013. Tanabe and Fukunaga [26] later proposed the LSHADE algorithm, which extends the SHADE algorithm with the Linear Population Size Reduction (LPSR). e LPSR of LSHADE reduces the number of function evaluations in the exploitation stage of optimization and further enhances the performance. LSHADE wins the CEC 2014 competition.
Two years later, Awad et al. [7] proposed the LSHADE-EpSin algorithm, which incorporated the ensemble sinusoidal parameter adaptation and became the joint winner of the competition of CEC 2016. One year later, Awad et al. [27] proposed an improved algorithm, LSHADE-cnEpSin, to tackle the problems with high correlation between variables. LSHADE-cnEpSin became the second winner in the competition of CEC 2017. For brevity, we will denote LSHADE-cnEpSin as LDES in the rest of the paper.

Capacitated Location-Allocation Problem.
A complete planning scheme of distribution centers includes the number of distribution centers, the location and capacity of each distribution center, and the delivery points that are serviced by each distribution center. e location of distribution centers affects the delivery mode and distance, hence the efficiency and service quality of the distribution centers. e factors that may affect the location selection of distribution centers may be classified into two classes: natural factors and social factors. Natural factors include the natural conditions, such as mountains and rivers, the conditions of the land, and the distribution of roads [11]. Social factors may include infrastructure, client demand distribution, suppliers, and policies. e capacity of distribution centers determines whether the demand of the assigned delivery point can be served. e assignment of delivery points determines the transportation cost and the operational cost.
is paper focuses on the transportation, setup, and operational cost to simplify the model and highlight the main factors. To build up the objective functions for the cost, let us define the symbols as shown in Table 1.

Transportation Cost.
e transportation costs may be affected by capital, fuel, lubricant, and operational costs. Sahin et al. [28] showed that the total cost of a unit of cargo in road transportation with trucks consists of 14% investment cost, 60% fuel cost, 17% operational cost and maintenance cost of the vehicle, and 9% external cost, which are positively related to the route length. Assuming the vehicles are fully loaded and the cost has a linear relationship with the route length, the total transportation cost C t can be formulated in the following equation: where d ij is the city block distance as follows:

Setup
Cost. e setup cost may vary depending on how the distribution center is set, such as renting a warehouse or building a new depot. Assuming that the average setup cost for any possible location is known, the total setup cost is simply as follows: where the operational cost for a given point (p tx i , p ty i ) can be determined in advance through investigation.

Operational Cost.
e operational cost depends on how many demands a distribution center needs to meet, which is usually described by a cubic function of demand [29]. erefore, a distribution center's operational cost per unit demand is a quadratic function of demand. e total operational cost is formulated as follows: where a k (k � 1, 2, 3) are polynomial coefficients. e total demand Q i that is assigned to the distribution center i is 4 Discrete Dynamics in Nature and Society determined by the decision variable Ω i . e cost per unit demand is then formulated as e optimal capacity for a distribution center is the solution to the following equation: To summarize, the total cost for an express CLAP is where w t , w s , and w o are the weight coefficients for transportation, setup, and operational cost, respectively.

Constraints.
e boundary constraints for the decision variables are as follows: e capacity of the distribution center must satisfy the total demand of all delivery points serviced by it: where R is the total demand as described in Table 1. Each delivery point is serviced by one distribution center:

Encoding Scheme and Evaluation
Criteria. e selected algorithms work on a set of floating number vectors x i (known as the population X � [x i , . . . , x nPop ] T , where nPop is the population size). erefore, the solutions of CLAP need to be encoded into floating number vectors before the algorithms can be applied. When a new vector is found by an algorithm, it must be interpreted (decoded) into the actual location and allocation plans before it can be evaluated. is section discusses the encoding/decoding schemes and the evaluation criteria of the plan.

Traditional Encoding Scheme.
A complete location planning scheme of distribution centers can be represented by the decision variables described in Table 1. e location of a distribution center requires two numbers to denote the horizontal and vertical coordinates. Another quantity is required to denote the capacity. Furthermore, a number denoting the belonging of a delivery point is also required. Given that the length of the solution representation in the selected algorithms is fixed, the traditional encoding/decoding scheme can be as shown in Figure 2.
For a traditional encoding/decoding scheme, the length of a solution string is 3 N + M, where g j ∈ Z + , j ∈ 1, . . . , N is a positive integer and denotes that the j-th delivery point belongs to the g j -th distribution center. e decision variables are obtained as follows: where x i ∈ R + are floating numbers. x 3i−2 and x 3i−1 (i � 1, . . . , N) have the same range as p tx i and p ty i , respectively. e range of x 3i (i � 1, · · · , N) is [0, R] because the lower bound of the capacity cannot be determined in this Discrete Dynamics in Nature and Society encoding scheme. x 3N+j ∈ [0, N] (j 1, · · · , M) and · is the rounded-up function. e traditional encoding scheme is straightforward, but the drawbacks are clear: (1) the number of distribution centers must be determined in advance, and (2) solution strings generated in the search process may violate the constraints. For the boundary constraints de ned in Equations (12) and (13), the abovementioned algorithms will truncate the exceeded solutions. However, for the constraints in Equations (12) and (13), an infeasible solution means that the decoded plan cannot be executed.
For example, the delivery points assigned to a distribution center may have greater total demand than the capacity of the distribution center, or no delivery points may be assigned to a distribution center. Hence, a punishment term is de ned as follows to suppress the infeasible solutions: e modi ed cost function can be as follows: where w p is the weight of the punishment term. If no delivery point is assigned to a distribution center, the wasted resources are naturally a punishment for the cost. Such solutions will not compete with the solutions that take advantage of the available capacity.

Constraint-Solved Encoding
Scheme. e abovementioned encoding scheme and cost function allow the existence of infeasible solutions, which decreases the search e ciency since there are invalid calculations for the infeasible solutions. is paper presents an improved encoding scheme that introduces random proportion and random key (RPK) as shown in Figure 3, which transfers the constraint problem into an unconstraint problem.
As shown in Figure 3, a oating number vector x [x 1 , . . . , x 3N max +M+1 ] is used as the solution string, where x i ∈ [0, 1]. e number x 1 will be mapped into the number of distribution centers and [x 2 , . . . , x 2N+1 ] will be mapped into the position of each distribution centers by Note that the numbers [x 2N max +N+2 , . . . , x 3N max +1 ] are omitted as well if N < N max . e assignment of delivery points for the distribution center i is determined as follows: where h a(i) , . . . , h b(i) is a continuous partial sequence in [h 1 , . . . , h M ], which makes the summation of demands from the set of delivery points Ω i just greater than the lower bound c i . e actual capacity of the distribution center i is determined by the summation of demand from the delivery point assigned to it: e idea of RPK is to determine the number of distribution centers dynamically and make the capacity just enough for the assigned delivery points. e logical procedure of obtaining a feasible capacitated location-allocation plan from any x ∈ [0, 1] 3N+M+1 is as follows: Step 1: obtain the number of distribution centers N by Equation (19) Step 2: obtain the position of N distribution centers by Equation (20)  Figure 2: Traditional encoding/decoding scheme TES. 6 Discrete Dynamics in Nature and Society Step 3: sort [x 3N max +2 , . . . , x 3N max +M+1 ] and get the index Step 4: a(1)←1 Step 5: for i in 1, . . . , N − 1 { }do Calculate the lower bound capacity c i by (21) Starting from a(i) + 1, nd the rst b(i) that satis es Equation (22) e set of delivery points assigned to the distribution Obtain the actual capacity of the distribution center i by (24) Step 6: For an arbitrary x ∈ [0, 1], the RPK encoding scheme always produces a unique and feasible plan. e total capacity of the distribution centers equals the total demand, which maximizes resource utilization. Furthermore, the RPK encoding scheme allows algorithms to operate on a uniform vector x ∈ [0, 1], which facilitates the application of algorithms.

Experiment Settings.
e evaluation experiments were conducted on a 10 km by 10 km square region of Zhenjiang, China [30]. e map of this region is divided into 10 × 10 grids, and the setup cost for each lattice is obtained via investigation. e map, grid, and setup cost matrix are shown in Figure 4. e setup costs are scaled into ve levels. Level 5 represents the most expensive setup cost. e central area (slightly above the middle) has the highest cost, and the suburbs have the lowest cost. A mountain is located slightly below the middle, and some waters are in the north, where a distribution center cannot be set up. We set the cost much higher than the maximum level cost (20 in this case) to prevent generating a distribution center located in these areas. While a ner grid may bring a plan closer to reality, a 10 × 10 grid is su cient to show the algorithm's mechanism and maintain the map's readability. e TES and RPK encoding schemes are applied to four algorithms: PSO, DE, ABC, and LDES. Since the compared algorithms use di erent population sizes, we use the number of cost function evaluations (FEs) instead of the number of generations to measure the performance. e algorithms will stop when the maximum FEs are reached. RPK works on a uni ed search space and transforms a solution x ∈ [0, 1] D into a location and allocation plan, where D is the dimension of the search space, i.e., the number of variables. e algorithm parameters are shown in Table 2.

Comparison of TES and RPK Encoding Schemes.
e comparison is conducted on the map in Figure 4. ere are 20 delivery points on the map, each with di erent demands. e maximum number of delivery centers is set to 5. e location of delivery points and the associated demands are shown in Figure 5.
Each algorithm runs 30 times, and the optimum costs found by each algorithm are averaged over 30 runs. e results are shown in Table 3.
From Table 3, we observe that the RPK encoding scheme improves the performance of all compared algorithms. e average optimum cost was reduced by at least 11.38%. ABC shows the best average performance for both RPK and TES encoding schemes. e DE and LDES show comparable performance with ABC for the RPK encoding scheme, while the smaller standard deviations (0.05 and 0.09), respectively, indicate more stable performance. e improvement has two sources: rst, the RPK allows automatic selection of the number of distribution centers; since each distribution center has a setup cost, fewer  Discrete Dynamics in Nature and Society     Second, the capacity distribution mechanism in RPK ensures that the total capacity equals the total demand and no capacity is wasted, which produces a more e cient allocation plan. e statistics and convergence curves of the four algorithms in the two encoding schemes are shown in Figures 6  and 7. e nonoverlapping notch of the boxes corresponding to di erent encoding schemes of the same algorithm shows that RPK reduces the median of the optimal cost by 5%.      Figure 7 shows that most optimization processes converge within 50000 function evaluations regardless of the algorithm or the encoding scheme. Except for ABC with RPK, the search of the other algorithms makes small progress throughout the entire process.
is observation shows that the visiting limit mechanism keeps the ABC from being stuck in the local optima. e best location and allocation plan found by ABC using RPK and TES encoding schemes are shown in Figure 8. A distribution center and associated delivery points are depicted in the markers with the same shape, where a solid marker denotes the distribution center and hollow markers denote delivery points. e size of each marker is proportional to the capacity/demand of DC/DP. Both RPK and TES avoid the mountains and water areas. RPK allows the algorithm to automatically choose the number of distribution centers (in this case, 3). e delivery points are clustered around each distribution center to minimize transportation costs. e optimized number of distribution centers distributes the demands so that each distribution center may operate at a capacity with the lowest possible cost. For the TES, a xed number of distribution centers prevents some distribution centers from operating at the lowest possible cost. Although the average transportation cost is reduced due to fewer delivery points serviced by each distribution center, the increased setup cost and operational cost make the allocation plan less economical. e algorithm is smart enough under both encoding schemes to choose a location right on the edge of the lattice, which minimizes the setup cost and the transportation cost simultaneously. e detailed plan is shown in Table 4. e symbols C t,i , C s,i , and C o,i represent the transportation, setup, and operational costs of each distribution center, respectively. e coordinates p tx i and p ty i show that all distribution centers are located on the edge of the lattices, where the setup cost is the lowest, and the distance to delivery points is minimized. e capacities of each distribution center with the RPK encoding scheme are the same as the total demands assigned to them. In contrast, the capacities of TES are slightly greater than the demands, which are a waste of resources and cause greater costs. Meanwhile, the capacities of RPK are closer to the optimal capacity (the optimal capacity can be obtained by solving (10), which is 20 in this case). e total transportation cost of RPK is greater than TES. However, lower setup costs and operational costs compensate for the overall cost.

Sensitivity of the Number of DCs and DPs.
is section considers the impact of the number of distribution centers and delivery points. e number of delivery points is 10, 20, 30, 40, and 50. e maximum number of distribution centers is 2, 4, 6, 8, and 10. All four algorithms are tested. RPK and TES are also compared. e results are given in Table 5.
Improvement of RPK over TES can be observed in most cases (except for DE and LDES with #DP 10 and #DC 2). For #DC 2 cases, the improvements of RPK with di erent numbers of delivery points are not signi cant because two distribution centers are not enough for any encoding scheme to distribute the demands into economic capacity. When #DC 4, the average improvement is at least 5% (ABC with #DP 30), and the highest improvement is 21.3% (PSO with #DP 10). When #DC 10, the average improvement is up to 56.05% (PSO with #DP 10).
For #DP 10, the averaged costs of RPK are steady with di erent numbers of distribution centers, whereas the averaged costs of TES keep rising with the increasing number of distribution centers. e reason behind this observation is that two distribution centers are su cient for the optimal distribution of the total demand of 10 delivery points. Even if the maximum number of distribution centers varies, RPK automatically selects two distribution centers to distribute the demands and produce similar solutions. On the other hand, TES uses a xed number of distribution centers. erefore, the TES has a similar performance with RPK  when #DC � 2 but deteriorated performance with the increasing number of distribution centers because additional distribution centers cause additional setup and operational costs. e statistics of different combinations of algorithms, encoding schemes, and the number of distribution centers are shown in Figure 9. e improvements of RPK over TES are shown in Figure 10. When the total demands rise with the number of delivery points, the maximum number of distribution centers that RPK shows a significant improvement (over 20%) rises as well. For example, when #DP � 10, the maximum number of distribution centers needs to be at least 4 for PSO to have an improvement of greater than 20%. When #DP � 50, the number rises to 10. Below a certain maximum number of distribution centers, neither RPK nor TES could find a better allocation plan. In contrast, above the threshold, the dynamic number of distribution centers in RPK shows excellent efficiency in solving the CLAP.

Conclusion
e solution representation of practical engineering problems may significantly affect the performance of swarmbased algorithms. Proper encoding of the solutions may bring three significant advantages: (1) e encoded solution could have uniform ranges, which is suitable for the algorithm adopting a "crossover" operator that may switch the position of the elements in a solution vector (2) e landscape of the solution space is altered to provide more "algorithm-friendly" information, such as gradients and continuity (3) Some constraints may be eliminated, which increases the rate of feasible solutions in the newly generated solutions, hence improving the search efficiency We propose the random proportion and random key (RPK) encoding scheme to represent the location and allocation plan of an express CLAP. RPK brings three advantages over traditional encoding schemes: (1) RPK dynamically chooses the number of distribution centers in the search process. e solutions with different numbers of distribution centers coexist and evolve in the same swarm.
(2) e allocation of delivery points is determined by the order of elements instead of the value of elements. en, the candidate capacity is determined by the proportion of the total demand. is mechanism allows the delivery point assignment constraint and capacity/demand constraint to be satisfied simultaneously. ere is no need to introduce a punishment term for violation of constraints. Data Availability e experiment results data used to support the findings of this study have been deposited in the Science Data Bank repository (https://www.scidb.cn/s/ziQZba).

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.