Evolutionary Algorithms Based on Electric Vehicles (3rd Ranked Genetic Algorithm in 2020)

Summary

        Over the years, there have been many variations of vehicle routing problems created to suit the real needs of society, one of which is the Electric Vehicle Routing Problem (EVRP). Compared with traditional vehicle routing problems, EVRP is a more complex and challenging combinatorial optimization problem. This paper considers a specific model of the tram routing problem and proposes a greedy search algorithm GS inspired by clustering. The purpose of the GS algorithm is to cluster charging routes and greedily search charging stations to obtain the best route output. In this article, we deliberately implement GS in the metaheuristic genetic algorithm GA, and use GA to find the global optimal, thus forming the expression of the GSGA algorithm. To evaluate performance, we use a benchmark dataset from the CEC-12 competition on the CEC-12 tram routing problem at the 2020 World Conference on Computational Intelligence (WCCI). Experiments evaluate the effectiveness of GS when applied to other algorithms such as genetic algorithms and simulated annealing. Experimental results show that our proposed algorithm has better solution quality than previous algorithms.

introduction

        Recently, the use of electric vehicles (EVs) has become even more critical for transportation companies because they are low-cost, low-energy-consuming, environmentally friendly, and help reduce CO2 emissions. Electric vehicles have rechargeable batteries, but due to the limited number of charging stations, some problems may occur, such as insufficient energy and insufficient battery power. The need to manage EV battery power increases the complexity and difficulty of the EV path planning problem.

        Among some recent studies on the EV fleet routing problem, M.Mavrovouniotis et al. [1] proposed the Electric Vehicle Routing Problem (EVRP) for battery electric vehicles. He also presented a benchmark set to evaluate the effectiveness of the proposed algorithm. The objective function of EVRP is to find a set of routes that minimize the total travel distance. The author has proved that EVRP is an NP-hard combinatorial optimization problem.

        As a challenging NP-hard problem, EVRP with a large number of customers is considered complex and challenging. However, this problem can be effectively solved by metaheuristic algorithms. Genetic algorithm is one of the most popular metaheuristic algorithms widely studied in the scientific community [2, 3]. Genetic algorithms are inspired by the processes of natural selection and genetics [4] and start with a group of individuals undergoing reproduction and mutation to produce offspring. When predetermined conditions are met, process execution is repeated and terminated. Due to its powerful and easy-to-use search capabilities, genetic algorithms have achieved remarkable success over the past few decades in obtaining optimal or near-optimal solutions to a large number of complex real-world optimization problems, including combinatorial optimization, continuous optimization and constrained optimization. Therefore, we propose a metaheuristic algorithm inspired by hybrid greedy search properties [5], namely the greedy search-based genetic algorithm (GSGA) to solve EVRP.

The main contributions of this work are described below.

We propose a new greedy search algorithm GS for this problem, which is based on nearest neighbor clustering method, balancing method and local search method to achieve a reasonable solution.

A genetic algorithm GSGA is proposed to implement the proposed greedy search algorithm to effectively solve the EVRP problem. A novel encoding and decoding method is specifically designed for this problem. Additionally, new initialization, hybridization, and mutation operators are proposed.

Experiments are conducted under different scenarios to demonstrate the effectiveness of the proposed greedy search method for existing charging path optimization algorithms, and the effectiveness of the greedy search-inspired genetic algorithm for solving EVRP.

        The remainder of this article is organized as follows. Section 2 introduces related work on EVRP, and Section 3 describes the problem statement and formulation. Sections 4 and 5 elaborate on the proposed greedy search algorithm (GS) and the proposed genetic algorithm (GSGA) respectively. Section 6 provides computational experiments and results. Conclusions and future extensions of this study are given in this section.


