Abstract

We aim to suggest a simple genetic algorithm (GA) and other four hybrid GAs (HGAs) for solving the asymmetric distance-constrained vehicle routing problem (ADVRP), a variant of vehicle routing problem (VRP). The VRP is a difficult NP-hard optimization problem that has numerous real-life applications. The VRP aims to find an optimal tour that has least total distance (or cost) to provide service to n customers (or nodes or cities) utilizing m vehicles so that every vehicle starts journey from and ends journey at a depot (headquarters) and visits every customer only once. The problem has many variations, and we consider the ADVRP for this study, where distance traveled by every vehicle must not exceed a predefined maximum distance. The proposed GA uses random initial population followed by sequential constructive crossover and swap mutation. The HGAs enhance the initial solution using 2-opt search method and incorporate a local search technique along with an immigration procedure to obtain effective solution to the ADVRP. Experiments have been conducted among the suggested GAs by solving several restricted and unrestricted ADVRP instances on asymmetric TSPLIB utilizing several vehicles. Our experiments claim that the suggested HGAs using local search methods are very effective. Finally, we reported a comparative study between our best HGA and a state-of-the-art algorithm on asymmetric capacitated VRP and found that our algorithm is better than the state-of-the-art algorithm for the instances.

1. Introduction

The vehicle routing problem (VRP) is very complicated traditional NP-hard combinatorial optimization problem (COP) that was presented by Dantzig and Ramser [1]. The problem determines minimum distance (cost or time) route for a vehicle set to serve a customer set. It has several real-life applications such as shipments delivery, transportation networks, and street cleaning. The VRP is a widely studied problem that has several variants such as the VRP with Backhauls (VRPB), the VRP with pickup and delivery (VRPPD), the split delivery VRP (SDVRP), the VRP with time window (VRPTW), and the multi-depot VRP (MDVRP) [2].

We consider another variant of the VRP, called distance-constrained VRP (DVRP) in which total distance toured by every vehicle in the tour is constrained by a predefined maximum distance. The problem determines minimum cost route for a vehicle set so that every customer is provided service once by exactly one vehicle, every vehicle starts journey and ends journey at the same depot, and the entire distance traveled by each vehicle must not exceed the predefined maximum distance. Methods that have been used to solve the DVRP as well as COPs are categorized as exact and heuristic methods [3]. Branch and bound, branch and price, branch and cut, and lexisearch are some examples of exact methods which obtain exact solutions [4]. However, these methods take lots of computational effort. However, heuristic and metaheuristic methods obtain near exact solutions quickly, so they are normally used in large-scale DVRP instances. Metaheuristic methods are more advanced than the heuristic methods. Genetic algorithm (GA), simulated annealing (SA), differential evolution algorithm (DEA), tabu search (TS), artificial bee colony (ABC), ant colony optimization (ACO), and particle swarm optimization (PSO) are some examples of metaheuristic methods. They can obtain suitable solutions to various kinds of optimization problems in a realistic time [5]. Among them, GA is commonly applied to find effective solution to the COPs in a reasonable time.

GA is a popular metaheuristic algorithm, which was first introduced by John Holland [6]. The major assumption of GA is that just the stronger individuals/chromosomes can live longer. Normally, a random population of chromosomes is generated first, and then using possibly three operators—selection, crossover, and mutation, (hopefully) new population is created in each generation. The process is replicated till the stopping criterion is reached. The purpose is to find solution with higher fitness value that is close to the optimal solution.

A common problem with GAs is premature convergence to obtain optimal solution which is due to the population diversity loss. If it is low, the convergence will be fast; otherwise, convergence will be time-consuming and sometimes it is a wastage of computational efforts. So, it is important to balance between exploitation and exploration of search area. In general, the effectiveness of GAs extremely depends on genetic operators. Among them, crossover operator plays a very important role and accordingly many researchers used/developed different crossovers for the VRP. Usually, crossover techniques that were used/developed for the usual traveling salesman problem (TSP) are used in other COPs also. Among crossover operators, sequential constructive crossover (SCX) was found very good for some COPs [7, 8]. Though simple GA using SCX is very good, sometimes it gets stuck in local optima. So, one can go for hybrid GA that merges simple GA with a local search (or heuristic) method.

The main contribution of this paper is to propose a simple GA and four hybrid GAs (HGAs) for the ADVRP. In our proposed HGAs, initial population is generated randomly that is further enhanced by 2-opt local search, offspring are created by SCX, random alteration of two genes by swap mutation, solutions are improved by one of three different local search methods, and stagnation/premature convergence is removed by immigration method. Experiments have been conducted among the suggested GAs by solving several restricted and unrestricted ADVRP instances on asymmetric TSPLIB utilizing several vehicles. Our experiments claim that the suggested HGAs using different local search methods are very effective. Finally, we did a comparative study between our best HGA and a state-of-the-art algorithm [9] on some asymmetric capacitated VRP (ACVRP) and found that our algorithm is better than the competing algorithm for the instances.

This paper is arranged as follows: Section 2 defines the problem, Section 3 provides a literature survey for the problem, Section 4 develops the simple GA and hybrid GAs for the problem, Section 5 introduces results of experiments, and finally Section 6 introduces discussion and conclusion.

2. Problem Definition

