Abstract
The depot locations have a significant effect on the transportation cost in the multi-depot vehicle routing problem. A two-tier particle swarm optimization framework is proposed, in which an external particle swarm optimization and an internal particle swarm optimization are used to determine the optimal depot locations and the optimal multi-depot vehicle routing problem solution, respectively. In the internal particle swarm optimization, a novel particle encoding scheme is used to minimize the computational cost by concurrently allocating the customers to depots, assigning the customers to vehicles, and determining the optimal routing path for each vehicle. The quality of the solutions is enhanced through a designed mutation local search with savings scheme. To verify the effectiveness of the proposed scheme, six standard multi-depot vehicle routing problem instances are tested and compared. It is shown that the use of the external particle swarm optimization scheme to optimize the multi-depot locations reduces the average routing distance obtained by the internal particle swarm optimization by around 13.16% on average. Furthermore, for a real-world case, the proposed two-tier particle swarm optimization scheme reduces the total routing cost by around 18%. Restated, the proposed particle swarm optimization algorithm provides an effective and efficient tool for solving practical multi-depot vehicle routing problems. Notably, the proposed scheme can be used as a reference model for obtaining the optimal locations in a variety of scheduling problems.
Keywords
Introduction
Scheduling problems are one of the most common forms of problem faced by managers in the business, production, and management fields. Among such problems, the vehicle routing problem (VRP) encountered in industry is one of the most important and complex problems. For example, in Industry 4.0 (also known as smart manufacturing), it is necessary not only to optimize the production process in terms of the machines used, the manufacturing schedule applied, the resources consumed, and so on but also to integrate the production process with an optimized logistics process which ensures the timely and cost-efficient distribution of the finished products to the customer. VRPs are found not only in industry but also throughout daily life, including the delivery of letters, supermarket food, pharmaceuticals, online-purchased products, and so on. VRP applications typically vary in terms of their constraints, for example, the number of service depots, the capacity and running time of the vehicles, the time required for receiving and shipping, and the delivery time. Consequently, several variants of the VRP have been proposed, including the capacity vehicle routing problem (CVRP),1–3 the periodic vehicle routing problem (PVRP), 4 the multi-depot vehicle routing problem (MDVRP), 5 and the vehicle routing problem with time windows (VRPTW). 6
Previous studies have shown the VRP to be a non-deterministic polynomial-time (NP)-hard problem. 7 For small-scale VRPs, optimal solutions can be obtained using an exact algorithm. For example, Baldacci et al. 3 solved the CVRP using an exact algorithm based on a two-commodity flow formulation. Contardo and Martinelli 5 proposed an exact algorithm for the MDVRP under capacity and route length constraints, in which the problem was formulated using vehicle-flow and set-partitioning formulations. Baldacci et al. 6 presented a comprehensive review of the most effective exact methods proposed in the literature for the CVRP and VRPTW over the preceding ten years. However, solving large-scale VRPs using an exact approach is cost and time prohibitive. Accordingly, various metaheuristic methods have been proposed for obtaining near-optimal solutions of large-scale VRPs within an acceptable time, including genetic algorithms (GAs), 8 ant colony optimization (ACO), 9 tabu search (TS), 10 iterated local search (ILS),11,12 and particle swarm optimization (PSO).13,14
Among these methods, PSO involves only a few parameters and has an easy implementation, a low complexity, and a rapid convergence performance. Furthermore, PSO achieves a good balance between an exploitation-type search behavior and an exploration-type search behavior through the use of a non-linear adjustment mechanism for the inertia weight parameter. Moreover, PSO involves both cognitive and social learning processes during evolution. As a result, it has been applied to many optimization problems, including the traveling salesman problem (TSP), 15 the multi-mode resource-constrained project scheduling problem (MRCPSP),16,17 and the permutation flowshop scheduling problem (PFSP).18,19Table 1 summarizes some of the more notable metaheuristics proposed in the literature for solving the MDVRP.
Metaheuristics proposed in literature for solving MDVRP.
MDVRP: multi-depot vehicle routing problem; VRP: vehicle routing problem.
In previous MDVRP studies, the multi-depot locations are known in advance, and the aim is thus only to find the routing paths which minimize the total delivery cost without exceeding the vehicle capacity constraints. However, in practice, the location of the depots has a significant effect on both the choice of routing path and the total transportation cost. According to previous studies, 25 the transportation cost should account for no more than 12%–15% of the total operation cost of an enterprise. Hence, in solving the MDVRP, it is desirable to consider not only the optimal vehicle routing paths but also the optimal locations of the multi-depots. Accordingly, this study proposes a two-tier PSO framework which first searches for the optimal depot locations using an external PSO and then uses an internal PSO to solve the optimal vehicle routing sequence given a knowledge of these multi-depot locations. In general, solving the MDVRP involves answering three questions, namely, (1) “which depot should offer service to which customers?” (2) “which vehicle should deliver goods to which customers?” and (3) “in what order should each vehicle visit its assigned customers?” Therefore, algorithms for solving the MDVRP must be not only effective but also computationally efficient. Exact algorithms are effective but not efficient. By contrast, approximation methods are efficient but not effective. Therefore, metaheuristic algorithms such as those presented in Table 1 are generally preferred, in which either the same scheme or different schemes are used to solve the three MDVRP sub-problems. In this study, the computational complexity of the internal PSO used to solve the MDVRP is reduced by means of a novel extended particle encoding scheme, which facilitates customer-to-depot allocation, customer-to-vehicle assignment, and optimal vehicle routing determination in a single process. The proposed encoding scheme basically treats MDVRP as a clustering problem with one vehicle one cluster. In addition, a clustering and sweeping heuristic is employed to improve the search performance by identifying a set of diverse initial solutions from which to commence the search of the solution space. As with all metaheuristic algorithms, PSO does not guarantee that the optimal solution will be found. Previous studies17,21 have addressed this problem by utilizing different PSO topologies, or by integrating the PSO process with other optimization schemes such as local search or GAs. In this study, the quality of the solutions is improved by means of a so-called local search with savings (LSS) enhancement scheme which integrates a mutation local search procedure and a savings algorithm designed to minimize the route length for each vehicle.
The method proposed in this study offers several advantages over existing MDVRP methods. First, in contrast to existing methods, in which the locations of the multi-depots are taken as a given, the two-tier PSO scheme proposed in this study first optimizes the locations of the depots and then solves the MDVRP accordingly. Furthermore, to reduce the computational complexity, the proposed method utilizes a novel particle encoding scheme to solve all three sub-problems of the MDVRP in a single pass. Finally, the method improves the accuracy of the final solutions using a clustering and sweeping heuristic to set the initial search direction of the PSO algorithm and a LSS enhancement mechanism to minimize the routing cost.
The remainder of this article is organized as follows. Section “MDVRP” introduces the MDVRP considered in this study. Section “Two-tier PSO framework” describes the two-tier PSO framework used to solve the MDVRP and presents the proposed particle encoding scheme, the clustering and sweeping heuristic, and the LSS mechanism. Section “Experimental results” presents and discusses the experimental results. Finally, section “Conclusion” provides some brief concluding remarks and indicates the intended direction of future research.
MDVRP
The truck dispatching problem was first posed by Dantzig and Ramser
26
in 1959 and subsequently led to the development of the MDVRP, in which a company has multi-depots from which to service its customers. The MDVRP involves three problems, namely, (1) allocating the customers to the depots; (2) assigning the customers to individual vehicles; and (3) determining the optimal routing sequence for each vehicle. Consider the illustrative example shown in Figure 1, in which a company has two depots (

Illustration of MDVRP.
Consider a general MDVRP involving
As shown in equation (1), in solving the MDVRP, the aim is to determine the shortest total routing distance of the vehicles. In other words, equation (1) defines the fitness function as the total traveling cost of all the vehicles of all the depots. Specifically,
Two-tier PSO framework
This study proposes a two-tier PSO framework for solving the MDVRP in which an external PSO is first used to identify the optimal depot locations and an internal PSO is then applied to determine the optimal vehicle routing path between these depots and the customers.
PSO
PSO was first proposed by Kennedy and Eberhart
27
in 1995. In the PSO procedure, the solutions are modeled as a particle swarm scattered in the solution space. The location of each particle represents a candidate solution to the problem, and, in each iteration, the particles move with a certain velocity to a new region of the solution space in order to search for new and improved solutions. In performing particle movement, three vectors are referenced, namely, the velocity vector of the original movement, the best location the particle has visited thus far (i.e. the individual optimal experience), and the best location visited by any of the particles in the swarm thus far (i.e. the global optimal experience). Suppose that
Here,
Particle encoding schemes
The two-tier PSO framework proposed in this study utilizes two particle encoding schemes, namely, one scheme for the outer PSO and another scheme for the inner PSO. In the outer PSO, the particles represent candidate depot locations. The depot locations are expressed in the form of rectangular coordinates (
Having obtained the optimal depot locations from the outer PSO, the inner PSO is applied to solve the corresponding MDVRP. In implementing the inner PSO, the particle encoding scheme proposed in this study is designed in such a way as to solve all three sub-problems of the MDVRP at the same time, that is, “which depot should offer service to which customers?”“which vehicle should deliver goods to which customers?” and “in what order should each vehicle visit its assigned customers?” Distributing the services of
In solving the MDVRP, the particles are decoded using a random key method. Therefore, in the encoding scheme, particle

PSO encoding and key values.

Random key decoding.

Scheduling results for illustrative MDVRP.
Initial solution heuristic mechanism for internal PSO
Random initial solutions cause the PSO algorithm to search the solution space in an aimless manner and hence the solution procedure converges very slowly. By contrast, good initial solutions limit the solution space which must be searched and therefore enable the solution procedure to converge more rapidly to the optimal solution. Accordingly, this study develops a heuristic mechanism for obtaining a certain proportion of effective initial solutions for the inner PSO. As described above, the MDVRP involves solving three sub-problems, namely, grouping the customers in accordance with the depots by which they are serviced, determining which vehicles at each depot should service which customers, and establishing the order in which each vehicle should visit its assigned customers. Therefore, in searching for suitable initial solutions for the MDVRP, the heuristic mechanism commences by grouping the customers using a method similar to that of the
To achieve a more diverse initial grouping of the customers, the customers are assigned to particular depots using either a greedy method or a roulette method, where the choice of method is determined using a user-defined grouping probability (
Having grouped the customers, a sweep algorithm is applied at each depot to screen the matching between the customers and the vehicles and the vehicle routing sequence, as shown in Figure 5. In executing the sweep algorithm, the polar coordinate angle of each customer relative to the depot is calculated as

(a) Customer sweep and (b) customer-to-vehicle matching and corresponding vehicle routing.
As described above, if all of the initial solutions are generated randomly, the PSO algorithm will converge only very slowly to the optimal solution. Conversely, if all of the initial solutions are generated by the proposed heuristic method, the algorithm will converge rapidly, but may become trapped at a local sub-optimal solution. Accordingly, the initial heuristic rate (IHR) parameter shown in equation (6) is employed to determine the probability that the heuristic method proposed above is actually adopted when executing the inner PSO. Note that
Inertia weight adjustment in internal PSO
Ideally, the solution space should be searched in a wider manner at the beginning of the solution procedure, but more narrowly as the preferred region of the solution space becomes clear. In other words, the search process should gradually evolve from a global exploration-type search behavior to a local exploitation-type search behavior as the iteration process proceeds. Many linear and non-linear methods have been proposed for adjusting the inertia weight of the particles in PSO schemes.
28
This study considers the linear method shown in equation (7), in which
Four non-linear methods are also considered, namely, the top chord decline curve (DC) method,
29
the decline curve down (DCD) method,
29
the S-decreasing curve (S-curve) method,
30
and the sigmoid curve method.
31
In the initial period of the DC methods, the range of particle movement is narrowed quickly; later, it is narrowed more slowly. Throughout the iteration process, the method aims to provide a more small-range movement search. The DC has the form shown in equation (8), where
Enhancement mechanism for internal PSO
To enhance the quality of their solutions, movement-based algorithms generally undertake a local search in the neighborhood of each newly-obtained solution to see whether or not a better solution can be found. Accordingly, the internal PSO proposed in this study also performs a local search each time it obtains a new solution. If the new solution is found to be better than the current one, the current solution is replaced with the new one; else, the current solution is retained. The quality of the solutions is further improved by applying the savings algorithm proposed in Lysgaard 32 to the customer visit sequence obtained in the first stage of the solution process with the hope of finding a new customer visit sequence which further reduces the length of the vehicle routing path.
In implementing the enhancement mechanism, seven local search methods are considered, namely, a developed mutation method, and six methods presented in the literature, that is, swap,
33
section swap,
33
reverse section swap,
33
reverse,
33
insertion,
33
and double swap.
34
In the mutation method, random values (
The savings algorithm commences by calculating the cost of visiting each customer separately and then calculates the cost incurred in visiting all of the customers in accordance with the determined visit sequence. The reduction in cost is referred to as the savings value. Consider the simple illustrative example shown in Figure 6, in which 0 represents the depot, and a and b represent two customers (Customer a and Customer b, respectively). The main steps in the savings algorithm can be described as follows.

Illustrative example of savings algorithm.
Calculate the savings value
Note that for
Savings values
2. Sort the savings values in descending order and identify the corresponding customer visit sequence (see Table 3).
3. If two customers in the list are neighbors, connect them; else, ignore the connection (see Figure 7).
Sorted savings values.

Result of savings algorithm for illustrative case.
In this study, the combined local search and savings algorithm is denoted simply as the LSS enhancement mechanism. The overall operation of the proposed two-tier PSO scheme for solving the MDVRP is shown schematically in Figure 8.

Flowchart of proposed two-tier PSO scheme for solving MDVRP.
Experimental results
The experiments commenced by identifying the optimal values of the inertia weight and IHR parameters in the internal PSO. Further experiments were then performed to evaluate the effectiveness of the LSS enhancement mechanism. The experiments were performed using MDVRPs developed by Cordeau (http://neo.lcc.uma.es/vrp/vrp-instances/multiple-depot-vrp-instances/) as test instances. Six cases were chosen for test purposes (two large, two average, and two small), denoted as p01, p02, p03, p04, p05, and p06, respectively. The effectiveness of the external PSO in identifying the optimal locations of the multiple depots was investigated by comparing the total vehicle routing distance obtained by the internal PSO on the basis of these locations with that obtained by the internal PSO only (i.e. the depot locations were not optimized in advance). The internal PSO was implemented using 40 particles, learning factors (
The experiments were conducted in a Windows 7 SP1 environment on a PC with an Intel Core i7 CPU 4770 (3.40 GHz), 8 GB of memory, and Visual Studio 2010 C# software. As described above, the experiments commenced by examining the effects of the inertia weight and IHR parameter settings on the optimization performance of the internal PSO scheme. Table 4 shows the experimental results (
IHR: initial heuristic rate; PSO: particle swarm optimization.
PSO: particle swarm optimization; DC: decline curve; DCD: decline curve down.
Overall, the results presented in Table 4 show that a larger inertia weight increases the deviation of the obtained solution from the optimal solution reported in the literature. This result is reasonable since a larger inertia weight results in a larger particle search step size and hence increases the risk of the solution procedure converging toward a local minimum. Moreover, parameter settings
Adopting an
The performance of the LSS enhancement scheme was evaluated for each of the different local search methods (i.e. swap, section swap, reverse section swap, reverse, mutation, insertion, and double swap). Among them, the LSS enhancement scheme involving mutation yields the best performance. As in the previous set of experiments, the performance of the LSS scheme was evaluated using both a constant inertia weight setting (
DC: decline curve.
The effectiveness of the proposed two-tier PSO scheme was evaluated by comparing the routing performance obtained by the internal PSO using the optimal depot locations identified by the external PSO with that obtained using the internal PSO alone based on non-optimized depot locations. In implementing the external PSO, the number of particles was set as 10, the particle inertia weight was set equal to
PSO: particle swarm optimization.
To better visualize the dynamic convergence performance of the proposed two-tier PSO scheme, Figures 9 and 10 show the evolution of the PSO solutions for the vehicle routings and depot locations, respectively, over the course of the respective solution procedures. In particular, Figure 9(a)–(d) shows the vehicle routings obtained by the internal PSO in the initial state and after 500, 1500, and 3000 iterations, respectively, given the p01 test case with four depots. Figure 10(a)–(d) shows the evolution of the multi-depot locations during the external PSO solution process. Note that in each sub-figure in Figure 10, the solid circular symbols labeled “g” indicate the best depot locations identified by the swarm so far. Figure 11(a) and (b) shows the fitness evolutions of the external PSO and internal PSO, respectively. The validity of the proposed two-tier PSO scheme was further evaluated by considering a real-world example involving a wholesaler in Taiwan having two depots from which to service 20 retailers using two vehicles per depot. Based on an inspection of the wholesaler’s records, the capacity of each vehicle was set as 150, and the demand of each customer was set in the range of 10–30. The company reported that the original locations of the two depots were not well planned and therefore resulted in a significant delivery time and cost. Accordingly, the proposed PSO framework was employed to replan the depot locations and reschedule the delivery routes accordingly. The two new depots have to be determined to reduce the traveling costs. The two new depots need to send out two trucks to carry all demand needed from all customers and back to the depot. Figure 12(a) and (b) shows the original depot locations and vehicle routes and those determined using the proposed PSO framework, respectively. A detailed inspection of the results shows that the proposed scheme reduces the total vehicle routing distance from 227 to 186 km, representing a cost saving of 18%.

Vehicle routings obtained from internal PSO for p01 test case: (a) initial, (b) 500 iterations, (c) 1500 iterations, and (d) 3000 iterations.

Depot locations obtained from external PSO for p01 test case: (a) initial, (b) 50 iterations, (c) 150 iterations, and (d) 300 iterations.

Fitness evolution of external and internal PSOs: (a) internal PSO and (b) external PSO.

Real-world case example: (a) original depot locations and vehicle routes and (b) optimized depot locations and vehicle routes.
Conclusion
This study has proposed a two-tier PSO framework consisting of an external PSO and an internal PSO for solving the MDVRP. In the proposed framework, the external PSO is used to determine the optimal depot locations based on the geographic distribution of the customers. These depot locations are then used by the internal PSO to establish the shortest vehicle routing path. The internal PSO is implemented using a novel particle encoding scheme which enables the simultaneous solution of all three MDVRP sub-problems, namely, “which depot should offer service to which customers?”“which vehicle should deliver goods to which customers?” and “in what order should each vehicle visit its assigned customers?” Consequently, the computational complexity of the MDVRP solution process is significantly reduced compared to existing schemes in which each sub-problem is solved individually. The performance of the proposed internal PSO is further improved through the use of a heuristic mechanism to generate suitable initial solutions for the search process and an LSS enhancement mechanism consisting of a local search process and a savings algorithm. The performance of the proposed two-tier PSO scheme has been evaluated using six test instances and a real-world case in Taiwan involving 2 depots, 20 customers and 4 vehicles.
The experimental results have shown that when solving the MDVRP using the internal PSO only (i.e. the depot locations are not optimized in advance), the optimal performance is obtained when adjusting the particle inertia weights using a top chord DC method (0.6–0.02), setting the heuristic mechanism parameter to
This study has assumed that the vehicles provide a delivery service only. However, in real-world situations, it is often necessary for the vehicles to provide both a delivery service and a pick-up service. This has significant implications for both the vehicle routing planning process and the capacity constraint applied in the optimization process. Hence, future studies will extend the proposed two-tier PSO scheme to the more realistic case of MDVRPs with both pick-up and delivery requirements. In addition, this study has considered the VRP to be a symmetric VRP, which can be treated as a complete undirected graph problem. In other words, it has been assumed that in making deliveries, each vehicle departs from and returns to the same depot. However, in practical cases, the vehicles may actually start from and return to different depots. Consequently, future studies will extend the proposed PSO framework to the more realistic case of asymmetric vehicle route planning.
Footnotes
Acknowledgements
The authors thank Siou-Liang Wu for his help in collecting data.
Academic Editor: Artde Lin
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was partly supported by the Ministry of Science and Technology, Taiwan, under contract MOST 104-2221-E-167-011.