Related work

        The demand for electric vehicles is increasing, so the issue is changing variants and different constraints. A major disadvantage of electric vehicles is their limited battery capacity; therefore, they require access to charging stations to recharge their batteries. Therefore, finding the optimal route plan for electric vehicles, i.e., EVRP, has attracted special attention from many researchers and experts. In recent years, many related works have been conducted on EVRP. In [6], the problem is introduced and formulated mathematically. The purpose of this problem is to minimize the energy consumption of electric vehicles. In addition, the authors applied a metaheuristic algorithm based on the ant colony algorithm to solve EVRP. In [7], Montoya et al. proposed a hybrid metaheuristic approach that combines simple components from the literature with components specifically designed for this problem. To assess the importance of the nonlinear charging function, they performed a computational study comparing our assumptions with those commonly found in the literature. Erdelic et al. review state-of-the-art exact, heuristic and hybrid procedures for solving various EVRP variants [8]. In [9], the authors proposed a heuristic approach to solve the green vehicle routing problem with multiple technologies and partial charging.

        In [10], Afroditi et al. proposed a mathematical model inspired by the known VRPTW. In order to solve the Afroditi model, an adaptive large neighborhood search (ALNS) algorithm enhanced with fuzzy simulation method was proposed [11]. In the proposed ALNS algorithm, four new removal algorithms are designed and integrated to solve the FEVRPTW problem. In [12], Yang et al. proposed an electric vehicle battery swap station location routing problem called BSS-EVLRP. The goal of this problem is to determine battery swap station (BSS) location strategies and route planning for electric vehicle fleets under conditions of limited battery range. In addition, the author also proposes two methods to solve the problem. The first proposed method is a four-stage heuristic called SIGALNS, in which the BSS localization stage and vehicle routing stage iteratively alternate. The second method is the two-stage tabu search of the modified Clarke and Wright Savings heuristic (TS-MCWS). Compared with CPLEX's MIP solver, these proposed algorithms can effectively find good solutions without excessive computation in medium and large-scale instances. Abdallah et al. used Lagrangian relaxation to solve this problem and proposed a new Tabu search algorithm [13]. They also present the first results on fully adapted Solomon instances. In research [14], the authors pointed out the importance of the CVRP problem in practice and proposed a method based on a combination of ant colony algorithm and simulated annealing algorithm, called SACO. The SACO algorithm is compared with the ant colony algorithm based method and shows better results than the baseline method. However, one limitation of the proposed algorithm is the relatively long execution time, especially when the problem size is huge.

A similar problem to ours was studied in [15, 16], but the model formulation and optimization objectives are different. In [16], the authors proposed the first EVRP model that considers the impact of vehicle load on battery consumption to find the optimal routing strategy that minimizes travel time cost, energy cost and the number of scheduled EVs. In [15], an EVRP model with charging demand, energy consumption, range constraints, and vehicle capacity constraints was proposed. The model optimizes the objective [15], which is the minimum total cost, including fixed vehicle cost, travel cost and charging cost.

        In summary, with the introduction of related research, many variants of the VRP problem have been proposed, including EVRP with multiple models and proposed methods to solve the model. In this paper, we propose a greedy search algorithm and a genetic algorithm to persuasively solve the EVRP problem introduced in [].

3 Electric vehicle routing issues

3.1 Problem statement

The problem is represented by a fully connected weighted graph G = (V , E), where V ={ C, O, S } is a set of nodes, E ={ (i, j ), ∀i, j ∈V,i = j } Corresponds to all possible arcs connecting the vertices of V. The set C={c 1,c 2,...,cnc} is a set of customer points, O is the center point. Each arc (i, j) has a non-negative Euclidean distance d ij between nodes i and j. related.

        The charging rules are defined as follows: The EV's battery is fully charged every time the EV starts its route at the warehouse or visits a charging station. During the routing process, electric vehicles can be charged one or more times at any charging station in S.

The purpose of EVRP is to find a set of routes that minimize the total driving distance, and the following conditions or constraints must be met:

Every electric car is the same , and every route starts and ends at the warehouse .

In a given policy, each charging station may be visited multiple times or not visited by any electric vehicle.

Each customer of the consumer is visited exactly once by an electric vehicle .

- For each electric vehicle route, the total energy consumption does not exceed the maximum battery charge level Q max of the electric vehicle.

- For each electric vehicle route, the total customer demand does not exceed the maximum carrying capacity of the electric vehicle Pmax.