The ADVRP determines the minimum cost route to serve a customer set. The cost is defined by total traveling distance. Customers are scattered across several locations, and each of them is to be visited only once by a single vehicle. Generally, the vehicles have the same distance constraints.

2.1. Assumptions

Following are the assumptions for defining the problem:(i)Each customer is visited exactly once by exactly one vehicle(ii)Each vehicle route starts and ends at the same depot(iii)Each vehicle’s route can only pass through one depot exactly once(iv)A non-negative distance-constrained for all vehicle is defined, and the distance traveled by each vehicle cannot exceed the distance-constrained(v)The sum of route of all vehicles must be minimum

2.2. Notation

Following is the list of notations that will be used in this study (Table 1).

The objective of the ADVRP is to find a least cost optimal tour set that visit all cities using all vehicles, every vehicle starts journey from and ends journey at the same headquarters, each city is visited exactly once, and the distance traveled by each vehicle must not exceed . If , the matrix is symmetric, otherwise, asymmetric. The mathematical model of the ADVRP is given below [10].

The objective function:

Subject to

In this formulation, the constraint (1) shows the objective function that minimizes the total routes’ distance. The constraints (2) and (3) are the constraints that ensure that each node (or customer) is visited exactly once, whereas the constraints (4) and (5) ensure that only m vehicles are allowed. The constraint (6) is a flow constraint that is identified as a flow-based model which states that the distance from city i to another city j on a tour must be same as the difference between the distance from headquarters (depot) to city i and the distance from headquarters to city j. The constraint (7) claims that the distance from headquarters to city j must not exceed the difference between the predefined maximum distance (Dmax) and the distance from city j to depot. The constraint (8) verifies that the distance traveled up to the depot must not exceed the predefined maximum distance. Additionally, the constraint (9) states that the total distance from depot to city j must not be less than the distance from the depot to city i plus the distance from city i to city j. The constraint (10) shows the initial value of z0i that equals the distance from the depot to city i. The constraint (11) states that the decision variables xij are binary variables.

3. Literature Review

There is enough literature for the CVRP, but very few literature are available for the DVRP as it is not a common variant [2]. A branch and bound (B&B) method is developed in [10] for finding exact solution to the ADVRP. A multistart B&B method is developed in [11] for solving the ADVRP. Computational results show that the algorithm can provide exact solutions for some instances. But, for some instances, it could not find a feasible solution. Additionally, when distance restriction is tight, solving the problem instance becomes very hard, and the method is terminated before it might find any feasible solution. A lexisearch algorithm is developed in [4] for the DVRP and applied on various problem instance types. The results show that as the number of vehicles increases the computational time and optimal solution value also increase. Further, for some instances, the algorithm failed to prove the optimality of the solutions within restricted time limit. In general, exact algorithms cannot provide exact solutions for large problem instances, and hence many heuristic algorithms are developed for solving large problem instances.

Rachid et al. [12] compared some crossover operators for the VRP and found that partially mapped crossover (PMX) is better than ordered crossover (OX), and OX is better than merge #2. The PMX arbitrarily chooses two crossover points, copies the sub-chromosome between the points from any parent into one offspring, and then creates the full offspring by adding remaining cities from other parent in the mapped process. The OX arbitrarily chooses two crossover points, copies the sub-chromosome between the points from any parent into one offspring, and then creates the full offspring by adding remaining cities from other parent in the same order as they appear therein. The merge #2 operator is based on the global precedence among the genes and is independent of any of the chromosomes.

Krunoslav and Robert [13] compared eight crossover operators for the VRP and showed that alternate edge crossover (AEX) is best among them. The AEX chooses edges subsequently from the parents or arbitrarily chooses a legal edge if an illegal edge exists, for creating offspring.

Alabdulkareem and Ahmed [7] conducted a comparative study among four crossover methods—cycle crossover (CX), SCX, AEX, and PMX, for the DVRP and observed that SCX is the best. The CX takes positions and values from any parent so that the cities are reproduced from every parent in alternative cycles for creating offspring. The SCX creates an offspring using better links (edges) from the parents. Sometimes, it introduces better new edges which are not consistent in any parent. So, the chance of creating better offspring is very high [8].

Simple heuristic procedures have some drawbacks, such as stagnation and premature convergence. Hybrid techniques are used to overcome such drawbacks. Hybridization can be done by combining the better sides of various exact methods or heuristic methods [14]. Several hybridization methods have been described in the literature for the VRP.

A hybrid swarm-based method (PSO-VNS) is proposed for the distance-constrained CVRP in [15], by combining a variable neighborhood search (VNS) within the PSO. As reported, the algorithm shows high-quality solutions compared to the existing algorithms.

The variable neighborhood SA (VNSA) algorithm is proposed for the CVRP in [16] by combining a modified VNS and SA. The algorithm is tested on 39 CVRP instances and then is compared against some existing algorithms. As reported, the algorithm could solve some large and very large instances efficiently.

A hybrid algorithm (LNS-ACO) is proposed for the capacitated VRP (CVRP) in [5] by embedding the solution by the ACO into the large neighborhood search (LNS) algorithm. The performance of the algorithm is tested on 88 CVRP instances and then is compared against other LNS algorithms. As reported, the algorithm has a suitable performance in solving the instances.

