An Enhanced Ant Colony System Algorithm Based on Subpaths for Solving the Capacitated Vehicle Routing Problem

: The capacitated vehicle routing problem (CVRP) is regarded as an NP-hard problem. More-over, the CVRP is described as a model that can be used in many applications such as transport, logistics, and distribution. The exact algorithms can find exact optimal solutions on the small-sized problem instances; however, for large-sized instances it is difficult to find the exact optimal solutions in polynomial time. This reason motivated the researchers to present heuristic/metaheuristic algorithms to solve large-sized problem instances within a reasonable computational time. One of the good algorithms that deal with the CVRP is the ant colony optimization (ACO) algorithm. Several ACO algorithms have been suggested in the literature, such as the ant system (AS) algorithm, ant colony system (ACS) algorithm, and so on. On the other hand, ACO is designed to solve the path problem that finds the best way. However, this algorithm still lacks exploratory mechanisms, which results in premature convergence and stagnation issues. Therefore, we propose to develop an enhanced ACS (EACS) algo-rithm for solving the CVRP based on subpaths. In our proposed algorithm, we propose to utilize the K-nearest neighbour (KNN) algorithm for finding the best initial solution and then enhance the diversity mechanism of the proposed algorithm by avoiding the generation of the same solution using sub-paths. This uses the diversity of the generated solution to find a better solution with a shorter route in a reasonable amount of computational time. Furthermore, we propose to apply the three-opt algo-rithm to the completed subtour and the k-opt algorithm to the subpath gained from the experience of the subpath. Finally, to verify the effectiveness of the proposed EACS algorithm, the algorithm is tested on some CVRP instances and is compared with one of the state-of-the-art methods, namely, the enhanced simulated annealing algorithm. The comparative study showed a better performance of our EACS compared to the enhanced simulated annealing algorithm.


Introduction
The capacitated vehicle routing problem (CVRP) is a widely recognized problem that was first observed in [1].The problem aims to minimize the total costs (i.e., the distance traveled by the vehicles) needed for servicing a group of customers.The best solution that could be derived for this problem could allow its application in different fields of transportation, distribution, and logistics.The CVRP generalizes the benchmark traveling salesman problem (TSP) [2].Hence, it is regarded as an NP-hard problem.Therefore, no polynomial-time algorithm can be used to solve them exactly [3].In the past 50 years since the existence of this problem, several exact, heuristic, and metaheuristics algorithms have been proposed to solve it.One such algorithm, i.e., ant colony optimization (ACO), was initially proposed in [4].The ACO algorithm was inspired by the actual behavior of ants who are searching for food.While looking for food away from its nest, it was noted that the ant put a chemical compound, pheromone, on the path.A pheromone trail is a form of communication among all ants that will attract the other ants to use the same route to travel.Thus, a higher number of pheromones will boost the probability of selecting the following way to travel.Furthermore, the ACO can be used for solving the path problems for determining the best route where all components of the algorithm are compatible with the properties of the problems wherein the ant nests are regarded as depots, artificial ants are considered as vehicles, food acts as the customer, trails form the routes, and pheromone concentration can present the best route for optimizing the total distance [5].
Many algorithms are included in the ACO family of algorithms, like the ant colony system (ACS), ant system (AS), etc.The ACS algorithm is inspired by nature wherein the ants scout for food in their neighborhood.Thus, this is a probabilistic algorithm and is a member of the swarm intelligence method [6][7][8][9].Recently, in [10], the authors compared all types of ACO algorithms and noted that the ACS algorithm developed the properties of its components through an amended transition rule, the presentation of a local pheromone update, and the global pheromone update is only the best solution.However, this algorithm still suffers from a lack of exploration mechanisms that leads to the issues of premature convergence and stagnation [11,12].Therefore, this study addresses the exploration problem in the ACS algorithm, one of the main issues with the metaheuristic algorithm, by providing an answer to the question: what can be done to address the exploration problem in the ACS algorithm for solving the CVRP?Additionally, in comparison to one of the modern approaches in the literature, it also produces positive results.The following objectives are proposed in this research work to answer this question: (i) To utilize the K-nearest neighbour (KNN) algorithm for finding the initial solution; (ii) To enhance the diversity mechanism of the ACS algorithm by avoiding the generation of the same solution using subpaths.This uses the diversity of the generated solution to find a better solution with a shorter route in a reasonable amount of computational time; (iii) To apply the three-opt algorithm to the completed subtour and k-opt algorithm to the subpath gained from the experience of the subpath; (iv) To verify the effectiveness of the proposed EACS algorithm, the algorithm is tested on some CVRP benchmark instances and is compared with one of the state-of-the-art methods, namely, the enhanced simulated annealing algorithm.The comparative study showed a better performance of our EACS compared to the enhanced simulated annealing algorithm.
This paper has been arranged as follows: Section 2 introduces the literature review of the problem as well as the previous studies dealing with ACO algorithms whereas Section 3 explains the materials and methods applied in the study.Section 4 reports and discusses the results noted in the study; Section 5 describes the theoretical analysis and presents a critical explanation of the performance of the EACS algorithm proposed in the study.Finally, Section 6 presents the conclusions of the study.