Consider a feasible solution for EVRP p = (R 1,R 2,...,R l). The target structure of EVRP is as follows. where R t = (0,π 1,π 2,...,π k,0) is a path of EV t, where EVt starts from the warehouse and visits the customer. After charging at the charging station, it returns to the warehouse; d ij is the Euclidean distance between nodes i and j, if there is an arc connecting i and j, x ij = 1, otherwise orx ij = 0. The figure shows a simple EVRP example consisting of five customers c 1, c 2, c 3, c 4, c 5, a charging station s 1 and a central warehouse O. 1a and b.

In Figure 1a, a strategy is given that does not visit any charging stations and uses two electric vehicles. The first electric vehicle on route 1 leaves warehouse O to visit three customers c 1, c 2, c 3 and then returns to the warehouse. Similarly, the second electric vehicle on route 2 leaves the warehouse to visit 2 customers c 4 and c 5 and then returns to the warehouse. In the example in Figure 1, p1 =(R 1,R 2), R 1=(O,c 1,c 2,c 3,O), R 2 =(O,c 4,c 5,O) . Figure 1b depicts a better strategy that involves visiting a charging station and using an electric vehicle (a route). The electric vehicle leaves warehouse O to visit 3 customers c 1, c 2 and c 3, and then visits charging station s 1 to fully charge its battery. After charging at s 1, the electric vehicle visits customers c 4 and c 5 before returning to the warehouse. In this example, p2=(R 1), R 1=(O,c 1,c 2,c 3,s 1,c 4,c 5,O).

 3.2 Raising the question

        EVRP attempts to find a set of electric vehicle routes where each electric vehicle visits each customer once and only once so that the total distance is minimized. The notation of the EVRP problem is given in Table 1. In addition, the mathematical expression of EVRP in [1] is also expressed as follows. Equation 2 guarantees that each customer is visited exactly once by an electric vehicle; (3) ensures that each electric vehicle is homogeneous and that each route starts and ends at the warehouse; (4) means that in the given strategy, each electric vehicle A charging station may be visited multiple times or may not be visited by any electric vehicle. Equation 5 establishes traffic protection by ensuring that at each node, the number of incoming arcs equals the number of outgoing arcs. Equations (6) and (7) ensure that all customer demands are met by guaranteeing a non-negative carrying load upon arrival at any node including warehouses, (8), (9) and (10) ensure that the battery charge never Below 0, (11) defines a set of binary decision variables, each equal to 1 if there is arc travel and 0 otherwise.

        Figure 2 is an example of a solution, where the red circle is warehouse 0, the green circle is the customers (from customer 1 to customer 9), and the blue circles are charging stations 10 and 11. The number on each side is the distance between the customer and the customer or the customer and the charging station, and the red font-sized number in the green circle is the remaining electric vehicle carrying capacity of the corresponding customer. This solution consists of three different routes. R 1 = (0,7,5,10,2,4,0), R 2 = (0,9,11,8,6,0), and R 3 = (0,3,1,0). In the first route, the route length is calculated as: . 4 + 8 + 7 + 4 + 4 + 6 = 33. In a similar way, the second one is 22 and the third one is 11. In this case, we assume that the solution is valid, meaning that all constraints (capacity and battery) are satisfied. Therefore, the numerical fitness of the solution is 66 (=33+22+11), which is the total length of the three routes. In the other case, if the solution is invalid, i.e. there is an unsatisfied constraint, then the fitness of the solution is set to a positive fitness.

 4 Greedy search algorithm

        In this section, we propose a greedy algorithm (GS) to solve the EVRP problem in Section 5 and then combine this algorithm with a genetic algorithm (GSGA). GS's process is divided into two main stages, starting with clustering and ranking customers into sub-routes and ending with finding the best set of charging stations for each route for each vehicle. The clustering strategy has three steps, and each obtained cluster corresponds to each vehicle. Here, the merit function does not mention the optimal number of cars. However, the number of clusters also significantly affects the total length of all routes. In most cases, using a small number of vehicles will result in better performance than splitting a customer's merchandise into too many vehicles. To do this, we used a greedy clustering approach, which resulted in a significant reduction in the number of vehicles required.