Four hybrid algorithms—improved intelligent water drops (IIWD), advanced cuckoo search (ACS), local search hybrid algorithm (LSHA), and post-optimization hybrid algorithm (POHA)—are proposed for the CVRP in [17]. Experimental results on some instances are compared to the best known solutions and found that LSHA and POHA algorithms could obtain best known solutions for most of the instances.

An enhanced perturbation-based VNS with adaptive selection mechanism method (PVNS-ASM) is developed in [18] by combining perturbation-based VNS (PVNS) with an adaptive selection mechanism (ASM). The algorithm is tested on 21 CVRP instances and then is compared against existing heuristics. The computational results show the efficiency of the algorithm.

A hybrid firefly algorithm (CVRP-FA) is proposed for the CVRP in [19] by integrating 2 h-opt and improved 2-opt algorithms for improving solution quality obtained by PMX and two mutation operators, and then tested on 82 instances. The computational results show that the algorithm has faster convergence rate and higher computational accuracy.

An improved SA (ISA) algorithm with crossover operator (ISA-CO) is developed for the CVRP in [20] where a population-based SA algorithm is applied. Further, the solutions are improved using four local search methods—swap, scramble, insertion, and reversion—and two crossover operators—PMX and OX operators. The algorithm was applied on 91 instances. The computational results show that the algorithm has a better performance compared to other algorithms.

A hybrid algorithm that combines the randomized VNS (RVNS) and TS is proposed in [9] to solve the ADVRP. In addition, the intensification and diversification stages are also incorporated to find optimal solutions. Computational results show that the algorithm is competitive in finding quality solutions.

There is some literature available for other VRP variants. A hybrid GA is proposed to solve the VRP with drones (VRPD) [21]. Experiments were carried out on different instances and found good performance of the algorithm. A novel hybrid algorithm by combining the GA and modified VNS (MVNS) for the VRP with cross-docking (VRPCD) is proposed in [22]. To prove the usefulness of the hybrid algorithm, a comparative study is carried out on some problem instances. It is found from the computational study that the proposed algorithm is more efficient than other algorithms to find best solutions in less computational time. A hybrid multi-objective genetic local search (HGLS) algorithm is proposed for the prize-collecting VRP (PCVRP) in [23]. Experiments on some instances are performed to evaluate the performance of the algorithm that shows the superiority of the algorithm.

4. The HGAs for the ADVRP

In this present section, a simple GA and four HGAs are proposed for the ADVRP. Following is the list of notations that will be used in our algorithms (Table 2).

4.1. The Solution Encoding and Initial Population

For applying GA to solve any problem, a way to represent (encode) a solution as chromosome (individual) must be defined first. In our GAs, a solution is encoded by an integer chromosome called path representation whose length is n+m-1, where n is the number of cities and m is the number of vehicles. In this representation, there are m-1 extra cities that represent duplicate depot cities to show the beginning of new vehicles [24]. A chromosome consisting of all routes of the vehicles is created randomly such that distance constraint is not violated. An initial population of size Ps is created using Algorithm 1.

An example of a chromosome with n=10 cities and m=3 vehicles is given in Figure 1(a), where the integer 1 and integers bigger than 10 are the depot and the others are intermediate cities. The routes of the vehicles are shown in the VRP version in Figure 1(b), while the graphical interpretation of the routes is given in Figure 1(c). Thus, the given distance matrix is to be augmented to show the duplicate depot cities. For this, m-1 copy of the depot (city 1) row and column (i.e., 1st row and 1st column) is added to the given original matrix.

Input: , , .
Output: Population of chromosomes.
fortodo
  Set first city .
  Current chromosome contains only “city 1.”
  Prepare a list of remaining cities except dummy cities.
  fortodo
    Select a city (suppose city q) randomly from the list of remaining cities.
    If the distance of the route of present vehicle is less than or equal to , then add it to the current chromosome and then remove it from the list to make sure that it is not repeated.
    If the distance of the route greater than then add a dummy depot (city q).
    Rename the “city q” as “city p” and continue.
  end for
end for
Improve the population by 2-opt local search
Return the population
4.2. Fitness Function and Selection Operator

The objective function value of a chromosome (solution) is the total traveled distance of the routes by all vehicles. The distance of every route is computed by adding the distances between the cities. Since the ADVRP is minimization problem, so the fitness function is the inverted objective function. In the selection procedure, a subpopulation (some chromosomes) is chosen from the current population for forming the next population. The performance of GA is affected by choosing a better selection operator without which GA is a like random sampling that gives various results in the generations. Several selection procedures are present in the literature. We implement the fitness proportional selection (FPS) [25] for our GAs, which is very popular operator where the fitness value of every chromosome in a population relates the area of roulette-wheel portions. Then, a chromosome is pointed by the roulette-wheel pointer after it is rotated. Depending on the fitness value of each chromosome, a probability probi of selection is calculated as follows:where Ps is the population size and fi is the fitness function value for the chromosome i. Thus, better fitness value chromosomes have higher chance of being selected as parents. There is no variation of the segment size and selection probability during the selection process. This process is very simple to implement, and it gives unbiased distributed probabilities to the chromosomes and assigns a high probability to the best chromosome. This procedure is called roulette-wheel selection procedure [6] that is presented in Algorithm 2.

