# Open Competency Optimization: A Human-Inspired Optimizer for the Dynamic Vehicle-Routing Problem
## 4 Experimental Studies
### Comparison with Other Metaheuristics
To simplify the problem, the capacity of the vehicles was the same, and the maximum distance that each vehicle could travel was equal. For example, if there were nine customers and a randomly generated solution \(S_{1}\) was 1 2 3 4 6 5 9 8 7,  
this could be interpreted as r=3 possible routes:  
0-1-2-3-0, 0-4-6-5-0, and 0-9-8-7-0. If the routes were greater than or equal to 3, then this solution was legal; otherwise, it was illegal. The application of our OCO metaheuristic for this representation is shown in three steps of an algorithm. The first one, self-learning, can be considered a mutation of the solution vector. In this study, we chose four techniques for the movement of the solution: inversion, exchange, displacement, and the famous 2-opt operator technique. Inversion: 1 2 3 4 6 5 9 8 7 -> 1 3 2 4 6 5 9 8 7  
Exchange: 1 2 3 4 6 5 9 8 7 -> 1 2 8 4 6 5 9 3 7  
Displacement: 1 2 3 4 6 5 9 8 7 -> 1 7 2 3 4 6 5 9 8  
Through applying Formula (7), we chose the best solution. In the second step, neighbor learning groups, for a solution \(S_{1}\) of the population of learners, we chose a group of g learner (solution) neighbors. We applied Algorithm 3 or Algorithm 4, which included multiplication of the solutions, addition, and division by an integer. If the solution found in this step was illegal, we applied a technique that consisted of eliminating the elements of the solution that were repeated and replacing them with the elements that were not in the solution by putting them in the order of indices of the best solution. For example, \(S_{1}\) was  
1 2 2 3 4 5 6 3 7,i.e., the best solution of g in Algorithm 3 or Algorithm 4 with \(S_{b}\):  
79 8 1 2 3 4 5 6,  
so the elements that did not exist in \(S_{1}\) were 8 and 9. We put them in the order of their appearance in the best solution \(S_{b}\), i.e., 9 8. Hence, the solution \(S_{1}\) became  
1 2 9 3 4 5 6 8 7. We applied the same technique for the leadership interaction step. Using the dynamic permutation problem generator [47], we chose a random change and another cyclic change. The frequency of dynamic changes took two values--\(f=5\) and \(f=100\), indicating a strong and weak change, respectively. The degree of change \(m\) took the values of 0.1, 0.25, 0.5, and 0.75, indicating a change in low, medium, dense, and very dense traffic. Tables 10-22 give the results of this comparison, indicating the offline performance of OCO with the insertion of new ideas (solutions), that of the genetic algorithm with hypermutation (HMGA) [41] while using partially mapped crossover, which is the most commonly used crossover operator in the VRP, and that of ant colony optimization with the insertion of immigrants [48]. The Open Competency Optimization algorithm with the insertion of new ideas (ThresholdCapacity = 0.1) presented results that were clearly superior to those of the ACO algorithm with the insertion of random immigrants for the environment changes (from random to cyclical) and also HMGA. This showed that our algorithm maintained a balance between exploitation and exploration even in environments with a strong variation (\(f=100\) and \(m=0.75\)). This was due to the three learning phases of the algorithm. These three phases made it possible to diversify the population of solutions while making the best use of the research space. \begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Algorithm** & \multicolumn{4}{c}{**m Traffic State**} \\ \cline{2-5}  & **0.1** & **0.25** & **0.5** & **0.75** \\ \hline OCO & 802.80 & **810.40** & **830.20** & **835.10** \\ \hline ACO & **800.70** & 950.55 & 995.10 & 1010.50 \\ \hline HMGA & 900.60 & 1000.20 & 1110.00 & 1020.20 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Instance F-n45-k4 with random traffic; \(f=5\).