4.1 Clustering methods

        We implement the nearest neighbor method for clustering so that the cluster centers are evenly distributed while not exceeding the maximum carrying capacity of Ev Pmax. The implementation steps are as follows.

1. Randomly select a customer as the seed point of the cluster.

2. Add the nearest customers to the cluster until the maximum capacity is reached without exceeding the maximum carrying capacity of the electric vehicle P max.

3. Repeat this process until all customers belong to one of the routes.

Clients, in order, tend to be close together and the total capacity of each cluster will be close to the maximum capacity. As a result, the number of vehicles is greatly reduced, and the locations of customers on each route transporting goods are not too far apart.

4.2 Balancing approach

        For the previous step of clustering, the customers assigned on the last route are non-clustered customers. They are residual customers, so they are not geographically close. Additionally, the number of customers on this route will be less than other routes, even one customer. In order to ensure the distance between customers and increase the number of customers, we adopt a balanced approach. The specific steps are as follows.

1. Randomly select a customer (Customer A) from the last route.

2. Select the customers on the route closest to A from other routes in turn.

3. The selected customers must meet the following two conditions:

(a) The initial sum of the total capacity of the last route and the capacity of the selected customers does not exceed the maximum carrying capacity P max of the electric vehicle.

  (b) The total capacity difference (delta) is smaller than before: considering two routes R i and R j (A∈R i, B∈R j), delta= |∑ x∈R ibx−∑ y∈R jby|, Among them, bx, by are the needs of customers x and y respectively.

4. Repeat until the above conditions are not met.

4.3 Local search/partial search 2-opt

After dividing customers into different clusters, the local search algorithm will rearrange them so that they have no intersecting paths. The details of local search are described in Algorithm 1.

Generally speaking, this approach will provide some benefits for solving EVRP problems, such as:

The total capacity of electric vehicles on a route does not exceed the maximum carrying capacity P max of electric vehicles. Therefore, this approach ensures a solution that is valid for capacity constraints.

Each solution performed by local search has an advantage in total distance, since customers on the same route are likely to be near each other.

 for example:

If we have 5 cities {0, 1, 2, 3, 4, 5}, the initial route is

0-1-2-3-4-5-0. We traverse through two pointers i and k each pointing to a city. Each time it traverses, we will try to do a 2optSwap (hereinafter referred to as reverse) for the current **(i,k) to ** to reverse the route between ik.

This operation will be repeated until we cannot find a shorter path, and we have found the local optimal solution, which is the final result.

For example, we traverse to i=1, k=3. We perform a reverse on this (i,k) pair and get a new route: 0-3-2-1-4-5-0. If the new route can be shorter than the previous route, we note the current i and k, and the distance that can be shortened after reverse. Then we continue to traverse, and finally select the shortest result to reverse.
 

4.4 Find charging stations for search routes

        After determining the route, vehicles will deliver cargo sequentially in sorted order, but ensuring energy constraints is a more complex problem. In many cases, despite a predetermined route, it may not be possible to find a set of charging stations capable of serving all customers of the vehicle. To ensure that each charging station has enough energy for travel, we use a greedy strategy combined with a shortest path algorithm to find an optimal set of charging stations among the satisfactory set of charging stations. In fact, moving between two locations requires a charging station. However, to generalize to all cases, we found a set of charging stations between the two locations instead of using just one. The detailed method is given in Algorithm 2. For each route, the procedure is as follows:

1. For each vehicle transfer in a predetermined sequence, if the energy required from customer ci to customer ci +1 is not enough to move, it will go to a charging station (not necessarily the only one) to charge. The goal is to maximize the remaining energy when the vehicle reaches ci +1. Let ec be the energy of the electric vehicle at ci. S′ = {s 1, s 2, ..., sk} is the set of charging stations such that sk is closest to ci + 1 and the energy consumption from ci to s 1 is less than ec. If the vehicle cannot find such a set of charging stations, it will go back to find a charging station from customer ci − 1 to ci. Repeat this process until it finds a satisfactory charging station or returns to the warehouse.