Literature Review
The purpose of the literature review covered in this study is to discuss works that are relevant to the CVRP.The problem was introduced in 1959 by Dantzig and Ramser [1] and until now, for the past 50 years, many researchers have investigated the problem and have proposed several heuristics and metaheuristic algorithms for solving it.We shall report a brief review on the literature pertaining to the problem using different algorithms and report a more detailed review of the literature using the ACO algorithm.
An improved hybrid firefly algorithm was proposed in [13] for the CVRP and was implemented on 82 instances.An improved simulated annealing algorithm along with a crossover operator was developed in [14] to solve the CVRP.An improved genetic algorithm using fuzzy C-means clustering was proposed to solve the CVRP that showed promising results [15].In [16], one simple genetic algorithm (GA) and four different hybrid GAs were proposed to solve the asymmetric distance-constrained vehicle routing problem (VRP).A set of eight crossover operators in genetic algorithms have been applied to the CVRP and a relative study among them is reported in [17].A modified football game algorithm (MFGA) is proposed to solve the VRP with the time window in [18].
Along with recognizing the most recent versions of ACO algorithms, it is also important to recognize the issues they still must suggest remedies.Recently, some studies have used the subpaths to enhance the effectiveness of the local search to support the mechanism of exploitation to enhance the ACS algorithm [19].Furthermore, the subpaths are used for updating the global pheromone based on the number of subpaths through which all solutions pass away.In other words, these studies have used subpaths to serve as the mechanism of exploitation.The problem statement of this research work is as follows: the ACS algorithm reduces the pheromone on the visited path after building a full path for each ant to avoid revisiting the same path again [7].However, this algorithm is still suffering from a lack of exploration mechanism that leads to the issues of premature convergence and stagnation [20,21].Therefore, there is an urgent need to enhance the design of the ACS algorithm and to introduce an enhanced algorithm based on subpaths to provide a low probability for reselecting nodes.This again reconstructs the already visited subpaths and becomes lower when the length of an already visited subpath increases to prevent revisiting a subpath.
The problem has many applications like the distribution and transportation of items and people, transportation services, waste collection, and so on.These problems have an economic relevance, particularly in developed countries.Additionally, the economic aspect and saving expenses can motivate companies and researchers to decide the best technique for resolving as well as improving transport efficiency.The CVRP also refers to the process of designing the best and the shortest possible route that connects one location to other geographically distributed locations, for example, school, warehouse, store, university, customer, city, etc. [22][23][24].