Input: , Population of chromosomes.
Output: New population of chromosomes.
Calculate the fitness , probability probi, and then cumulative probability cpi of each chromosome () of the population. Note that cp0 = 0.
fortodo
  Generate a random number .
  if () (for any ) then
    Copy the chromosome j to the population.
  end if
end for
Return the new population
4.3. The Crossover Operator

The selection procedure gives a trade-off between exploration and exploitation of search area. The crossover is a major procedure in GAs that is employed on a chromosome pair to generate offspring(s) within a subspace restricted by the parents. Combinedly, selection and crossover operators are very strong operators that accelerate the convergence of GAs. The basic one-point or multi-point crossover operators do not work with respect to our encoding. The crossover operators which are valid for the TSP can be applied to the VRP and its variants. Several crossover operators are present in the literature for the TSP, and we are using the SCX; as it is observed to be one of the best crossovers for the DVRP [7], we apply this SCX with some modifications. The SCX algorithm is presented in Algorithm 3.

We demonstrate the SCX applying on a 7-city () and 2-vehicle () instance together with distance matrix given in Table 3. Further, suppose that maximum allowed distance is 60.

Input: , Pair of parent chromosomes.
Output: Offspring chromosome.
Generate a random number .
if () then do
  Set.
  The offspring chromosome contains only “city 1.”
  forto n do
    In each chromosome consider the first “legitimate” (un-visited) city existed after “city p.”
    if no legitimate city is existed in a parent, then
      Examine from starting of the parent and choose the first legitimate city existed after “city p.”
    end if
    Assume that “city α” and “city β” are selected from 1st and 2nd parents, respectively.
    if () then do
      Add “city α” to the offspring chromosome.
    else
      Add “city β” to the offspring chromosome.
    end if
    If after combining the current city,
    then
      Drop the current city and add a dummy depot in the route as the end city of the route.
    end if
    Rename the present city as “city p” and continue.
  end for
end if
Return the offspring chromosome

We modify the given distance matrix by combining one copy of the depot (city 1) row and column (i.e., 1st row and 1st column) to the matrix [14] that is provided in Table 4.

Let P1: (1, 2, 4, 8, 3, 6, 5, 7) and P2: (1, 3, 8, 5, 2, 7, 4, 6) be parent chromosomes. The objective function value of a chromosome is determined by summing the tour distances of all vehicles. The objective function value (total distance) of the 1st parent chromosome is 75 with the 1st and 2nd vehicle distances 54 and 21, respectively. The objective function value of the 2nd parent chromosome is 72 with the 1st and 2nd vehicle distances 56 and 16, respectively.

The calculation is begun from the city 1 (depot). After city 1, cities 2 in P1 and 3 in P2 are un-visited cities with distances d12 = 2 and d13 = 11. Since d12 < d13, city 2 is combined that generates the offspring as (1, 2). Since 2 = Droute < Dmax = 60, continue to build offspring. After city 2, cities 4 in P1 and 7 in P2 are legitimate cities with distances d24 = 8 and d27 = 6. Since d27 < d24, city 7 is combined that generates the offspring as (1, 2, 7). Since 8 = Droute < Dmax = 60, continue to build offspring. After city 7, city 4 is in P2 with distances d74 = 10, but no city in P1. So, for P1, search from the starting and find legitimate city 4 with d74 = 10. Since both are same cities, city 4 is combined that generates the offspring as (1, 2, 7, 4). Since 18 = Droute < Dmax = 60, continue to build offspring. After city 4, cities 8 in P1 and 6 in P2 are legitimate cities with distances d48 = 11 and d46 = 9. Since d46 < d48, city 6 is combined that generates the offspring as (1, 2, 7, 4, 6). Since 27 = Droute < Dmax = 60, continue to build offspring. After city 6, cities 5 are in P1 with distances d65 = 11, but there is no city in P2. So, for P2, search from the starting and city 3 with d63 = 5 is found. Since d63 < d65, city 3 is combined that generates the offspring as (1, 2, 7, 4, 6, 3). Since 32 = Droute < Dmax = 60, continue to build offspring. After city 3, cities 5 in P1 and 8 in P2 are legitimate cities with distances d35 = 8 and d38 = 5. Since d38 < d35, city 8 is combined that generates the offspring as (1, 2, 7, 4, 6, 3, 8). This completes route for the first vehicle whose distance is 37. Continue to build route for the next vehicle as well as the offspring. After city 8, the un-visited city 5 is in both parents, with distance d85 = 8. So, city 5 is added that produces the offspring as (1, 2, 7, 4, 6, 3, 8, 5). Since 8 = Droute < Dmax = 60, continue to build offspring. However, this is the complete offspring chromosome, and so, we stop. The distance of the route of the 2nd vehicle is 19, and total distance of the offspring is 37 + 19 = 56 which is less than the distance of the parents. For this example, the SCX obtains an offspring that has value better than the values of both parent chromosomes. Figure 2(a) shows parent chromosomes (P1 and P2), Figure 2(b) shows the offspring chromosome (O), Figure 2(c) shows ADVRP routes of the offspring, and Figure 2(d) shows the graphical interpretation of the offspring chromosome. In general, the crossover operator that maintains better attributes of parents in their offspring(s) is supposed to be better crossover, and SCX is supposed to be better in this respect. In Figure 2(b), six boldface edges are from either parent chromosome.

