## 3 Proposed Methodology
### Decoding the Customer Vector
\begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline  & **Hub ID** & \multicolumn{8}{c}{**Customer IDs**} \\ \hline IDs & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \\ Demands & 0 & 17 & 8 & 16 & 28 & 13 & 8 & 23 & 7 & 6 & 15 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Hub ID, Customer IDs and associated demands in example problem instance. R3 (6, 4), R4 (9, 5)) to apply the bilayer local search operations to find if any better solution is available in the neighborhood of the particle. ### Proposed Bilayer Local Search

A local search can exploit the neighborhood of a particle with the expectation of getting a better solution. We propose two layers of local searches to be applied during the iterations of the PSO algorithm. Here we explain them in detail. #### 3.3.1 The First Layer Local Search

The first layer local search is applied on the all \"feasible\" particles, for which routes could be successfully made by Algorithm 1, in the population in every iteration of PSO. We apply Intra-Route Local Search (Intra-RLS) followed by Inter-Route Local Search (Inter-RLS) to exploit the neighborhood of a particle to look for any better solution before moving to another position in the solution space in the next iteration of PSO. In the Intra-RLS, we apply \"swap\" and \"insertion\" strategies on every route constructed for the particle at hand. In the \"swap\" stage, we interchange the neighboring nodes in a route if it minimizes the total distance of the route. For \"insertion\", we pick a node, and try to insert it in other possible positions in the route if it decreases the total distance of the route. After all the nodes have been checked, the move with the best gain can be executed. We apply \"insertion\" operation using the nodes one after another onward from the starting of a route until any node succeeds to move to another position. We do not perform all possible exploration here to keep the complexity of the algorithm tolerable. Moreover, there remains a possibility for the proposed second layer of local search to explore more \"insertion\" options on the potential solutions that are selected in the \"pool\" (please see Section 3.3.2 for details). A portrayal of the attempts made by the \"insert\" and \"swap\" operations on a route (\(c^{d},c^{e},c^{\prime}\) and \(c^{g}\)) are illustrated in Figure 3.

The Inter-RLS strategy also applies the similar \"insertion\" and \"swap\" operations, but between two different routes. Inter-RLS is portrayed in Figure 4. The arrows show the \"insert\" options to be tried by node 1, from which the best one is to be performed if it decreases the total distance of the two concerned routes. Figure 4: An illustration of Inter-Route Local Search. Figure 3: An illustration of Intra-Route Local Search. (**a**) ‘insert’ attempts for node \(c^{d}\); (**b**) ‘swap’ attempts. It is worth mentioning here that the \"insertion\" operation is not allowed to remove all the nodes of a route into another route thus the required number of vehicles will be constant throughout the program run. #### 3.3.2 The Second Layer Local Search

The operations of the second layer of local search are similar to those in the first layer. As mentioned earlier, this layer of local search is applied on a pool of the global best solutions attained in different iterations the PSO algorithm. This is an approach to exploit the best-found solution more deeply as some of them might be very close to the optimal solution. To limit the growth of the pool, we refine it by deleting some of the solutions in the pool according to Algorithm 2 at every iteration. It keeps the best solution in the pool. It also keeps the solutions that were updated by the local search in the previous iteration for the hope that they may be further updated in the upcoming iterations to attain better solutions. The solution that neither is the best in the pool nor was updated in the previous iteration is deleted from the pool because it can no longer be updated by the proposed local search.