Previous Studies Dealing with ACO Algorithms
The aim of this section is to discuss works that are relevant to the ACO algorithm and how it has evolved over time.Along with recognizing the most recent versions of ACO algorithms, it is also important to recognize the issues that still need remedies to be suggested.The ACO is described as a swarm intelligence metaheuristic technique that is developed based on the behavior of ants when they search for their food in nature.In ACO, the ants indicate the procedures involved in the building of stochastic solutions; the solutions are constructed in an iterative and probabilistic method that aims to construct complete solutions from smaller ingredients.Regarding the ACO, the ants often select their path based on the pheromones and how they become attracted to each path.The ACO algorithm is constructed using an iterative technique that mimics the common effort of the ants.The primary components involved in the ACO were the initialization, construction of ant solutions, application of a local search, and updating of the pheromones ( [21,25].There are different kinds of ACOs but only the commonly used ones in the literature are mentioned in this study. The AS was the first algorithm studied out of various ACO algorithms.It is a prototype of numerous ACO extensions.The AS algorithm was firstly suggested in [26].This algorithm consists of two phases, i.e., creation of a solution and pheromone update.The creation includes the application of a probabilistic choice rule used by the ant.This rule is called the random proportional rule.In this algorithm, the likelihood of an ant moving from one node to the other depends on the pheromones and heuristic values.In the pheromone updating phase, the first step involves a decrease in the pheromone values on all arcs by a fixed factor.This step helps the algorithm to overcome the bad decisions made in the past and, simultaneously, if the arc is not selected by the ants, the related pheromone value reduces exponentially with the number of iterations.After the compound has completely evaporated, the pheromone is deposited by the ants on all arcs that they visited when they were searching for their food [27].Many researchers studied the elitist strategy of AS (EAS) that was modified AS [4].In this EAS algorithm, the pheromone is deposited in the best global solution for all iterations used by the other ants.The pheromone compound is evaporated using the same technique as used in the AS process; however, the use of the elitist strategy helps in deriving better routes than those generated by the AS using a lower iteration number.Moreover, the best route is reinforced by adding more of the pheromone compound to the arcs depending on the length of the route and a new parameter is defined as the weight that is included in the best tour [28,29].
Thereafter, the researchers investigated the rank-based AS (ASrank) that was suggested in [30].In the ASrank, every ant deposits a specific amount of the pheromone compound that decreases with its rank.Like the EAS, the best ant so far deposits the maximal amount of pheromone through the iteration.In the first step, the pheromone is updated in the ASrank and all ants are sorted based on their tour length.The rank of the ants is used for weighing the concentration of the pheromones that would be deposited by the ants based on their rank.Through the iterations, the algorithm allowed only the best-ranking ants and the ants that generated the best tour to deposit the pheromone compound ( [31,32]).
Many researchers also studied the MAX-MIN (MMAS) algorithm which was seen to be an enhanced version of the original AS [33].However, it is different from the basic algorithm as follows.Firstly, it used a greedier search process that allowed proper exploitation of all accumulated experiences.Secondly, the MMAS used a wide variety of pheromone trail values that prevented the issue of premature stagnation that frequently occurred during the search technique.Thirdly, the primary value of the pheromone trails was marked as the upper pheromone trail limit after accounting for some pheromone evaporation, in such a manner that the tour exploitation is increased when the search is initiated.Lastly, in the MMAS algorithm, the pheromone trails were reinitialized every time the system did not generate a better tour for a specified number of successive iterations.It was noted that in the MMAS algorithm, the pheromone trails were updated based on the tour developed by the ants after accounting for the pheromone evaporation, like the AS technique [34].Thereafter, the new pheromone compound is deposited depending on the best-so-far tour.The algorithm allowed only two of the ants to add the pheromone, i.e., either the best-so-far ant or the iteration best ant.In this MMAS algorithm, the lower and upper limits [min and max] of the pheromone compound on any of the arcs were used to prevent search stagnation ( [35][36][37]).

Materials and Methods
This section includes all concepts and techniques used in this research work.

Mathematical Model of the CVRP
The CVRP is shown to be an NP-hard problem [27].The CVRP is associated with a set of pathways related to a fleet of vehicles that starts from one depot.However, the multi-depot CVRP is associated with a set of pathways related to fleet of vehicles that starts from some depots with a specified number of clients (or customers) in various geographical locations.It includes a maximal load capacity for all vehicles.The CVRP is a variation of the vehicle routing problem (VRP) that includes the capacity constraints associated with all vehicles.In this context, the main objective of both VRP and CVRP is to minimize the total traveling costs (or distance).The route design considers visiting each customer by a single vehicle such that all customer demand is fulfilled.
(i) The uniformed vehicle fleet needs to originate from a single station (or depot); (ii) Every order by a customer cannot be separated and must be served by only one vehicle.
The CVRP is described as a problem that aims to determine the optimal route that can visit each customer and satisfy their demands, subject to different constraints.All components in the CVRP are described as follows: a complete graph  ,  where  || is the number of nodes,  1, 2, … ,  denotes a set of nodes (customers), and  ,  : ,  ∈ :   represents edges that connect the nodes.  is the distance matrix among the nodes including a depot while the Euclidean distance between two nodes I and j can be calculated as      .It must be noted that every edge ,  ∈  is related to the cost  ,   .The distance and cost matrices are related to E. The function :  →  is the cost function and node 0 represents the depot and the demand of the depot is  0. The remaining nodes represent the customers and every customer i has a non-negative demand and the function :  →  represents the demand function; m is the number of vehicles that are identical and present in the depot [37] based on the additional constraint that the total demand of a route cannot surpass the vehicle capacity ( [19,38]).Figure 1 depicts an example of routes for the CVRP with three vehicles as follows.Dantzig and Ramser [1] proposed the first mathematical model for the CVRP ( [6,39]) which is described below: Based on the following constraints: Equation ( 1) describes the objective functions used for minimizing the total distance travelled by a vehicle under constraint as shown in ( 2)- (8).Constraint (3) ensures that the number of vehicles entering a customer is the same as the number of vehicles leaving the same customer.Constraints (4) and ( 5) are applied for observing the customers who receive the service only once.On the other hand, Constraints ( 6) and (7) ensure that each vehicle that is used starts and ends at a depot and travels only once to offer its service.The main equation that is used for solving the CVRP problem is presented in (8) where it assigns the vehicle's capacity for transporting different items.The sub-tour elimination constraints (9) guarantee that the solution contains no sub-tour.

Three-Opt Local Search Algorithm
A basic heuristic local search algorithm can be used for solving the TSP and network problems, like deleting the three edges of a tour or network and reconnecting them to three alternative edges for forming a network of all probable edges for determining the optimal tours.The researchers repeated this technique for different sets of three edges.It must be noted that there are many ways of connecting the nodes so that the tour can be restarted while also respecting the constraints of the problem [40].In [32], all possible enhanced solutions by two-opt and three-opt are presented but we report only the possible solutions by three-opt in Figure 2 since we are applying three-opt in our proposed algorithm.

K-Nearest Neighbour (KNN) Algorithm
The K-nearest neighbour (KNN) algorithm is an effective technique that can be used for solving combinatorial optimization problems (COPs) like the CVRP.The KNNs are non-deterministic, i.e., they make random decisions which increases their robustness.This is a good technology that is used in the stochastic search for solving complex problems that need a bigger time space for determining the optimal solution.It is also seen to be a vital technique that is used for finding the optimal solutions.The KNN is regarded as a good technique that is used for solving hard problems with high computational complexity, particularly in the field of computer science.This technique has several applications like traffic optimization, the distribution of packages, and the selection of the tour where the aim of tour optimization for the VRP and TSP helps in decreasing the costs and visiting the locations with constraints ( [41][42][43]).The steps of the KNN algorithm are as follows:

Proposed Enhanced Ant Colony System (EACS) Algorithm
The ACS algorithm consists of four main steps-initialization, solution creation, local search, and pheromone update.The steps of the EACS algorithm are presented by proposing an enhancement mechanism based on the subpaths that achieve finding the best solutions for the proposed objectives.The enhancement is made in the step of building the solution which is characterized by the transition of the ant through the transitional equation that has a significant impact on achieving a balance between exploitation and exploration mechanisms.In the same context, this equation has been enhanced by using two mechanisms.The first one is related to the diversification by introducing a new term that supports the exploration mechanism of the transition equation from node to node.The second one is related to the intensification by selecting the best subpaths previously saved in a table that supports the exploitation mechanism for the transitional equation from node to subpath.The steps of our proposed EACS are as follows.
Step I (Initialization): Initialize the pheromone primary matrix, distance matrix, number of ants that are to be used, and control parameters-α, β, ρ, τ0,  , (Q ≥ 0).The total demand of items carried by each vehicle must not surpass the vehicle's capacity, Q.  is the inverse of the distance between nodes i and j.The initial pheromone amount for every edge (i, j) depends on the following function: τ where τ 0 represents the initial value describing the pheromone effect and l refers to the cost generated by the KNN.
Step II: (i) (Solution creation): The transition rule equation used in the ACS algorithm was significant as it allowed the algorithm structure to enhance the solutions.This was attributed to the fact that based on the traditional formulation mentioned in Table 1, the ants move from one node to the other.Hence, it should be properly used for improving the transition and preventing any incorrect move to an unacceptable node since it could lead to a waste of effort and prove to be expensive.The transition rule is enhanced by using the two formulations described in Table 1.
After improving the transition rule, Step 1 implements the transition rule node by node for deriving new solutions.On the other hand, the second formulation was dependent on the movement between the node to subpaths for generating solutions.The first formulation is dependent on the subpaths because it helps in diversifying the solutions when travelling from one node to the next after the addition of a new term that supports the exploration mechanism since all terms in the initial transition rule support the exploitation mechanism implemented for this purpose.Then, all subpaths are saved after each iteration in the table while the repetitive subpaths are excluded for improving the diversification.Thereafter, the second formulation is applied in the intensification mechanism after determining the best solution while travelling from the node to the subpath.The best subpaths are stored after every iteration in different tables wherein all subpaths are utilized rather than depending on the nodes (i.e., the conventional formulation).The paths initiate at a particular node and stop at different specified nodes.The total distance and total pheromone concentration are calculated.Moreover, determine the amount of pheromone that is saved for every subpath of the path.Then, the transition rule is applied after they are considered as a single edge.The enhancement in the transition rule depends on the transition between the nodes or the transition to the subpath in the following manner (Equation ( 10)): Here,   is the transition equation of node-by-node,   is the transition equation from node to subpath, h is the coefficient for utilizing the subpaths, and  ∈ 0, 1 is a random number.In the traditional transitional rule, a tour is carried out from one node to another wherein each ant successively adds new nodes until it visits all nodes.Here, if the ant k is present at node i, it moves to the next node, j, from the set of legal nodes, U (i.e., the set of unvisited nodes).The justification for suggesting this enhancement is because the ACS algorithm suffers from a lack of diversity so there is a need for improving the transitional rule which has derived from a set of terms with its associated coefficients that has been enhanced by most related studies ( [44,45]) that used the terms to support exploitation.While this research work introduced a new term  for this transitional rule in the enhanced ACS algorithm through which the passage of the same subpaths that were visited in previous solutions is avoided, this supports the exploration mechanism and, thus, the diversity is increased.The transitional rule became the following (Equation ( 11)): Here,  ѱ , ѱ is the maximum number of continuously visited nodes from the beginning of the solution k that exist partly or completely on one of the recorded previous subpaths so that the more the number of nodes in the chosen subpath ѱ increases, the value of  decreases.Therefore, the probability of choosing it later decreases and the probability of exploring other subpaths then increases.Furthermore, (i, l) refers to the edge; l is the city that was not yet visited by ant k.If  Q, the exploitation mechanism was selected; however, if   , the exploration was selected. is the random variable that is specified based on the probability transition rule between different nodes  [38] that was applied on the subpaths in the following manner (Equation ( 12)): Here,  is amount of pheromone on the edge  ,  is the inverse of the distance between nodes i and j,  is the savings between nodes i and j, and α, β, γ, and δ are the control parameters.In the mechanism of building the solution by using the subpaths, we convert the terms of the transitional equation so that it depends on the subpaths and not on the edges as we select the best subpaths to build the solution sequentially.The transition rule based on subpaths is given as below (Equation ( 13)): Here,  is the random variable that is defined based on the probability of the transition rule from the node to a subpath  which is applied according to the subpaths in the following manner (Equation ( 14)): Here, G represents the set of nodes of the subpaths that start at node i. Between the start and end nodes, these subpaths include many other unvisited nodes.These subpaths have a common feature where they start at one node and differ in other nodes and end at a different node while travelling between different paths.
Step II: (ii) (Local pheromone update): It includes the update of local pheromone to limit its concentration for exploring unused routes to produce different solutions and avoids the fall in a locally optimal, thus making the route less attractive for the next ants.Equation (15) shows the process of this stage.
Here,   0, 1 is a parameter, known as the evaporation coefficient, whose value is described in Table 2.  =  represents the primary pheromone level of edges and  is the length of the tour generated by the KNN.As in the CVRPLIB Step III: (Local search): In this section, the nodes are changed to enhance the route of all vehicles and, hence, to enhance the solutions that have been built by all ants through improving the quality of the solution of every ant.Alternatively, when utilizing the local search, the best local enhanced solutions might have a major chance to find the best solution.So, the local search is utilized for improving the solutions.Although this can be conducted in many ways, the most popular techniques include the use of two-opt and threeopt local search methods.In the two-opt method, two edges are eliminated from the tour and then the eliminated two edges are reconnected.The two edges can only be reconnected such that the validity of the tour is guaranteed and it is shorter.It is seen that the three-opt algorithm is operated similarly; however, rather than eliminating two edges, the algorithm removes three edges.This means that there are two techniques of reconnecting the three edges.In this study, we focused on using the large CVRP data, hence, we apply the three-opt technique for completing their subtour and k-opt was applied to various subpaths derived based on the experience of subpaths from the earlier iterations.This considered the installation of node 1 at last in every subpath.This ensures the enhancement of the best picture of the paths.In this phase, we apply the local search technique for improving the best solutions and thereby improving the best subpaths.This experience can help in successive iterations.This could be maximized after improving the subpaths where we can use them for global update.
Step IV: (Global pheromone update): A global update is carried out after every iteration wherein the pheromone values are updated based on the solution quality in the existing iteration.It can be performed by decreasing the pheromone values for all solutions using the evaporation procedure.This increases the pheromone value which helps in deriving the best solutions.On the other hand, in the EACS algorithm, the best elitist ants present in the iteration can lay the pheromone compound on the ribs where they travelled.A global updating rule may be described as follows (Equation ( 16)).where  = ranking index,  refers to the increased trail level on the edge (i, j) that are affected by  ℎ best ant,  = tour length of  ℎ best ant,  * represents the increase in the trail level on the edge (i, j) triggered by elitist ants,  = no. of elitist ants,  * = tour length of the best solution, and t = iteration counter while  ∈ (0, 1] is the parameter used for regulating the decrease in  .The global update section collects all experience of the earlier iterations and updates the pheromone level of the best solution using another coefficient that differs from other coefficients used for the specific solutions that were not as effective as the elitist solutions.In the algorithm proposed in this study, the experience of the distinctive subpaths derived using the earlier iterations was retained for their later use.They could be used for developing solutions that were based on the experience of paths and helped in generating better results in less time.The pseudocode of the proposed EACS algorithm was presented as in Algorithm 1.  16)-( 18) as described in Step IV.End Report Best Solution