This SCX obtains only one offspring chromosome. The parent chromosomes are chosen based on the predefined crossover probability. If the offspring has better fitness value than the parent, the first parent is substituted by the offspring in the new population.

4.4. Mutation Operator

To diversify the population, mutation operator is applied with a prespecified probability. Generally, mutation probability is set very low compared to crossover probability. The exchange mutation that chooses randomly two places in a chromosome and exchanges their values, if neither of them is dummy depot, is applied here. The exchange mutation is presented in Algorithm 4.

Input : A chromosome,.
Output: Muted chromosome.
Generate a random number .
if () then do
  Select randomly two different cities except dummy depots, supposecity α” and “city β” in the chromosome.
  “city α” ↔ “city β,” provided that they do not violate the distance constraint.
end if
Return the mutated chromosome

For example, let the chromosome: (1, 2, 7, 4, 6, 3, 8, 5) with distance 56 be allowed for the mutation, and the 5th and 8th positions with their values are swapped. Then, the muted chromosome will be muted: (1, 2, 7, 4, 5, 3, 8, 6) with distance of 1st and 2nd vehicles 33 and 19, respectively, and with total distance equal to 33 + 19 = 52 which is less than the distance of the original chromosome. Figure 3 shows this mutation process. However, we do not see whether the value of muted chromosome is better than the original chromosome, we only see whether the distance constraint is valid, and if it is not valid, then the mutated chromosome is not accepted.

4.5. Local Search Approach

Local search approaches are used to hybridize the simple GA that improve the solution quality and convergence level of the simple GA. In this study, the local search approaches based on swap, insertion, and inversion mutations are used. Swap search chooses two cities (genes) randomly and swaps them. Insertion search inserts a randomly chosen city into a position in a chromosome randomly. Inversion search inverts the sub-chromosome between two randomly chosen places in a chromosome. Let (α1, α2, α3, …, αn) be a chromosome, then we define these three mutations as local search techniques in our HGAs as follows.

4.5.1. Insertion Search

The insertion search is presented in Algorithm 5. Figure 4 shows the implementation of the insertion search approach.

Input: A chromosome.
Output: New chromosome.
fortodo
  fortod
    If inserting city αi after city αj reduces the distance of the chromosome and does not violate distance constraint, then insert the city αi after the city αj.
  end for
end for
Return the new chromosome
4.5.2. Inversion Search

The inversion search is presented in Algorithm 6. Figure 5 shows the implementation of the inversion search approach.

Input: A chromosome.
Output: New chromosome.
fortodo
fortodo
If inverting substring between the cities αi and αj reduces the distance of the chromosome and does not violate distance constraint, then invert the substring
end for
end for
Return the new chromosome
4.5.3. Swap Search

The swap search is presented in Algorithm 7. Figure 6 shows the implementation of the swap search approach.

Input: A chromosome.
Output: New chromosome.
fortodo
  fortodo
    If swapping cities αi and αj reduces the distance of the chromosome and does not violate distance constraint, then swap them
  end for
end for
Return the new chromosome

In the proposed local search technique, one of these three local searches is chosen for the first three HGAs. For the fourth HGA, we choose any of the above local search approaches randomly with a probability of 1/3.

4.6. Immigration Method

Although GAs are robust approaches, however, occasionally they get trapped in local optima. It might be caused by similar population, and so, the population should be diversified to escape from the local optima. The immigrant procedure increases population diversity by substituting some chromosomes of the current population with newly generated chromosomes every generation. We use the following immigration procedure. If there is no improvement of solution within last 10% generations of maximum predefined generations, then 10% of population is replaced by random chromosomes which is further improved by 2-opt local search approach.

4.7. The Algorithms

We propose one simple GA and four HGAs for the ADVRP. The GA begins with randomly generated initial population and goes repeatedly through roulette-wheel selection, sequential constructive crossover, and exchange mutation procedures to enhance the population gradually, until a predefined maximum number of generations is reached, hoping that a near-optimal solution is obtained. In addition to the operators in GA, one of the following local search approaches and above defined immigration approach are incorporated in the HGAs.GA-INS : GA + insertion search + immigration approach.GA-INV : GA + inversion search + immigration approach.GA-SWP : GA + swap search + immigration approach.GA-ADP : GA + adaptive search that randomly selects one of three local searches—insertion, inversion, and swap search + immigration approach.

The algorithm of the proposed HGAs is presented in Algorithm 8.

Input: n, MaxGen.
Output: BS and BT
G0 = Generate initial population using Algorithm 1
Evaluate ()
BS = Find the best solution in this population
while () do
  
  Gi = Population after selection using Algorithm 2
  fortodo
    Cj = offspring chromosome using crossover Algorithm 3
    Cj = mutated chromosome using mutation Algorithm 4
    Cj = improved chromosome using a local search Algorithm 5, 6, or 7
  end for
   = New population
  Evaluate ()
    = Find the best solution in this generation
  if () then
    
      = Best tour;
  else if () then
      Apply immigration
    end if
  end if
end while
Print BS and BT

5. Experimental Results