2. For any customer ci, we can show that the number of times to find a set of charging stations from ci to c i+1 is no more than twice, since after finding the previous one of them, in any case the energy on arrival at ci is is the largest . If we return to the parking lot, we won't be able to plug in a charging station to get a satisfactory route and return fitness = +∞.

        After being plugged into a charging station as described above, the vehicle's remaining energy is greatest when it moves from the charging station to the next customer on its route. However, in terms of distance costs, this set of charging stations is not great. Therefore, we will use one more stage to find another stage with a shorter path cost. We can prove that the proposed algorithm will give optimal results if all considered sets have the same number of charging stations in a route. Assume that two different sets S and S′ are explored k times for charging stations along the way, where S′ using the proposed algorithm will obtain better results than S, at least equal. The following steps describe the process of finding a set of charging stations:

        1. First, consider the route R = {O,c 1,c 2,...,ci −1,S′, ci,...,cr,O}, where R- serves as the route in reverse order. According to the prearranged order R, ci is the right head of a customer contact set S′, and let T be the set of customers cj in front of ci. If the vehicles are transferred in reverse order R-, the energy from depot to cj is sufficient but no site is visited (*).

        An example is illustrated in Figure 3, where group T includes Customer 8, Customer 9, Customer 2 and Customer 4. Customer 5 is not included because it does not have enough energy to row R- ={0 → 6 → 8 → 9 → 2 → 4 → 5 → 7 → 0} in the reverse order.

 2. Let S-={sk,sk −1,...,s 1} be the set of charging stations found from T j to T j+1 that meet the following conditions:

(a) In R, the electric car has enough energy to travel from the warehouse to s 1.

(b) In R-, the electric car has enough energy to travel from the warehouse to sk.

(c) The distance from T j to T j +1 has the smallest distance through S-.

In Figure 3, the trip length through the charging station set S- is smaller than before. After re-optimizing the process using Djkstra's algorithm, the route is {0 → 6 → 8 → 9 → 12 → 4 → 5 → 7 → 0}.

As mentioned above, we can prove that if the charging station set S′ is replaced by the charging station set S-, condition (*) is also satisfied

 Proof Let delta 0 be the distance from T 1 to T 2 through S′, and delta i be the distance from T i to T i +1 through S. If delta i is less than delta 0, we will replace S′ of T 1 → T 2 with a new set of charging stations S → from T i → T i +1. If delta i is the smallest, it is considered to be the best charging station set among the satisfying charging station sets. For each scheduled EV route, the best set of charging stations will provide the vehicle with enough energy to visit all customers and return to the depot with the smallest travel distance. The explanation is as follows.

For two routes: (O l,..,T k,T k−1,…,T j+1,T j,…,T2,S′,T1,…O r) (1) and (O l ,T k,T k−1,…,T j+1,S′-,T j,..,T2,T 1,…O r) (2) (as shown in Figure 4). let us think about it

 5 Evolutionary Algorithms

        In this section, a genetic algorithm combined with the proposed greedy search algorithm, called GSGA, is introduced in detail. The process of GSGA is described in Figure 5. The algorithm includes the basic steps of traditional genetic algorithms: individual representation, initialization and reproduction. However, the novelty of implementing the proposed greedy search strategy in GA is clarified in the new two-level representation method, greedy initialization method, new mixing and mutation operators. Details are presented in the subsections below.

5.1 Characterization

        An important step in designing a genetic algorithm is to find a suitable representation of chromosomes. One solution to this EVRP problem involves tram routes where electric vehicles depart from depots to visit customers, possibly passing through intermediate charging stations. A reasonable solution therefore represents the need for information about customers, charging stations and warehouses . This paper proposes a representation of the solution, including new encoding and decoding methods, which are described in detail in the following subsections.

5.1.1 Encoding

        In the proposed encoding method, the initial representation of the solution only needs to represent the customer's information and the sequence of routes the customer is visiting. Therefore, the encoding for an individual is an array of fixed-size integers nc, where nc is the total number of customers in the problem. The value of each element corresponds to the customer node. The order of the element values ​​in the array is the order of access by clients in the solution.

        Assume that a given EVRP model solution starts from a warehouse and needs to visit nine customers and pass through some intermediate charging stations. Figure 6 details the decoding method in this case. Figure 6a illustrates the above solution, including three routes: Route 1: 0→7→5→10→2→9→0, Route 2: 0→4→11→8→6→0, Route 3: 0→ 3→1→0. Therefore, according to the proposed encoding method, the corresponding representation method is shown in Figure 6b.

 