Results and Discussion
The results of the proposed EACS algorithm on benchmark CVRP data have been presented on a few statistical criteria.Furthermore, we compared the effectiveness of the proposed algorithm before and after the enhancement.We also compared the proposed algorithm with a state-of-the-art technique.

Statistical Criteria Used in the Study
The statistical criteria have included several statistical measures that have been used in this section to calculate the solutions for the CVRP instances that involve two types of solutions called best-known solution (BKS) and optimal solution (OPT).The statistical techniques used in the study include the calculation of the best solution (BS), average solution (AS), worst solution (WS), percentage of best gap (BG), percentage of average gap (AG), percentage of worst gap (WG), average time (AT), and standard deviation (SD) of 10 runs for each problem instance.In addition, the instances of the CVRP used in this study are taken from the CVRPLIB (http://vrp.galgos.inf.puc-rio.br/index.php/en/)accessed on 15 July 2023.

Parameter Tuning
The parameter tuning process is carried out for determining the best parameters that can help in improving the efficiency of the algorithm.It is noted that the grid search process is a simple optimization technique that carries out an exhaustive search process and manually derives a precise set of parameter regions for the classification technique.The benefit of the grid search technique is that the parameter settings are thoroughly created.For that, every dataset will be used to test all datasets [46].Grid search has three steps which are given below.
(i) Deriving the specific parameter settings depending on the specified cost limit.For example, the cost limit of five means the no. of specific settings for every parameter is five.Hence, for the despotic classifier with three parameters and a cost limit of five, the grid search process produces 5×5×5 = 125 mixtures of parameter settings.(ii) Assessing every specific parameter setting.(iii) Identification of the optimal parameter settings.
We report our parameters that are used in our proposed algorithm in Table 2.

Implementation of the EACS Algorithm on the CVRP Dataset
We have presented the results after applying the proposed EACS algorithm using the CVRP dataset.We have encoded our algorithm using MATLAB (R2018b (9.5.0.944444) on a 64bit (win64) PC with Intel (R) Core (TM) i7-3770 CPU @ 3.40 GHz under MS Windows 10 and 8GB RAM.We tested the application of the algorithm using different statistical measures; the best criterion was derived after solving the equations using the CVRP dataset wherein the lowest value was derived using the objective function of the CVRP model during repetition with the help of the proposed EACS algorithm.On the other hand, the worst criteria indicated the maximal value that could be derived from the objective function for the CVRP model during repetition with the help of the proposed EACS algorithm.One other criterion that was used included the average, i.e., mean of the objective function for the CVRP model during repetition with the help of the proposed EACS algorithm.Then, CPU time in seconds.Finally, SD denotes how far these values are far from the value in the centre.Moreover, to evaluate the solutions obtained through the proposed algorithm, Equation ( 19) was utilized to determine the percentage of gap (Gap) between the optimal solution and the best solution.
Here, S is the obtained solution and C* is the OPT/BKS reported in the CVRPLIB.If the value of the gap is zero, then the solution is optimal; if the gap is close to zero, then it is a good solution; and if the gap is away from zero, then it is not a good solution.For example, as for the instance CMT1 from the CVRP dataset, this instance has an optimal solution in the CVRP dataset and its value is 524.61.When implementing our proposed EACS algorithm on this instance, we obtained BS value 524.61 after 10 runs.To evaluate this solution, we find the gap as follows:  524.61 524.61 524.61 100 0.00 Table 3 shows the results of the EACS algorithm in the case of a CVRP dataset, called CMT, which contains 14 instances, out of which 13 instances have OPT and 1 instance has BKS.The results show that the algorithm could obtain 12 OPTS out of 13 OPTS and 1 BKS out of 1 BKS.The average of the best solutions is 983.54 while the average of solutions in CVRPLIB is 976.03; that means the average percentage of the best gap is 0.72 with an average SD of 21.91 and the average time is 249.53 s, which is a reasonable time.The results of the proposed EACS algorithm on the case "Set P" of CVRP dataset have presented in Table 4, which has 23 instances, and the type of solutions is OPT.The results show that the EACS algorithm obtained 21 OPTS out of 23 OPTS and the average of BS is 591.48 which is the same as the average of solutions in CVRP.That means the average of the BG is 0.52, with the average SD being 8.88 and the average time being 157.61 s, which is a reasonable time.

Evaluating the Effectiveness of Our EACS Algorithm
We have assessed the effectiveness of the ACS algorithm after its enhancement with the help of the subpath.This assessment was carried out in the following manner.

Comparison between the ACS and EACS Algorithms
We have compared the performance between ACS and EACS algorithms based on the gap (accuracy) mentioned in Equation (19).Table 5 shows the comparative results.The comparison was confirmed in the previous section that relied on evaluation metrics for the EACS algorithm, has outstanding performance, and is superior to ACS algorithm.This is reflected positively to optimize the solutions of the CVRP instances within a reasonable computational time.For example, the Bgs of the instances CMT3, CMT4, CMT5, CMT7, CMT8, CMT10, CMT11, and CMT12 are 1.67, 1.54, 2.31, 1.69, 1.28, 2.07, 10.62, and 2.58, respectively, using the ACS algorithm.These Bgs have been reduced to 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 10.09, and 0.00, respectively, using the EACS algorithm.For the average of AT for all "CMT" instances, the ACS algorithm takes 328.84 s whereas the EACS algorithm takes 249.53 s.
Furthermore, a comparison between ACS and EACS algorithms was conducted on the CVRP "P-n-k" case and is reported in Table 6.The exploration issue in the ACS algorithm had a negative impact on its efficiency, robustness, and strong convergence so the performance negatively affected the obtained results.For example, the BG of the instances P-n16-k8, P-n19-k2, P-n20-k2, P-n22-k8, P-n23-k8, P-n60-k15, P-n65-k10, and P-n70-k10 were 22.89, 11.32, 10.19, 7.63, 19.85, 12.81, 5.68, and 8.83, respectively, using the ACS algorithm.Conversely, the EACS algorithm dealt with the exploration issue by using subpaths and thus it was able to increase the diversity, which reflected positively on the performance of the algorithm and thus achieved 21 OPTS out of 23 OPTS of the "P-n-k" instances from CVRP dataset.In terms of implementation time, the traditional algorithm ACS found solutions for these instances within 189.44 s; the EACS algorithm resolved those cases within 114.132 s.For comparing the efficiency of the algorithms, one of the three formulations is used which are given below [47].
(i) Minimum number of times\iteration to find new solutions given by the following formula: (ii) Mean number of times\iteration to find new solutions given by the following formula: (iii) Maximum number of times\iteration to find new solutions given by the following formula: The results in Table 8 show that the enhanced EACS algorithm has an outstanding performance compared to the traditional ACS algorithm based on the efficiency criteria.The efficiency results of the ACS algorithm are higher than that of those the EACS algorithm.For example, the results of the instances P-n55-k15, P-n60-k10, P-n60-k15, P-n65-k10, and P-n70-k10 using the ACS algorithm are 58.80,36.00,40.50, 65.25 and 52.67, respectively, while the results of those instances using the EACS algorithm are 9.50, 11.00, 20.20, 10.67, and 7.50, respectively.

Comparison of EACS Algorithm with a State-of-the-Art Algorithm
In this section, our EACS algorithm is compared with one of the state-of-the-art methods that solved the CVRP.In [47], a simulated annealing algorithm based on the population (PSA) was proposed to solve the CVRP and was implemented on some well-known instances from the CVRP dataset.Table 9 reports the results of this comparison.

Theoretical Analysis and Critical Explanation for the Performance of the Proposed EACS Algorithm
Many earlier studies showed that the metaheuristic algorithms are very effective in handling the NP-hard problems.Hence, in this study, we proposed an EACS algorithm belonging to the swarm intelligence (SI) category, which is a class of metaheuristic algorithms.The no free lunch (NFL) theorem [48] used in the optimization field states that no single algorithm displays a good performance while solving all problems.Moreover, this performance can also be poor in a few instances.Hence, we have proposed an enhanced algorithm that would show an enhanced performance on a specific problem; however, it would not provide a comprehensive solution for all problems.
For achieving an efficient performance of this proposed algorithm, the metaheuristic algorithms must address some issues like lack of an exploration mechanism, stagnation, and parameter tuning.All these issues have been addressed in this study.Furthermore, studies in the literature have succeeded in improving the intensification (exploitation) of the ACS algorithm by the experience of subpaths [23].However, the ACS algorithm is suffering from an exploration issue; therefore, this study has considered this issue by enhancing the traditional transition rule in the ACS algorithm by using the subpaths to support the exploration mechanism in the EACS algorithm where all subpaths are stored after finishing every iteration in a table to exclude repeated subpaths for achieving diversification.To verify that our proposed algorithm has a good contribution, the performance was evaluated using evaluation metrics that included efficiency and gap.The proposed algorithm showed an enhanced efficiency as the convergence was increased to optimal solutions within a reasonable computation time for the CMT6, as shown in Figures 7-10.

Statistical Analysis
In this section, we have presented a statistical analysis of all findings displayed by the EACS and the ACS algorithms where they used the p-value for rejecting the null hypothesis as follows.The statistical analysis related to comparison between the best solutions obtained by the ACS and EACS algorithms that have solved some of the instances from the CVRP dataset.The different hypotheses consist of the null hypothesis, which refers to the average of the best solutions acquired by the ACS algorithm.This was seen to be equal to the mean of all best solutions derived using the EACS algorithm.Hypothesis 2 refers to the alternative hypothesis, which is seen to be the mean best solution that is derived with the help of the ACS algorithm.This was not equal to the mean of the best solutions acquired using the EACS algorithm.Table 10 presents the statistical analysis of the paired samples.As shown in Table 10, the p-value of the null hypothesis was less than 0.05 in the 95% confidence interval, hence, it was rejected.This indicated that there was strong evidence indicating that the above solutions were different.Owing to its positive value, the solutions derived using the ACS algorithm were worse compared to the solutions derived using the EACS algorithm.On the other hand, the Wilcoxon signed-rank test was used for statistically analyzing the performance of the proposed EACS algorithm and the algorithm PSA that was proposed in [49] as follows: No difference was noted between the average value obtained using the PSA and the proposed EACS algorithms for the null hypothesis.On the other hand, differences were noted in the mean value calculated using the proposed EACS and PSA algorithms in the case of the alternative hypothesis.The results of this test have been presented in Tables 11  and 12.The test statistics have been presented in Table 12.
As shown in Tables 11 and 12, the test value was seen to be −4.82 while the confidence level was 0.00, which was less than 0.05.Hence, the researchers have rejected the null hypothesis and accepted the alternative hypothesis.Though the comparative study showed a better performance of our EACS compared to the enhanced simulated annealing algorithm, our proposed algorithm could not find an optimal solution for all problem instances.

Conclusions
Despite the metaheuristic algorithms' success, balancing the smart mechanisms owned by these algorithms represented in exploitation and exploration is considered a challenge for most of these algorithms.Therefore, this research work has addressed the exploration issue in the ACS algorithm by using subpaths to avoid generating the same solutions, thus leveraging the diversity of generating solutions to find better solutions with less route distance in a reasonable time.The performance evaluation results of the EACS algorithm have shown that the EACS algorithm is better than the ACS algorithm based on the evaluation metrics efficiency and powerful convergence in addition to being better than that based on the gap (accuracy) by using Equation (18).In this study, we also compared the EACS algorithm with a state-of-the-art technique and noted that our proposed EACS algorithm showed a better performance compared to the enhanced simulated annealing algorithm.The enhanced simulated annealing algorithm yielded 29 optimal solutions out of the 61 optimal solutions whereas the proposed EACS algorithm yielded 57 out of the 61 optimal solutions.
Though the comparative study showed a better performance of our EACS compared to the enhanced simulated annealing algorithm (PSA), our proposed algorithm could not find optimal solution for all problem instances.So, other metaheuristic algorithms, like

Figure 1 .
Figure 1.Routes for the CVRP with three vehicles.(A) Assumptions (i) Customer demand ,  , is known 0 <  ≤ Q; (ii) Limited vehicle capacity.(B) Variables and parameters (i) V: A set of customers is represented as   ,  ,  … ,  where n is the number of customers; (ii)  : Transportation cost from nodes (customers) i to j; (iii) D: Length of the route (total distance that is travelled by the vehicle) should not surpass a particular defined constraint; (iv) Q: Capacity of each vehicle; (v) m: Number of vehicles; (vi)  : Main distribution centre refers to the depot node where a tour starts and ends; (vii) K: Set of identical vehicles;   ,  , … ,  is based on the main distribution centre,  .

Figure 2 .
Figure 2. (a) The original Hamiltonian cycle, (b-e) All other possible Hamiltonian cycles using three-opt search.
(i) Load the training and testing data in the first step of the KNN algorithm; (ii) Choose a value of K (nearest data point); (iii) For every point included in the test data, the given steps must be implemented; (a) Using the Euclidean distance rule, estimate the distance between the test data and every row of the training data; (b) The distance values are sorted in ascending order; (c) The KNN algorithm selects the topmost K rows of the sorted values; (d) Assign a class to the test point depending on the most recurring class of rows.

Figure 3 .
Figure 3. No. of OPT obtained by EACS and PSA on the "Set A" case.

Figure 4 .
Figure 4. No. of OPT obtained by EACS and PSA on the "Set B" case.

Figure 5 .
Figure 5. No. of OPT obtained by EACS and PSA on the "Set P" case.

Figure 6 .
Figure 6.No. of OPT obtained by EACS and PSA on the "Set E" case.

Figure 7 .
Figure 7. Strong convergence rate of best, worst, and average solutions by the EACS algorithm to solve the instance of CMT6.

Figure 8 .
Figure 8.Strong convergence rate of the best, worst, and average solutions by the ACS algorithm to solve the instance of CMT6.

Figure 9 .
Figure 9.Time efficiency of strong convergence by EACS algorithm to solve the instance of CMT6.

Figure 10 .
Figure 10.Time efficiency of strong convergence by ACS algorithm to solve the instance of CMT6.

Table 1 .
Transitional rules before and after enhancement.

Table 2 .
Parameter settings used in our algorithm.

Table 3 .
Results of the EACS algorithm on the "CMT" case.

Table 5 .
Comparison between ACS and EACS algorithms on the "CMT" case.

Table 6 .
Comparison between ACS and EACS algorithms on "P-n-k" case.

Table 10 .
Statistical analysis of the results of the best solutions obtained by ACS and EACS algorithms.

Table 12 .
Test Statistics a .
a Wilcoxon Signed Ranks Test, b Based on positive rank.