The proposed GA and HGAs are encoded in Visual C++ and run on a Laptop with i7-1065G7 [email protected] GHz and 8 GB RAM under MS Windows 10. The proposed GAs are executed for different parameter settings on some TSPLIB instances [26]. For setting parameters, ftv70 with 2 vehicles and infinite maximum distance constraint are used for the pilot runs. As the higher crossover probability can produce (hopefully) better solutions, we kept crossover probability fixed at 1.00 and run all algorithms for all combinations of Ps = 20, 30, 40, 50, 60, 70, 80, 90, and 100 and Pmut = 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.11, 0.12, 0.13, 0.14, and 0.15. We observed that for Ps = 50 and Pmut = 0.10, almost all algorithms could obtain better solutions; hence, these values are considered for the study. However, looking at the computational time and solution improvement in the successive generations, for termination condition, we considered 2000 generations for GA and 200 generations for HGAs. The parameter values are reported in Table 5.

We compare the performance of GA and four HGAs on asymmetric TSPLIB instances of various sizes with various numbers of vehicles.

In Figure 7, each GA is represented by a curve that indicates improvement of the solution in successive generations. The curve for simple GA shows that it starts the search process with the worst solutions compared to the HGAs at the initial stage. It shows variation in solutions within first 25 generations, and after that it shows no variation. So, it gets stuck in local minimum quickly and is found to be the worst one. Among HGAs, the curve for GA-INV shows that it starts the search process with the worst solutions at the initial stage, and shows variation in solutions within only first 10 generations. So, it gets stuck in local minimum very quickly and is found to be the worst one among HGAs. However, compared to simple GA, it is far better. The curve for GA-INS shows that it starts the search process with the best solutions compared to other HGAs at the initial stage and shows variation in solutions within first 30 generations. However, after 30 generations, it shows no variation. So, it gets stuck in local minimum quickly and is not the best one. The curves for GA-SWP and GA-ADP show that they start the search process with better solutions and are competing within first few generations. However, GA-SWP shows no variation in solutions after first 20 generations. The variation of solutions by GA-ADP continues up to 35 out of 50 generations, and it obtains best solution. So, GA-ADP is positioned in 1st position and GA-SWP is positioned in 2nd position.

We report relative studies among GA and HGAs on fifteen asymmetric TSPLIB instances of various sizes with 2 and 3 vehicles. Note that we suppose br17 with 2 vehicles is one instance and br17 with 3 vehicles is another instance. So, the total number of tested instances is thirty. The descriptions of the different column titles are as follows (Table 6).

Table 7 reports the results for 30 unrestricted ADVRP instances where . The formula for AI is as follows:where AS1 and AS2 are average solutions found by the GA and a HGA, respectively.

The results are evaluated based on average solution, and SD and average improvement (%) of the HGAs over simple GA. From Table 7, it is noticed that all algorithms could find best average solutions for the instance br17 with both 2 and 3 vehicles. The algorithms GA-INS, GA-INV, GA-SWP, and GA-ADP could obtain best average solutions for 6, 5, 10, and 18 instances, respectively. On average, GA-ADP, GA-SWP, GA-INS, and GA-INV have average improvement (%) as 7.75, 7.51, 7.13, and 5.08, respectively. It shows that the average improvement of GA-ADP is the largest, GA-SWP is the second largest, GA-INS is the third largest, and GA-INV shows the smallest average improvement. From these results, we can tell that GA-ADP is the best one, GA-SWP is the second best, GA-INS is the third best, and GA-INV is positioned in fourth position. Further, by looking at SD, we can say that results by GA-ADP are stable because its obtained solutions have lowest SD. Figure 8 shows the average improvements (%) that also signifies the appropriateness of the HGAs, especially GA-ADP and GA-SWP. Note that b17.2 means the instance br17 with 2 vehicles. So, for these asymmetric unrestricted instances GA-ADP is the best method and GA-SWP is the second best method. Regarding the computational time, almost all HGAs are taking same time. However, simple GA takes less time. We further can see in this table that a number of vehicles have significant effect on the solution; i.e., as the number of vehicles increases, solution also increases.

From the above outcomes on the asymmetric unrestricted instances, we can see that HGAs have showed very good enhancements in the solutions over GA, and GA-ADP and GA are the best and worst algorithms, respectively. To confirm whether average solutions obtained by GA-ADP are statistically and significantly distinct from the average solutions found by other HGAs, we conducted Student’s t-test applying the (14) below [27]. The t-test is utilized to measure not only improvement of an algorithm over another, but significant performance by the better algorithm.where is average of first sample, is standard deviation of first sample, is average of second sample, is standard deviation of second sample, is first sample size, and is second sample size.

Here, and are found by GA-ADP, and and are found by remaining HGAs. Table 8 reports t-statistic values, which can be positive or negative. As the problem is a minimization problem, positive value implies that GA-ADP found better solution than its rival HGA found, and negative value implies that the rival HGA found better solution than GA-ADP found. We applied 95% confidence level (t0.05 = 1.73), so if t-value is higher than 1.73, they have significant difference. So, if t-value is positive, then GA-ADP is significantly better; otherwise, its competitive HGA is better. If t-value is smaller than 1.73, then they have no statistical and significant differences. We further report the name of better algorithm.