5.1.2 Decoding

        Based on the above solution encoding, a simple decoding method to obtain the corresponding solution is to insert a possible charging station into each existing route. Therefore, the strategy of finding a set of charging stations proposed in Section 4.4 is applied to construct a complete path, including the sequence of visiting customers and charging stations. This strategy for finding charging stations in Section 4.4 will ensure that the set of charging stations is optimal on every existing route.

5.2 Initialization

        According to the proposed encoding, an individual is represented by a permuted array of nc elements, where nc is the number of customers. Note that a single encoding only requires information about the customer and the sequence of routes to access that customer. Therefore, we use the proposed greedy strategy, including steps 4.1, 4.2 and 4.3 in Section 4, to initialize individuals.

        This greedy initialization method is expected to be more efficient than random initialization methods. Furthermore, this approach always generates a valid individual for the capacity constraints since it applies the local search introduced in Section 4.3. This will be demonstrated in the experimental results section.

 5.3 Crossover operator

        This paper proposes a new hybrid approach in GSGA. This method uses a distance heuristic and is suitable for multi-vehicle problems. Details of the proposed crossover method are shown in Algorithm 3. An example of the proposed crossover operator consists of four steps, described below.

Step 1: As shown in Figure 7., randomly select a customer (Customer 2) from the parent individual.

Step 2: Child 1 is a set of customers on the route that contains customer 2 of parent 1. Child 2 is a group of customers on the route that includes customer 2 of parent 2, as shown in Figure 8.

 

Step 3: Customers that do not belong to Child 1 and Child 2 will inherit from the parent to the children respectively maintaining relative order.

5 8 4 1 7

4 8 7 1 5

Step 4: Customers in sub1 and sub2 will be divided into children that meet the following rules: insert sub2 and sub1 in series (6, 9, 2, 3) into the first one, and in turn sub1 (3, 2) and in turn sub2(9,6) is inserted into the second one. As shown in Figure 9.

         The proposed crossover operator is very similar to two-point hybridization. However, we still use a heuristic approach to select a random seed point to exchange chromosomes in two different sub-routes belonging to two independent parents. When swapping the chromosomes of these two sub-routes, we find that the crossover operator only switches the positions of adjacent customers of different sub-routes through the two sub-routes close to the previously selected seed point. Therefore, this will minimize the number of customers on the route away from other customers. However, this algorithm always ensures a large number of new features.

5.4 Mutation operator

        The purpose of mutation is to introduce new genetic material into existing individuals to increase diversity in the genetic characteristics of the population. Here, we propose two types of mutation operators, each with a mutation probability.

1. Heuristic swapping mutation (HSM). Select a random customer ci and exchange its position with customer cj on a different route, which is the shortest distance from customer ci.

2. Heuristic Movement Mutation (HMM): Select a random customer ci, find customer cj from different routes with the shortest distance from customer ci, and insert customer cj into the route containing customer ci.

An example of the HSM method is shown in Figure 10. In this example, a random customer is selected (Customer 4), and the closest customer to the other routes is Customer 9. Then, two clients, 4 and 9, were swapped.

Figure 11 describes the HMM method, which randomly selects a customer (Customer 11), finds the nearest customer from a different route (Customer 2), and inserts it into the route containing Customer 11.

 

        The proposed mutation operator uses a heuristic similar to the proposed crossover operator. We can see that mutation operators have considerable impact on redistributing pathways and changing genetic anomalies. In the heuristic exchange mutation operator, the exchange positions of two points close to each other will be valid for two crossing routes. At the same time, the heuristic move mutation operator will be effective when an outlier needs to move through another route. The described mutation operator may produce solutions that violate the maximum load, which we mark as invalid individuals and return a fitness of positive infinity. To clearly evaluate its effectiveness, we present the experimental results in Section 6. In summary, for many different routing problems, the use of mutation operators may be proposed, and EVRP is one of them.

