Section 3.1 presents the methodology of the sPSO method, which is followed by the detailed procedure for the algorithm in section 3.2
3.1 Methodology
Each dispatched vehicle has to serve the maximum number of customers under its capacity limit with the minimum travel distance in order to minimize the total cost.
In this study, we simulate a practical strategy using the PSO algorithm to solve the problem and generate a vehicle routing sequence with one Cross-docking operation in the supply chain. However, past researches have indicated that the PSO method is fast but has premature convergence. Moreover, the final solution quality will be improved if the initial solution for the PSO is prominent. Therefore, a clustering algorithm, called the sweep method, was introduced to group customers in the beginning of the proposed algorithm.
Usually the sweep method is applied to a polar coordinate system, where the center of the coordinate system served as the depot in a vehicle routing problem.
However, in order to obtain the maximum performance from the sweep method, the center of gravity for all the customers is set as the center of the coordinate system in this study, called the G-depot. Customers are joined to the G-depot one by one depending on vehicle capacity to determine the number of vehicles. The initial solution for the sPSO algorithm from the sweep method is generated by the following methodology.
For each traveling distance of route Oi (i = 1, 2, …, N, where N is the number of customers), the ith customer’s Ci serves as the first customer in the cluster. Next, we search for the closest customer to Ci, Ci+1, by increasing the angle. This is then added to the same cluster if it can be done without exceeding the vehicle capacity. When a
8
customer cannot be added to current cluster due to the vehicle capacity limit, this customer becomes the first customer of the next cluster. This process is repeated until all the customers are assigned. Figure 3 illustrates the clustering process for several nodes. The dotted straight lines represent the sweep hand moving counter clockwise.
After all the customers are grouped, we calculate the objective value of this route.
After O1, O2, …, ON, are calculated, we chose the minimum N route distance as the initial solution of the sPSO algorithm. That is,
Initial solution = min{Oi}, for i = 1, 2, …, N.
Figure 3. An example of cluster by sweep method.
Customers that are located close to each other are grouped into the same cluster.
This makes it possible to generate the fewest number of vehicles used and reduce the operational cost. Next, the initial solution of the sPSO algorithm is acquired by using the sweep method to search for a global optimal solution.
In any set of transport routes, at least one vehicle will be dispatched to serve one master route based on the principle of the sweep method and the minimum distance traveled. The total cost is found by adding the fixed costs for the vehicles used (operational costs) and the transportation costs as vehicles travel from one customer to another. In some cases, the aggregated service time consumed by each customer is also taken into account. Overall, when vehicles travel shorter distances, they incur lower total cost. Figure 4 illustrates the hierarchy of the proposed algorithm with 10 nodes served by 2 vehicles under the scenario of homogeneous demand.
9
Figure 4. An example of 10 nodes with homogeneous demand served by 2 vehicles.
As shown in Figure 4, in the routes generating phase, the sweep method is defined to construct the clusters and minimize the travel distance in each cluster as an initial route for the next phase. Then, a mapping technique is needed in the routes optimizing phase in order to apply the particles’ continuous flying trail to the discrete solution domain of the vehicle routing problem. Finally, the particle dimension for the PSO is set to the number of all customers served. We also relax the boundary of each cluster to switch customers with clusters in the vicinity in order to ensure that the algorithm to searches all the combinations and generates a better solution quality. The following section details the procedure for the sPSO method.
3.2 sPSO Procedure
The key issue to successfully implementing the sPSO and solving any kind of vehicle routing problems hinges on the representation step. Therefore, a permutation-based representation technique is developed to perform the particle construction phase, which makes it possible to apply the continuous particle domain to the discrete solution of a vehicle routing sequence. We set up the flying field of each particle with the dimension equal to the number of suppliers or customers served.
Thus, the particle dimension represents the positions of the nodes to be visited. In other words, the particle dimension is equal to the length of suppliers’ or customers’
sequences within the routing order.
In the original PSO algorithm, the principles of particle movement contain three major parts. First, inertia weight W resembles the difference in particle coordinates between now and the previous iteration. A larger value of W results in a particle search in more directions (exploration), whereas a smaller value allow the particles
10
settle into the optima (exploitation). Two learning factors,
id1
ϕ and ϕid2, denote the tendency of the particles to move toward the individual best (Pbest) and the swarm’s group best (Gbest), respectively. The mechanics of Pbest and Gbest cause individual particles to progressively fly toward the quality solution field. In these cases, each particle is capable of recording its own best flying experience as well as detecting and sharing the knowledge of other particles. The best practice here implies ising whichever permutation set generates the best fitness value.
Based on these characteristics, we propose a new discrete PSO method (sPSO) in this study. The improved sPSO procedure is shown as follows.
),
The primary principle of the PSO algorithm is learning. Following from this concept, we regard the difference in particle coordinates as a percentage of similarity calculating from the previous coordinates, the individual best and the swarm’s group best. Therefore, we set up four parameters (W,
id1
ϕ , ϕid2, ϕid3) as probabilities in Equations (14) and (15), where the inertia weight W inferences the direction from the previous location; the learning factors,
id1
ϕ and ϕid2 , control the speed of the acceleration the pulls particles toward Pbest and Gbest, respectively; and the third learning factor
id3
ϕ resembles the level of the current position from the velocity. In addition, the notation “⊗” stands for the imitation operator to determine the evolutionary process as described in Table 1.
The movement in direction Vidt is composed of three parts (previous velocity previous particle and the previous velocity. For every dimensions of a particle, we use a uniform distribution in [0, 1] to generate random numbers. If the random number is less than W, then the dimension of Xidt−1 is replaced by Vidt−1, otherwise the current dimension of the particle is kept unchanged. When every dimension of a particle was
11 current position, as shown in (15).
Table 1
The Procedure of the sPSO Algorithm.
Step 0: Preparation phase Initialize the parameters
id1
ϕ , ϕid2, ϕid3, W, swarm size, and max iteration.
Step 1: Generate initial solution
Step 1.1: Calculate gravity of all customers (G-depot).
Step 1.2: All customers are clustered by sweep method.
Step 1.3: Calculate each route distance and denoted as Oi (i=1, …, N).
Step 1.4: Choose the smallest Oi as the initial sequence of the sPSO algorithm.
Step 2: Initialization
Step 2.5: Initialize Gbest0 with the best fitness (fvalue) among the population.
Step 2.6: Calculate Pgd0(Pgd0 =[Pg01,Pg02,...,Pgd0]) with the Gbest0 . Step 3: Repeat till a stopping criterion is satisfied (Going Loop) For each particle i in the population.
Step 3.1: Update velocity by ( ( ( ) ) ).
Step 3.3: Evaluate particle’s fitness (fvalue[i]).
Step 3.4: Determine new Pidt+1 and new Pgdt+1 as follows:
Step 3.5: Stop when the maximum iteration is achieved; Otherwise, set t=t+1, repeat Step 3.
Step 4: Repeat Step 1-3 for delivery process. Calculate total travel distance.
The learning procedure of the sPSO is based on the three elements described above: previous velocity (V ), individual best Pidt id, and group best Pgd. Individual
12
particles are able to attain next quality moves and update their current positions, as shown in Equation (15). Through a process of repeated iterations, the whole swarm of particles moves gradually toward the best position. Table 1 presents the detail of the procedure for the sPSO algorithm.