The algorithms GA-ADP and GA-INS have no statistical and significant differences on thirteen instances. On the sixteen instances, GA-ADP is better than GA-INS, and only on ftv70.2, GA-INS is better than GA-ADP. On six instances, GA-ADP and GA-INV have no statistical and significant differences. On the remaining twenty-four instances, GA-ADP is better than GA-INV. On eighteen instances, GA-ADP and GA-SWP have no statistical and significant differences. On two instances—ftv70.2 and ftv170.2, GA-SWP is better than GA-ADP, and on the other ten instances, GA-ADP is better than GA-SWP. From these experimental results, we can tell that GA-ADP is statistically significant and is the best among the HGAs for unrestricted ADVRP instances.

Further, we conducted t-test to check whether average solutions obtained by GA-SWP are statistically and significantly distinct from the average solutions found by GA-INS. We saw (not reported here) that for 25 instances there is no statistical difference between them, and for 5 instances, GA-SWP is better than GA-INS. So, GA-SWP is the second best.

Table 9 reports the results for restricted ADVRP instances where Dmax = 0.9Max1 is used to find Max2. From this table, it is seen that the GA could find best average solutions for the instance br17 with both 2 and 3 vehicles. The algorithms GA-INS, GA-INV, GA-SWP, and GA-ADP could find best average solutions for 4, 2, 6, and 22 instances, respectively. On average, GA-ADP, GA-SWP, GA-INS, and GA-INV have average improvement (%) as 10.97, 9.97, 9.72, and 6.59, respectively. It shows that the average improvement of GA-ADP is the largest, GA-SWP is the second largest, GA-INS is the third largest, and GA-INV shows the smallest average improvement. From these results, we can tell that GA-ADP is the best one, GA-SWP is the second best, GA-INS is the third best, and GA-INV is positioned in fourth position. Further, by looking at SD, we can say that results by GA-ADP are stable because its obtained solutions have lower SD. It is to be noted that no algorithm could solve the instance p43 with both 2 and 3 vehicles, so their results are not stated in Table 9. Figure 9 shows the average improvements (%) that also signifies the appropriateness of the HGAs, especially GA-ADP and GA-SWP. So, for these restricted ADVRP instances GA-ADP is the best algorithm and GA-SWP is the second best algorithm. Regarding the computational time, almost all HGAs are taking same time. However, simple GA takes less time. We further can see in this table that a number of vehicles have significant effect on the solution; i.e., almost for all instances, as the number of vehicles increases, solution also increases.

We see from the experiment that HGAs have fantastic improvements in the solution over GA for the restricted ADVRP instances. Among the algorithms, GA-ADP is the best and GA is the worst. To confirm whether average solutions obtained by GA-ADP are statistically and significantly distinct from the average solutions found by other HGAs, Student’s t-test is performed, and the results are shown in Table 10. There is no statistical and significant difference between GA-INS and GA-ADP on twelve instances. On the remaining sixteen instances, GA-ADP is better than GA-INS. There is no statistical and significant difference between GA-INV and GA-ADP on five instances. On the remaining twenty-three instances, GA-ADP is better than GA-INV. There is no statistical and significant difference between GA-SWP and GA-ADP on ten instances. On the seventeen instances, GA-ADP is better than GA-SWP. On only the instance ftv38 with 3 vehicles, GA-SWP is better than GA-ADP. From this experiment, we can say that GA-ADP is statistically significant and is the best among the HGAs for the restricted ADVRP instances also.

Further, we conducted t-test to check whether average solutions obtained by GA-SWP are statistically and significantly distinct from the average solutions found by GA-INS. We saw (not reported here) that for 20 instances there is no statistical difference between them, for 3 instances GA-INS is better than GA-SWP, and for 5 instances GA-SWP is better than GA-INS. So, GA-SWP is the second best and GA-INS is the third best one.

We further report the results in Table 11 for restricted ADVRP instances where Dmax = 0.9Max2 is used to find Max3. It is seen that no algorithm could solve the instances p43, ft53, and ftv170 with both 2 and 3 vehicles; ftv35, ftv38, ftv44, ftv47, ftv55, ft70, and kro124p with 2 vehicles; and br17 with 3 vehicles. It seems that these problem instances are more complex. So, we did not report them, and we reported the results on 17 instances only.

Among the reported instances, GA could not solve kro124p with 2 vehicles; GA-INV could not solve ftv38 with 3 vehicles, and ftv64 and kro124p with 2 vehicles; however, the algorithms GA-INS, GA-SWP, and GA-ADP could solve these instances. It is noticed that the GA could find best average solutions for the instance br17 with 2 vehicles only. The algorithms GA-INS, GA-INV, GA-SWP, and GA-ADP could find best average solutions for 2, 1, 5, and 12 instances, respectively.

On average, GA-ADP, GA-INS, GA-SWP, and GA-INV have average improvement (%) as 10.77, 9.90, 8.98, and 6.17, respectively. It shows that the average improvement of GA-ADP is the largest, GA-INS is the second largest, GA-SWP is the third largest, and GA-INV shows the smallest average improvement. From these results, we can tell that for these restricted ADVRP instances GA-ADP is the best one, GA-INS is the second best, GA-SWP is the third best, and GA-INV is positioned in fourth position. Further, by looking at SD, we can say that results by GA-ADP are stable because its obtained solutions have lowest SD.