5.5 Select method

        Natural selection is an important step in evolutionary theory. Individuals struggle to survive in the wild, and only the fittest survive. In this selection method, we select the best individuals through the wheel selection method. The details of this method are described in Algorithm 4. This approach ensures that individuals with good fitness will have a high probability of selection and vice versa. Specifically, the globally best individuals are added to the new population to maintain the existing best traits.

6 Experimental results and performance evaluation

6.1 Problem benchmark data set The EVRP benchmark set consists of two sets of questions:

1. Group 1: consists of 7 small problem instances (up to 100 customers), for which the optimal upper bound is provided in [1].

2. Group 2: consists of 10 larger problem instances (up to 1000 customers), for which no upper limit value for them is provided.

The first set of EVRP examples was generated by extending the well-known example of the traditional vehicle routing problem of Christofides and Eilon [17].

The second group is an extension of the recent example of the traditional vehicle routing problem by Uchoa et al. [18].

6.2 Experimental setup

        To evaluate the performance of GSGA in EVRP, we implemented the proposed algorithm on Windows 10 with 8.0GB memory, 2.2GHz CPU, a population size of 200 individuals, and a mutation rate of 0.1. The maximum number of evaluations is 25000n, where n = |C|+1 +|S| is the size of the problem instance. Our source code is written in C++ language.

        In this study, we tried to set parameters for different ranges to find the best results. The fixed POP SIZE parameter is equal to 200 individuals , but does not work well in large cases because the population is not diverse enough to obtain a good local optimal solution. However, it is good for averages and small problem sizes. In addition, the mutation rate also significantly affects the performance, so we conduct experiments with different parameters (from 0.025 to 0.1) to choose the best parameters. The crossover rate that gives the best experimental results is 0.9. The smaller the crossover rate, the worse the results. Details are listed in Table 2.

 

6.3 Experimental standards

        The effectiveness of the proposed algorithm is evaluated based on several criteria: overall convergence speed, best results, worst results, average results, execution time and stability . Details of the standards are shown in Table 3.

6.4 Experimental results

6.4.1 Analysis of Greedy Search Algorithm

        To evaluate the effectiveness of the proposed greedy search algorithm, the given upper bound on all instances belonging to Group 1 (small) dataset is compared with the average target value found by the greedy search algorithm across all runs. It is worth noting that we calculated a value called the approximation ratio, which is given by the following formula:

 In the formula, UB i and GSA i are the lower bound value provided by the proposed greedy search algorithm for i instances and the average target value found. This approximate ratio is the ratio between the results obtained by the proposed greedy search algorithm and the given lower bound value. In this article, the closer the approximation ratio is to 1, the better the result.

6.4.2 Algorithm analysis of greedy Seach implementation

        In this study, the number of runs was set to 20 (with a random seed of 1-20). According to the execution schedule, as shown in Figure 12, the execution time depends on the number of customers, charging stations, and routes. In the X-n1001-k43 instance, the execution time of GSGA is smaller than that of the X-n916-k207 instance. Therefore, the number of routes in each instance is proportional to the execution time of the proposed algorithm. In general, the execution time of the algorithm is relatively fast, around 500 seconds for large instances.

Furthermore, we also evaluate the effectiveness of the proposed algorithm under given upper bounds. As shown in Table 5, the experimental results show that the best average results obtained by GSGA are about 1.56% lower than the upper limit value in most cases.

During the experiment, the best target value was obtained when the population size was between 150 and 200. With this number of individuals, the population can adapt quickly. However, when the problem size is quite large and the number of customers is large, the diversity of the population decreases. Comparing the results of Table 4 and Table 5, the model has better execution time when the greedy search algorithm is implemented into GA.

6.4.3 Comparison with baseline