We further can see in this table that a number of vehicles have significant effect on the solution; i.e., almost for all instances, as the number of vehicles increases, solution also increases. It is also observed that as the distance-constrained becomes tight finding feasible solution becomes difficult. Regarding the computational time, almost all HGAs are taking same time. However, simple GA takes less time.

To prove whether average solutions found by GA-ADP are statistically and significantly different from the average solutions found by remaining HGAs, we conducted Student’s t-test and reported the results in Table 12. There is no statistical and significant difference between GA-INS and GA-ADP on five instances. On one instance, GA-INS is better, and on the other ten instances GA-ADP is better. There is no statistical and significant difference between GA-INV and GA-ADP on four instances. On the remaining twelve instances, GA-ADP is better. There is no statistical and significant difference between GA-SWP and GA-ADP on three instances, on one instance GA-SWP is better, and on the other twelve instances GA-ADP is better. From this experiment, we can say that GA-ADP is the best for the restricted ADVRP instances also. However, GA-INS and GA-SWP are still competing for 2nd rank. We further perform Student’s t-test between GA-SWP and GA-INS but found them equivalent. From all above experiments, we can assume that GA-ADP is the best, GA-SWP and GA-INS are the second best, and GA is the worst.

We further report a performance comparison of GA-ADP against HVT algorithm [9] on some asymmetric CVRP (ACVRP) instances [28] of sizes from 34 to 71. As in [9], we run each instance 10 times. Further, we increase in the maximum generations to 250 generations for each run. The results are reported in Table 13. The percentage of gap (Gap) is calculated by

Looking at the best solutions, HVT could not find optimal solution for the A065-03f, whereas our proposed GA-ADP could find optimal solutions of all instances at least once in ten runs. So, in terms of best solution, our proposed algorithm GA-ADP is better than HVT. Looking at the average solutions, for the first four instances, both algorithms could obtain same average solutions, for the remaining three instances—A048-03f, A065-03f, and A071-03f, our GA-ADP is better than HVT, whereas only for the instance A056-03f, HVT is better than GA-ADP. Overall, our proposed algorithm GA-ADP is better than HVT. Regarding the computational time, HVT was executed on Intel Pentium core i7 duo 2.10 GHz CPU with 8 GB RAM, whereas our algorithm is executed on Intel Pentium core i7 1.30 GHz CPU with 8 GB RAM. It shows that their machine is faster than our machine. Looking at the computer specifications of both machines and computational times, one can say that our computational time is comparable with that of HVT. Overall, looking at the solution quality and computational time, our suggested GA-ADP is found to be better than HVT.

A real-life application of the ADVRP may be the sales representative who visits customers without pick up or delivery constraints but with distance constraints. This study uses three local search methods to develop three separate HGAs and adaptive search that randomly selects one of three local search methods to develop fourth HGA to solve the ADVRP. The fourth HGA, i.e., GA-ADP, provides cost-effective optimal solution to the problem. The proposed GA-ADP provides a cost-effective optimal routing plan to the sales representative. It is observed that as the number of vehicles increases solution value also increases, so removal of a vehicle from the fleet can reduce the workers. Hence, this gives managerial interpretation for the optimal fleet sizing and route designing.

6. Conclusion and Future Works

This paper developed a simple GA and four hybrid HGAs for solving the asymmetric distance-constrained vehicle routing problem (ADVRP). The proposed GA used random initial population followed by sequential constructive crossover and swap mutation. The HGAs improved the initial solution using 2-opt search method and incorporated local search techniques along with an immigration procedure to find better solution to this problem. Experimental study has been carried out among the proposed GA and HGAs, by solving some TSPLIB asymmetric instances of various sizes.

Three sets of experiments were performed on asymmetric TSPLIB instances. The first experiment was unrestricted ADVRP that used a very big predefined maximum distance for every vehicle, in the 2nd experiment, the predefined maximum distance was restricted by multiplying 0.9 to the maximum distance obtained in the 1st experiment, and the third experiment used the maximum distance as 0.9 multiple of maximum distance obtained in 2nd experiment. Our computational experience reveals that the suggested HGAs are very good. From the experiments, we found that HGA using adaptive search is the best, and HGA using swap search is the second best for the restricted and unrestricted ADVRP instances. We further performed Student’s t-test and confirmed our claim. However, since no research reported the exact solutions for the instances, hence, we could not claim how good our obtained solutions are. So, one can verify the optimality of our best solutions, which is also under our next investigation. However, it is observed that as the distance-constrained becomes tight finding feasible solution becomes difficult. Finally, we reported a comparative study between our GA-ADP and a state-of-the-art algorithm on asymmetric capacitated VRP and found that our algorithm is better than the state-of-the-art algorithm for the instances.

Though the proposed HGAs found very effective solutions with small differences among average solutions, we acknowledge that still there is possibility to enhance the solutions by merging better local search approaches and/or heuristic procedures and perturbation technique to the algorithms which will be our investigation. Also, proposing a new metaheuristic procedure for solving many other instances effectively could be very interesting for the researchers.

Data Availability

The data set used to support the findings of this study is available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no potential conflicts of interest.

Acknowledgments

The authors extend their appreciation to the Deanship of Scientific Research at Imam Mohammad Ibn Saud Islamic University for funding this work through research group no. RG-21-09-17.