In this paper, we conduct three baseline algorithms: the ordinary genetic algorithm (GA), the simulated annealing algorithm combined with the proposed greedy search algorithm (GSSA), and the hybrid ACO algorithm (SACO) mentioned in related work. It is worth noting that the baseline method GA does not use the initial equilibrium distribution method and only uses Dijkstra's algorithm to find the closest possible site. GSSA also uses the originally proposed method and a search energy station mode similar to GSGA. SACO is based on the ACO framework and combined with the simulated annealing algorithm. The combination of ACO and SA really produces excellent results. ACO is used to find feasible and stable solutions, but it is difficult to find the global optimal solution, and SA will rely on the solution of ACO to find the global optimal solution. We evaluated four algorithms based on the same duration (25000n evaluations).

Overall, GSGA performs best for all data instances with the shortest path and average execution time. Compared with the results of the genetic algorithm, if the GS algorithm is implemented, the performance of the genetic algorithm can be improved by an average of 10%-25%. The GSGA algorithm combines the proposed GS strategy and outperforms GSSA and the state-of-the-art SACO in average target values ​​across all dataset instances. Specifically, the GSGA algorithm is about 5% better than SACO on small data sets and 23.5% better on large data sets. Compared with GSSA, GSGA improves the performance by 5.7% on small data sets and 4% on large data sets. This is because the proposed greedy strategy combined with the genetic algorithm can significantly reduce the cost of finding the optimal solution as the data expands. The research results in Table 6 show the potential of the greedy search algorithm GS in improving the performance of any genetic algorithm to find the optimal charging route, and GSGA is still the best performing algorithm.

Next, we performed the Wincoxon rank test on three different pairings: GSGA vs. GA, GSGA vs. GSSA, and GSGA vs. SACO. In the Wilcoxon signed-rank test with α = 0.05, the performance of the above algorithm is shown in Table 7 and Table 8 when run 30 times independently with the proposed GSGA algorithm on two types of data sets. Among them, -, ≈, + respectively indicate that the results obtained by the basic algorithm are worse, similar and better than the proposed algorithm.

        It can be observed that the results of our algorithm GSGA outperform other algorithms on both small and large datasets. Specifically, GSGA outperforms GA and GSSA in all cases; GSGA outperforms SACO in 6 out of 7 small instances and outperforms SACO in all instances on large data sets.

Therefore, the diagrammatic route to the best recorded solution for the instance is shown in Figure 13a–d. Please note that these symbols: the red circle symbol, the green triangle symbol and the blue square symbol represent the depot, customer and charging station respectively.

6.4.4 Ablation studies

In order to further examine the effectiveness of each component in the proposed genetic algorithm (GSGA), including the initialization method, crossover method and mutation method, we conduct experiments by removing each component in GSGA. Table 9 shows the experimental results, %improve is the relative improvement from version GSGA-I (greedy initialization replaced with random initialization) and GSGA-M (no mutation) and GSGA-C (no crossover) to version GSGA.

First, we observe that greedy initialization gives better solutions than random initialization on all datasets. The results are insufficient without using a greedy initialization strategy and even finding ineffective solutions (except for four small instances). The reason is that greedy initialization methods can produce efficient solutions, and the quality of these solutions is better than random initialization.

Second, we observe that the results of GSGA-C (without crossover) are also not good. Furthermore, the results of GSGA-M (without mutations) are much worse than GSGA-C in all large examples. Therefore, both crossover and mutation operators play an important role in improving the quality of the solution, with mutation being more effective than crossover operator.

7 Conclusion

This paper proposes an electric vehicle routing problem and proposes an efficient algorithm based on genetic algorithm and greedy search algorithm, namely GSGA. In our approach, a new solution representation is proposed for GSGA, including new encoding and decoding methods. In addition, this paper also proposes greedy initialization, new crossover operators and mutation operators for this problem. The proposed algorithm was evaluated on the EVRP benchmark instance in the EVRP competition at WCCI 2020. Experimental results show that when applied to genetic algorithms, our greedy search algorithm GS can find better cluster charging routes and provide vehicles with more optimized driving distances. For the future, we plan to further investigate more variants of the proposed GSGA's routing problem for electric vehicles. Designing multi-factor evolutionary algorithms to solve vehicle routing problems is also a promising research direction.

Guess you like

Origin blog.csdn.net/qq_45874683/article/details/131729892