Next Article in Journal
Identifying Economic Factors of Renewable Energy Consumption—A Global Perspective
Previous Article in Journal
A New Method of Transformer Short-Circuit Impedance Regulation Based on Magnetic Shunts
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Application of an Improved Harmony Search Algorithm on Electric Vehicle Routing Problems

1
Department of Industrial Engineering and Management, Yuan Ze University, Taoyuan 320, Taiwan
2
Department of Industrial and Systems Engineering, Chung Yuan Christian University, Taoyuan 320, Taiwan
3
School of Computing and Information Systems, Singapore Management University, 80 Stamford Road, Singapore 178902, Singapore
*
Author to whom correspondence should be addressed.
Energies 2024, 17(15), 3716; https://doi.org/10.3390/en17153716 (registering DOI)
Submission received: 14 June 2024 / Revised: 13 July 2024 / Accepted: 20 July 2024 / Published: 27 July 2024
(This article belongs to the Section E: Electric Vehicles)

Abstract

:
Electric vehicles (EVs) have gained considerable popularity, driven in part by an increased concern for the impact of automobile emissions on climate change. Electric vehicles (EVs) cover more than just conventional cars and trucks. They also include electric motorcycles, such as those produced by Gogoro, which serve as the primary mode of transportation for food and package delivery services in Taiwan. Consequently, the Electric Vehicle Routing Problem (EVRP) has emerged as an important variation of the Capacitated Vehicle Routing Problem (CVRP). In addition to the CVRP’s constraints, the EVRP requires vehicles to visit a charging station before the battery level is insufficient to continue service. EV battery consumption is linearly correlated to their weight. These additional constraints make the EVRP more challenging than the conventional CVRP. This study proposes an improved Harmony Search Algorithm (HSA), with performance validated by testing 24 available benchmark instances in the EVRP. This study also proposes a novel update mechanism in the improvement stage and a strategy to improve the routes with charging stations. The results show that in small and large instances, the proposed HSA improved the number of trips to the charging stations by 24% and 4.5%, respectively. These results were also verified using the Wilcoxon signed-rank significant test.

1. Introduction

The Vehicle Routing Problem (VRP) has long been an integral part of combinatorial optimization, dating back to 1959 with the pioneering work of [1], when it was known as the Truck Dispatching Problem (TDP). Originally conceived for efficient gasoline delivery to service stations, the VRP has since evolved into a multifaceted challenge involving finding the most efficient routes for a fleet of vehicles to visit a set of nodes exactly once. This optimization encompasses travel, service, and waiting times, all with the overarching objective of minimizing routing time. According to [2], the VRP is classified as NP-hard, implying that it cannot be solved in polynomial time.
The VRP’s versatility has given rise to a range of practical applications, especially for delivering packages, and is becoming more important due to the growth of online shopping. In 2020, more than two billion people bought goods or services on the internet [3]. The VRP effectively accommodates various constraints, such as vehicle weight capacity, making it a valuable tool frequently used by logistics businesses to enhance their pickup and delivery services. As our transportation landscape undergoes a green revolution, a new dimension has been added to this classical problem: the Electric Vehicle Routing Problem (EVRP). With conventional gasoline-powered vehicles gradually being phased out, electric vehicles are taking center stage as sustainability champions, as evidenced by the use of EVs for taxi advance reservations in Singapore [4]. Thus, it is important to consider managing battery levels and the availability of charging stations.
While these intricacies may appear daunting, they significantly enhance the EVRP’s relevance to real-world problems. Balancing cargo loads and battery levels in the Electric Vehicle Routing Problem (EVRP) is a formidable and multifaceted task at the core of the logistical complexities encountered in electric vehicle operations. This challenge arises from the unique characteristics of electric vehicles, which markedly differ from their conventional gasoline- or diesel-powered counterparts. Electric vehicles are highly sensitive to weight, and the energy efficiency of these vehicles is profoundly impacted by the weight of the cargo they carry, with heavier loads leading to faster battery depletion. Hence, in an EVRP scenario, each vehicle’s payload must be meticulously considered.
Additionally, managing battery levels in electric vehicles goes beyond extending the vehicle’s range; it involves ensuring the vehicle completes its route efficiently and reliably. An overly conservative strategy may result in inefficient routes and extended delivery times, while pushing the vehicle’s battery to its limits can lead to the vehicle being stranded mid-route, causing disruptions and delays. Predicting battery consumption, especially with varying cargo loads, is complicated, requiring careful timing of visits to charging stations to ensure seamless operations from start to finish.
Our contributions to this field are substantial. Firstly, we introduce an innovative metaheuristic algorithm tailored to the unique complexities of the EVRP. A unique update mechanism within the solution-improvement stage further enhances the effectiveness of the algorithm. Incorporating these vital elements into our methodology ensures that our routes are efficient, practical, and sustainable. Leveraging the Taguchi method, we meticulously determine the optimal parameters for our HSA algorithm, allowing us to fine-tune our solution to the unique characteristics and requirements of each EVRP instance, resulting in unparalleled performance and efficiency. Our proposed algorithm not only meets but surpasses the previous literature benchmarks. Our results demonstrate a significant improvement in the objective function, specifically in minimizing the total travelling distance for the critical tasks. Furthermore, we successfully reduced the number of visits to charging stations. These improvements are substantiated by the Wilcoxon signed-rank test statistic, reaffirming the statistical significance of our contributions.

Related Work

In this era marked by logistics and transportation challenges, catalyzed by the emergence of the EVRP, it becomes increasingly evident that the electric vehicle industry is rapidly gaining traction. Sustainable solutions are imperative for addressing EVRP demands. Thus, there is a growing need for innovative insights and pioneering strategies in this field. With the resurgence of interest in electric vehicles, EVRP research is poised to make significant advancements.
Methodologies used to tackle EVRPs, including both exact and heuristic algorithms, are discussed in this section. EVRP research in the early stages had a strong emphasis on exact methods, leveraging mathematical programming models and linear programming models. For instance, Xiao et al. [5] successfully tackled the Electric Vehicle Routing Problem with Time Windows (EVRPTW) by formulating it as a Mixed Integer Linear Programming (MILP) model, achieving optimal solutions using the CPLEX solver, particularly on smaller instances like those from Solomon’s dataset. Another notable contribution comes from Yao et al. [6] who concentrated on determining optimal routes for multiple electric vehicles (EVs) for efficient goods delivery or task completion. Their research considers the unique charging requirements of EVs to ensure route completion within specified time constraints. They formulate this challenge as a Mixed Integer Programming (MIP) problem. Despite their differences, these approaches exemplify the multifaceted nature of EVRP problem-solving, in which heuristics and exact methods offer valuable insights into electric vehicle routing challenge solving, offering avenues to explore the dynamic landscape of EVRPs further.
A literature review on EVRPs shows that various heuristic algorithms have been proposed to solve its complexities. A review of multiple journal papers from 2012 to 2024 shows that multiple metaheuristic algorithms were used, including Ant Colony Optimization (ACO), Constructive Search (CS), Genetic Algorithm (GA), Iterated Local Search (ILS), Large Neighborhood Search (LNS), Simulated Annealing (SA), Tabu Search (TS), and Variable Neighborhood Search (VNS), as detailed in Table 1. The review results indicate that these algorithms have been applied in varying degrees, with some algorithms being more commonly used than others. It is noteworthy that the HSA has not yet been applied to solve the EVRP.
Furthermore, to provide a comprehensive overview of the latest research in the EVRP field, this study examines all journal articles published after 2020 that address variations of the problem. Soysal et al. [37] tackled the Electric Vehicle Routing Problem (EVRP) in pickup and delivery operations while considering the energy consumption between nodes. This stochastic battery reduction could help manage or plan transportation routes.
Lu et al. [38] and Zhao et al. [39] investigated the EVRP with time-dependent constraints, accounting for the varying travel speeds depending on the time horizon. Lu et al. [38] formulated the problem as an Integer Linear Programming (ILP) model and assessed its solvability by subjecting it to testing in CPLEX. They further solved it by implementing the Iterated Variable Neighborhood Search (IVNS) on available benchmark instances. In contrast, Zhao et al. [39] applied their model to the cold chain distribution of perishable products, considering different travel speeds, road types, customer time windows, and product freshness as additional constraints. The results demonstrated that the proposed Ant Colony Optimization (ACO) effectively minimized the total cost and improved the distribution performance of fresh products.
Yazir et al. [40], Karakatič [41], Lin et al. [35], Yang et al. [42], and Zhou et al. [36] conducted studies on the Electric Vehicle Routing Problem with Time Windows (EVRPTW), which involves defining a specific timeframe within which a vehicle can visit a node, with specified opening and closing times. Although these papers address a similar problem (EVRPTW), they each have distinct objective functions. Yazir et al. [40] considered all three charging technologies to minimize the total cost (total travelling distance, charging cost, depot-to-nurse home transfer services, and unserved patient cost). Karakatič [41] focused on minimizing driving times, the number of trips to charging station nodes, and the total time spent in recharging stations. Lin et al. [35] concentrated on minimizing travel distance or time. Similarly, Yang et al. [42] aimed to minimize travel costs. Zhou et al. [36] also strived to minimize the total cost, but they worked within a heterogeneous fleet and tested their model using real-world instances from an e-commerce enterprise in China.
Keskin et al. [20] and Yang et al. [42] investigated the Electric Vehicle Routing Problem (EVRP) with capacity constraints that limit the number of electric vehicles (EVs) at each station. The experiments conducted by Keskin et al. [20] demonstrate that the station capacity constraint has a linear impact on routing and charging decisions. Furthermore, the authors considered the influence of charging time by the time of day, highlighting that vehicles experience significantly longer waiting times and queues during peak hours. In Yang et al. [42]’s study, their results suggest that a partial charging strategy can effectively reduce the total waiting time required per service.
In our study, we examine the work of [32,41,43], who address the Electric Vehicle Routing Problem (EVRP) with multiple depots, introducing the additional challenge of determining the departure and return depot for each vehicle. In Zhu et al. [43]’s formulation of the problem, the depot from which a vehicle departs or returns depends on its belonging, and it has the flexibility to visit all depots at most once. In contrast, Ghobadi et al. [32] and Karakatič [41] assume that a vehicle must return to the same depot from which it initially departed. When dealing with multiple depots and the EVRP, these researchers use a variety of depot-handling strategies.

2. Electric Vehicle Routing Problem (EVRP)

The EVRP can be described as a vehicle routing problem, where the objective is to visit a subset of nodes or customers exactly once with an electric vehicle without violating any constraints. The constraints are similar to those of the VRP and are summarized as follows:
  • Each vehicle has a limited capacity.
  • Each vehicle must start and end its service route at the depot node.
  • The time window constraints of the depot must be satisfied.
In scenarios where an electric vehicle needs to visit multiple customers while operating from a single depot, efficient route planning becomes crucial. Such situations are common in urban delivery services, where a vehicle must deliver packages to various customers spread across a city. For instance, a courier service might have a central depot where all packages are sorted and loaded onto vehicles. The vehicle then travels to multiple customer locations to deliver the packages. The challenge lies in ensuring the vehicle’s battery lasts for the entire route, which may necessitate visits to charging stations along the way.
As illustrated in Figure 1, all vehicles depart from the depot with a full battery. The battery capacity decreases as the vehicle visits each node. A visit to a charging station is required whenever the vehicle’s battery is insufficient for the remaining journey. For example, in route 1, when a vehicle is returning to the depot after visiting Customer 3 (C3), the battery is insufficient, so a visit to the charging station is necessary between C3 and the depot. Conversely, as shown in route 2, a vehicle might not need to visit a charging station at all if it can return to the depot with sufficient battery capacity. This scenario is particularly relevant for companies aiming to minimize their environmental impact by using electric vehicles while still meeting delivery schedules and customer expectations.
Therefore, the following assumptions consider the characteristics of the vehicles used in the EVRP [44]:
  • Each vehicle departs and returns at the depot node.
  • Each node can only be visited exactly once.
  • The battery capacity of an electric vehicle is defined as a range between 0 and its maximum battery level.
  • Charging station nodes can be visited multiple times by any electric vehicle.
  • When an EV arrives at a charging station, it is assumed that no charging time is required, implying instantaneous battery replenishment.
  • The EV’s battery is always fully charged when visiting a charging station.
The mathematical model of the EVRP is adapted from Mavrovouniotis et al. [45] and is formulated as:
m i n i m i z e i N , j N , i j d i j x i j ,
s . t . j N , i j x i j = 1 , i I ,
j N , i j x i j 1 , i F ,
j N , i j x i j j N , i j x j i = 0 , i N ,
u j u i δ j x i j + C ( 1 x i j ) , i N , j N , i j ,
u j u i δ j x i j C ( 1 x i j ) , i N , j N , i j ,
0 u i C , i N ,
u O = C ,
y j y i h i d i j x i j + Q 1 x i j , i I , j N , i j ,
y j Q h i d i j x i j , i F , j N , i j ,
0 y i Q , i N ,
y O = Q ,
x i j 0,1 , i N , j N , i j
The EVRP’s objective function minimizes the travelling distance, as described in Equation (1). Equation (2) ensures that each customer is visited exactly once, while Equation (3) restricts the visit connectivity to recharging stations. Equation (4) ensures that a vehicle will depart from such a node after it visits a node. Furthermore, the nodes’ demand restrictions are detailed in Equations (5)–(7). Equation (8) ensures that the electric vehicle departs the depot with maximum capacity. Restrictions for the electric vehicle’s battery charger level are described in Equations (9)–(11). Equation (12) guarantees an electric vehicle will depart the depot with a full battery charge. Finally, Equation (13) is a binary decision, as aforementioned. The notation used in the formulation above is summarized in Table 2.

2.1. EVRP Energy Consumption

The energy consumption formula was adopted by Mavrovouniotis et al. [45] and is represented by the variable h i d i j , where h i represents the energy consumption rate. It is formulated as follows:
h i = r + u i C
The constant value r represents the energy consumption rate in the EVRP model. Each EV in the model is equipped with a cargo load capacity and a battery charge level. The variable ui represents the remaining cargo load, ranging from 0 to the maximum cargo load C. In addition, the battery charge level of an EV while at node i is denoted as yi, which ranges from 0 to the maximum charge level Q.
Furthermore, the Euclidean distance is a commonly used measure of the straight-line distance between two points in a two-dimensional space. The distance between node i and node j can be determined using the Euclidean distance formula, which uses the x and y coordinates of the two nodes.

2.2. Charging Policies in the EVRP

Three different recharging station policies are considered in the EVRP, i.e., full charging, partial charging, and battery swapping. In full charging, a vehicle’s battery will be fully charged as soon as a charging station is visited, following Granada-Echeverri et al. [15], Li et al. [46], Zhao et al. [39], Ghobadi et al. [32], and Jia et al. [7].
In contrast, following Kancharla and Ramadurai [34], Basso et al. [47], Ceselli et al. [48], Karakatič [41], and Keshin et al. [20], the battery level of a vehicle in a partial charging station is linearly dependent on the time spent at the station or the charging time. Following Jie et al. [49], Ge et al. [50], Li et al. [46], and Sayarshad et al. [51], in battery swapping, the vehicle’s battery is recharged by exchanging an empty battery with a fully charged one.
In this research, a full charging policy, like that used by [45,52] is adopted, where the charging time is assumed to be instantaneous.

3. Harmony Search Algorithm for the EVRP

In this section, the framework of the proposed algorithm is detailed. The EVRP is split into two sub-problems: the route optimization problem and the decision-making problem of visiting charging stations. Within the route optimization problem, during the initial route or initial population generation, we did not incorporate any consideration for charging stations. This approach was pursued while seeking the optimal routing schedule described in Section 3.1. In contrast, how the charging optimization problem is addressed is detailed in Section 3.2.

3.1. Harmony Search Algorithm

The HSA is a population-based heuristic algorithm that solves combinatorial [53] and continuous problems [54,55]. As its name suggests, the algorithm was inspired by musical concepts in which a musician tunes the pitch of musical instruments to obtain the most harmonic melody.
Our proposed HSA consists of three stages, i.e., initial solution generation, solution improvement, and update mechanism. This work determines the number of solutions generated by the Harmony Memory Size (HMS) parameter. The solution-improvement phase implements the Harmony Memory Considering Rate (HMCR) and Pitch Adjusting Rate (PAR). Finally, in the update mechanism, our proposed HSA evaluates the performance of each solution and updates the best solution accordingly. A pseudocode that details the proposed HSA algorithm can be observed in Algorithm 1.
Algorithm 1. Harmony search algorithm encoding
Initialize the problem
Define HMS, HMCR, PAR, ITR, PARitr
Initialize Harmony Memory
for ( s o l u t i o n i = 1 to HMS):
     initialize the route and store it in Harmony Memory;
Solution Improvement
for iteration ≤ ITR:
    if rand() ≤ HMCR
        s o l u t i o n i = solutionj (j = 1, 2, …, HMS) (grab a route from HMS);
        if rand( ) ≤ PAR:
           for PAR iteration ≤ PARitr:
               improve s o l u t i o n i with Local Search Operator;
              if ( s o l u t i o n i   worst solution in HM):
                   accept new solution s o l u t i o n i and replace the worst in HM
              end if;
      else:
          if ( s o l u t i o n i   worst solution in HM):
                  accept new solution s o l u t i o n i and replace the worst in HM;
          end if;
   else
       generate new solution ( s o l u t i o n i );
     if ( s o l u t i o n i   worst solution in HM):
          accept new solution s o l u t i o n i and replace the worst in HM;
     end if;
end for;
end;

3.1.1. Initial Solution Generation

The initial solutions are generated without violating constraints such as depot time windows, number of vehicles or vehicle capacity. As detailed in Algorithm 2, initial solutions were generated based on the nearest neighbor procedure. The initial solution generation procedure is as follows: the first node to be added to a route will be randomly selected, after which all the following nodes are chosen based on the closest distance to the previous node. For example, if a vehicle is located at node i, the next visited node (node j) is selected based on the minimum dij value among the unvisited nodes where ij. Any node that would cause a route to violate a certain constraint will be excluded from that route (and is returned to the unvisited nodes list), and the route is closed by assigning a depot node as the final destination. Then, a new route is generated, and this process is repeated until all nodes are assigned to their respective vehicles.
The initial solution generation is detailed as follows:
Algorithm 2. Route generation EVRP based on nearest neighbor assignment
Step 1. Initialization
  • During initialization, an empty route is encoded as [1,1], with node 1 representing the depot.
Step 2. Assign the first node to the route
  • The first node assigned to the routes will be randomly selected from the list of unvisited nodes to introduce variation.
Step 3. Assign the next node to existed route
  • The next assigned node to the route is the closest node to the last assigned node,
Step 4. Repeat step 3 until the list of unvisited nodes is empty.
The initial solutions are stored in the Harmony Memory (HM), and the number of initial solutions in the HM is determined by Harmony Memory Size (HMS). The HM in this proposed method is illustrated in Figure 2, where n is the number of routes in solution Si.

3.1.2. Solution Improvement with Adaptive HSA

The improvement of the solution is determined by two parameters: HMCR and PAR. The HMCR parameter value controls the population’s diversity, and (1-HMCR) determines the probability of a solution being randomly selected from the population or HM. In contrast, PAR determines the probability of improving the selected solution through different local search operators.
In this proposed method, we use the adaptive PAR proposed by Li and Wang [56], where the values of PAR change over iterations as follows:
P A R k = P A R m i n + ( P A R m a x P A R m i n ) K × k
Just like in the PAR function, in our proposed HSA, we implement a dynamic HMCR function as follows:
H M C R k = H M C R m i n + ( H M C R m a x H M C R m i n ) K × k
The number of total iterations is denoted as K, and the current iteration is denoted as k. PARmax, PARmin, HMCRmax, and HMCRmin are four parameters defined as the maximum and minimum adjusting rates for PAR and HMCR.
As evident from Algorithm 1, the initial stage of solution enhancement in the HSA involves generating a random number (p) within the range of [0, 1]. If the p-value is lower than the HMCR value, a solution is chosen randomly from the HM. Subsequently, a second random number is generated and compared with the PAR value. Solution enhancement (pitch adjustment) occurs only if the second random number is smaller than the PAR. This involves identifying a neighboring solution based on a randomly selected solution from the previous stage.
Finding a neighboring solution in this solution-improvement stage involves several local search operators, including swap within a route, swap between routes, insertion within a route, insertion between routes, and 2-OPT. Roulette wheel selection is used to choose the local search operator in each iteration, where the probability of selecting each local search operator follows a uniform distribution.
The results in Figure 3 show that by implementing adaptive values, the PAR and HMCR change over iterations. As the number of iterations increases, the algorithm reduces exploration, which in turn helps in decreasing computational time. The convergence plots clearly demonstrate that the modified HSA, with its adaptive PAR and HMCR values, is able to obtain better solutions more quickly compared to the traditional HSA. In several instances, the traditional HSA was unable to reach the optimal value within the same number of iterations, whereas the modified HSA successfully achieved optimal solutions.
These findings underscore the practical advantages of the modified HSA, showcasing its ability to balance exploration and exploitation more effectively.

3.1.3. Update Mechanism

Our proposed EVRP solution seeks to schedule routes that serve all nodes with the lowest possible total travel distance. Vehicle battery level is crucial in minimizing the objective function, given that an inefficient route can result in multiple visits to charging stations. Furthermore, our update mechanism considers not only the total distance travelled but also the amount of energy consumed. The update mechanism in our proposed EVRP is as follows:
i f    f x f x + e x e x 2   < 1   ; t h e   u p d a t e   m e c h a n i s m   o c c u r s ,   o t h e r w i s e   n o t .
The update mechanism is described in Equation (17), using the following notations: Let f x and f x , respectively, represent the route objective before and after improvement. Similarly, let e x and e x , respectively, denote total energy consumption before and after improvement.

3.1.4. Overview

To provide a comprehensive understanding of our algorithm, we will walk through its general workflow, starting from the generation of an initial solution, then applying improvement techniques, and finally updating the solution in the HM, as illustrated in Figure 4.
The algorithm starts with an initial solution, which can be generated randomly or using a heuristic method. Let us consider a simple example where we have an initial solution represented as a route for an electric vehicle visiting five customers in the order:
Route 1: [Depot, C4, C2, C3, C1, Depot] (Objective Value: 120)
To improve this initial solution, we applied local search operators (e.g., the swap operator), which swaps the positions of two customers in the route to explore neighboring solutions. For example, if we swap customers C4 and C1 in the initial solution, the new route becomes [Depot, C1, C2, C3, C4, Depot]
Evaluate the New Solution:
After applying the local search operators (e.g., swap operator), our new route 1 [Depot, C1, C2, C3, C4, Depot] has an objective value of 90.
Update:
The new route 1 (Objective Value: 90) is compared with the same route 1 before optimization. Since the optimized route 1 has a better objective value than the previous route, it replaces that solution.
This process will be repeated until the termination criterion is reached. By iteratively transforming the initial solution using a local search operator like the swap operator and updating the solution population in the Harmony Memory, our algorithm effectively explores the solution space and finds high-quality routing solutions.

3.2. Charging Optimization

Our charging optimization consists of two independent steps: charging station node assignment (Section 3.2.1) and charging station route optimization (Section 3.2.2).

3.2.1. Charging Station Node Assignment

First, after we have optimized the route using the HSA, we will assign the charging station to the route. We iterate over each pair of nodes to determine whether a charging station must be placed between such nodes based on the current battery level. If so, the closest charging station to the departure node is assigned between the current pair of nodes.
As depicted in Figure 5, the EV battery level cannot travel from node 8 to node 3. Consequently, the EV must access a charging station before visiting node 3. Among the three available charging nodes, charging node C3 is the nearest to customer node 8; thus, it becomes the chosen station to visit. This process is reiterated to ensure the feasibility of each node pair.

3.2.2. Route Optimization Involving Charging Station

Additionally, we have implemented a swap operator between each pair of charging and customer nodes to optimize the charging station selection. If a better solution is obtained, it replaces and updates the existing solution in the Harmony Memory (HM). The concept behind swapping between charging nodes and customer nodes is that sometimes, it is more cost-effective (in terms of minimizing distance) to visit a charging station earlier, as illustrated in Figure 6.
Finally, our findings after implementing the modified Harmony Search Algorithm (HSA) demonstrate a reduction in trips to charging stations, primarily due to the implementation of a swap operator between each pair of charging and customer nodes. This operator optimizes the selection of charging stations by considering whether it is more cost-effective, in terms of minimizing distance, to visit a charging station earlier. When the swap operator finds a better solution, it replaces and updates the existing solution in the HM. This dynamic adjustment within the algorithm’s structure allows for more efficient routing, as it continuously seeks to minimize the total distance traveled. Figure 6 illustrates the impact of this optimization, showing the route before and after the charging station optimization. To further enhance the algorithm’s performance, we implemented adaptive parameterization for HMCR and PAR values. By dynamically adjusting these parameters, the algorithm balances exploration (searching for new solutions) and exploitation (refining existing solutions) during the optimization process. This balance is crucial for finding high-quality solutions efficiently. As the number of iterations increases, the algorithm reduces exploration, which helps in refining the routing solutions and minimizing the number of trips to charging stations. The main objective behind this adaptive parameterization is to allow the algorithm to start with a broader search to explore a wide range of potential solutions (high exploration) and gradually shift towards refining the best solutions found (high exploitation). This approach ensures that the algorithm does not get stuck in local optima early in the process and can find more optimal routes as it progresses. By implementing these adaptive values, the parameters PAR and HMCR change over iterations, resulting in a more efficient and effective optimization process. In summary, the combination of the swap operator and adaptive parameterization of HMCR and PAR values significantly enhances the algorithm’s ability to optimize routes involving charging stations. These modifications directly contribute to the observed reduction in trips to charging stations and overall improvements in routing efficiency.

4. Computational Experiment and Analysis

4.1. Benchmark Instances

The proposed EVRP method was tested on the newest benchmark instances generated by Mavrovouniotis et al. [45], with results compared against the best-known solutions from Mavrovouniotis et al. [45,52] using MILP and the Max-Min Ant System (MMAS) heuristic algorithm, respectively. Ref. [45] proposed 24 small- and large-scale instances. The number of nodes varies from 29 nodes to 1006 nodes.

4.2. Experimental Setup

This section presents the results of our computational experiment to solve the EVRP using our proposed algorithm. The proposed method was implemented in Python 3.11 and ran on a computer with 16 GB RAM and an i7-4790 CPU @3.60GHz.
To ensure a fair comparison against previous studies, we used the evaluation methodology used by Mavrovouniotis et al. [45,52] The improved HSA algorithm was evaluated over 250*n iterations, with 100 neighboring solutions generated in each iteration, and was run ten times using different random seeds for each instance. The HSA parameter values are detailed in Table 3.

4.3. Design of Experiment with Taguchi Method

For the experiments performed using the Taguchi method, we defined four different factors, and for each factor, we defined four different levels. Mathematically, this is expressed as α 1 1 , , α l f   f F ,   l L , where F is the set of factors, L represents the set of levels, and α l f represents the parameter setting for factor f at level l.
We applied the Taguchi method to statistically find the optimal values of each parameter, thereby optimizing the proposed metaheuristic algorithm. Contrary to the factorial design that necessitates the examination of all potential combinations, the Taguchi approach evaluates combinations in pairs. This strategy facilitates the gathering of essential data to identify the factors that have the most significant impact on the quality of the product, all while minimizing the cost of experimentation [57]. Because of this reason, this experimentation makes it particularly advantageous for complex optimization problems. The factors F1, F2, F3, and F4 correspond to number of neighboring solutions and PAR, HMS, and HMCR values, respectively. The experiment was conducted 16 times with different level combinations per factor in each iteration, as detailed in Table 4.
As seen from the model summary in Table 5, the model responds best at the lowest possible Standard Deviation (S) value. R-Sq and R-Sq(adj) are the percentages of variation in the response that the model explains. A high R-Sq and R-Sq(adj) value indicates a better model.
Finally, it can be concluded that the factor explains 99.61% of the variations in the response. The standard deviation (S) between the data points and the fitted values is approximately 4.23 units.
The HMCR parameter is a critical factor in balancing global exploration and local exploitation in the HSA, while the PAR value significantly affects local exploration through local search operators. Table 6 highlights that Factors F1, F2, F3, and F4 all statistically impact their mean, as the p-values are below the 5% significance level. The p-values for factors F1, F2, and F4 are particularly low (0.002), indicating strong evidence of their effects. Factor F3, while still significant with a p-value of 0.022, has a relatively higher p-value than the others. Such findings suggest that they should be considered when interpreting the data and making decisions based on them. Furthermore, as shown in Figure 7, changing parameter values significantly influences the HSA. This parameter setting was used to define the parameter values in the proposed HSA.

4.4. Experimental Results

The experimental results for small and large benchmark instances using the HSA approach are provided in Table 7 and Table 8.
In conclusion, the results from Table 9 and Table 10 show that the proposed HSA was benchmarked against two existing approaches: MMAS, proposed by Mavrovouniotis et al. [45] and the best-known solution (BKS), which was proposed as MMAS + local search (MMAS+ls) by Mavrovouniotis et al. [52].
Additionally, we conducted scalability tests to evaluate the algorithm’s performance under varying levels of factors, as illustrated in Figure 8. In small instances, the maximum number of customers is 60, while in large instances, it reaches 1006. However, the average computational time per iteration is only twice as high for large instances compared to small instances (0.004 s for small instances and 0.0089 s for large instances). These tests demonstrated that the algorithm’s adaptive mechanisms enable it to manage larger fleets and complex logistics networks without a significant degradation in performance. For example, in dense urban environments with higher customer densities, the algorithm efficiently optimized routes by leveraging its dynamic adjustment capabilities, ensuring that the solutions remain practical and computationally feasible.
Furthermore, Table 11 and Table 12 present the time required to visit a charging station, based on Shao et al. [58], who estimated the time to fully charge an electric vehicle using fast charging to be approximately 30 min. Thus, the total recharging time was obtained by multiplying the number of recharging occurrences by the time required per visit.
Table 11 indicates that our proposed HSA reduced the number of charging station visits by 24% compared to the MMAS+ls method developed by Mavrovouniotis et al. [52].
Table 12 shows that our proposed HSA reduced the number of charging station visits by 4.5%, outperforming 16 out of 24 instances regarding the required charges.
Regarding the total travelling distance, this proposed method has a maximum advantage of 7% compared to Mavrovouniotis et al. [45] equivalent to 18 kilometers. However, if the average travelling speed [59] is 40 km/h, this difference would only result in an additional 27 min.
Furthermore, the Wilcoxon signed-rank test statistic was applied to determine whether the proposed HSA outperforms the previous approach regarding recharging occurrences. The difference between the performance scores of the algorithms for the ith problem is denoted as di. The sum of ranks denoted as R+ represents the total ranks of the problems where the first algorithm outperforms the second. Similarly, R represents the sum of ranks for the problems in which the second algorithm outperforms the first. If the performance difference (di) is zero, the ranks are evenly distributed between the two sums. If the number of ranks is odd, one of the sums is ignored [60].
R + = d i > 0 r a n k   ( d i ) + 1 2   d i = 0 r a n k   ( d i )
R = d i < 0 r a n k   ( d i ) + 1 2   d i = 0 r a n k   ( d i )
The p-value obtained from implementing the significance test using MINITAB 21.3.1 at a 95% confidence level is 0.02. As the p-value is less than α, it can be concluded that the improvement of the proposed HSA is statistically significant. This highlights the effectiveness and efficiency of the proposed HSA in solving complex optimization problems, raising the potential for HSA applications in a wide range of fields and industries.

5. Discussion

The outcomes indicate that the suggested HSA effectively achieved the best solution in three cases and surpassed the performance of Mavrovouniotis et al. [45] in five out of six small and two large instances. Furthermore, when contrasted with the work of Mavrovouniotis et al. [52], the proposed approach yielded better solutions in three instances. Our improvement in both small and large instances is summarized in Table 13. These findings were also validated through the Wilcoxon signed-rank significance test.
In addition, a comparison between the solution quality and computational time between the proposed Modified HSA and Mixed Integer Linear Programming is also provided in Table 14.
In this study, we have chosen to apply the MILP method to small instances, setting a time limit of 10,800 s for each run. However, for larger instances, the MILP method was not able to obtain solutions due to the pre-determined time limit. As a result, only the comparison between the Modified HSA and MILP in small instances is provided in this experiment. This decision stems from the understanding that in MILP, the computational time required to solve a problem increases exponentially with the number of nodes. Consequently, larger instances would demand significantly more time, extending beyond practical limits. In terms of computational time, our results clearly demonstrate the effectiveness of our proposed algorithm, as it obtained superior solutions in much less time.

6. Conclusions

In summary, our proposed Harmony Search Algorithm (HSA) has demonstrated promising results when compared to existing techniques. Its ability to outperform both small and large instances underscores its effectiveness and efficiency in solving complex optimization problems. Specifically, our HSA algorithm significantly reduces costs and waiting times associated with charging electric vehicles (EVs), making it a viable solution for real-world scenarios.
Looking ahead, future research should explore the potential of the proposed HSA on other benchmarks related to the EVRP as Zhang et al. [61] who modified Solomon benchmark instances. Moreover, future research should incorporating additional constraints as dynamic variables, such as vehicle load, battery capacity, multi-trip vehicle routing with delivery option [62], and taking battery depletion costs into consideration similar to the prior study from Abdulaal et al. [63]. Additionally, we recommend investigating alternative optimization techniques, such as Reinforcement Learning (RL). For instance, Yang et al. [64] successfully implemented Hybrid Policy-based Reinforcement Learning (HPRL) to address adaptive energy management for island energy systems.
While our study directly addresses the EVRP and validates the effectiveness of our proposed HSA for optimizing routing solutions, we must acknowledge the challenges posed by incorporating renewable energy sources. These factors—such as the variability of renewable energy supply and fluctuating demand patterns—must be carefully considered when designing robust and adaptable optimization frameworks. To build upon our findings, future research could benefit from integrating strategies discussed by Li et al. [65], who addressed uncertainties related to renewable energy. By refining optimization approaches, we can ensure an efficient and reliable EV charging infrastructure. Lastly, in addition to route optimization, researchers should also consider optimizing the charging schedules for EVs [66] and managing energy within charging stations. Abomazid et al. [67] introduce an optimal energy management system (EMS) model for a hydrogen production system. This model integrates a photovoltaic (PV) system and a battery energy storage system (BESS). The primary goal of the EMS model is to minimize the cost of hydrogen production while ensuring reliable system operation. Furthermore, it facilitates seasonal hydrogen storage based on historical electricity prices.

Author Contributions

Conceptualization, methodology, validation: V.M., Y.-C.L., A.H.L.C. and A.G.; formal analysis, investigation, writing—original draft preparation, writing—review and editing, and visualization: V.M., Y.-C.L. and A.H.L.C. All authors have read and agreed to the published version of the manuscript.

Funding

This work was partially supported by the National Science and Technology Council, Taiwan, ROC (Grant MOST 111-2221-E-155-026-MY2).

Data Availability Statement

The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicting or competing interests.

References

  1. Dantzig, G.B.; Ramser, J.H. The truck dispatching problem. Manag. Sci. 1959, 6, 80–91. [Google Scholar] [CrossRef]
  2. Letchford, A.N.; Salazar-González, J.J. The capacitated vehicle routing problem: Stronger bounds in pseudo-polynomial time. Eur. J. Oper. Res. 2019, 272, 24–31. [Google Scholar] [CrossRef]
  3. Salem, M.; Baidoun, S.; Abu Sharekh, N.; Sammour, N.; Alnajar, G.; Alasttal, F.; Saqer, H. Factors affecting Arab consumers’ attitudes toward online shopping in light of COVID-19: The moderating role of digital marketing. J. Enterp. Inf. Manag. 2023, 36, 480–504. [Google Scholar] [CrossRef]
  4. Wang, H.; Cheu, R.L. Operations of a taxi fleet for advance reservations using electric vehicles and charging stations. Transp. Res. Rec. 2013, 2352, 1–10. [Google Scholar] [CrossRef]
  5. Xiao, Y.; Zuo, X.; Kaku, I.; Zhou, S.; Pan, X. Development of energy consumption optimization model for the electric vehicle routing problem with time windows. J. Clean. Prod. 2019, 225, 647–663. [Google Scholar] [CrossRef]
  6. Yao, C.; Chen, S.; Yang, Z. Joint routing and charging problem of multiple electric vehicles: A fast optimization algorithm. IEEE Trans. Intell. Transp. Syst. 2021, 23, 8184–8193. [Google Scholar] [CrossRef]
  7. Jia, Y.H.; Mei, Y.; Zhang, M. A bilevel ant colony optimization algorithm for capacitated electric vehicle routing problem. IEEE Trans. Cybern. 2021, 52, 10855–10868. [Google Scholar] [CrossRef] [PubMed]
  8. Mavrovouniotis, M.; Li, C.; Ellinas, G.; Polycarpou, M. Parallel ant colony optimization for the electric vehicle routing problem. In Proceedings of the 2019 IEEE Symposium Series on Computational Intelligence (SSCI), Xiamen, China, 6–9 December 2019; pp. 1660–1667. [Google Scholar]
  9. Zhou, B.H.; Tan, F. Electric vehicle handling routing and battery swap station location optimisation for automotive assembly lines. Int. J. Comput. Integr. Manuf. 2018, 31, 978–991. [Google Scholar] [CrossRef]
  10. Li, B.; Jha, S.S.; Lau, H.C. Route planning for a fleet of electric vehicles with waiting times at charging stations. In Proceedings of the Evolutionary Computation in Combinatorial Optimization: 19th European Conference, EvoCOP 2019, Held as Part of EvoStar 2019, Leipzig, Germany, 24–26 April 2019; Proceedings 19. pp. 66–82. [Google Scholar]
  11. Ait-Ouahmed, A.; Aggoune-Mtalaa, W.; Habbas, Z.; Khadraoui, D. eM-VRP: A new class of vehicle routing problem based on a new concept of modular electric vehicle. In Proceedings of the Transport Research Arena (TRA) 5th Conference: Transport Solutions from Research to Deployment, Paris, France, 14–17 April 2014. [Google Scholar]
  12. Yang, H.; Yang, S.; Xu, Y.; Cao, E.; Lai, M.; Dong, Z. Electric vehicle route optimization considering time-of-use electricity price by learnable partheno-genetic algorithm. IEEE Trans. Smart Grid 2015, 6, 657–666. [Google Scholar] [CrossRef]
  13. Shao, S.; Guan, W.; Ran, B.; He, Z.; Bi, J. Electric vehicle routing problem with charging time and variable travel time. Math. Probl. Eng. 2017, 2017, 5098183. [Google Scholar] [CrossRef]
  14. Zhenfeng, G.; Yang, L.; Xiaodan, J.; Sheng, G. The electric vehicle routing problem with time windows using genetic algorithm. In Proceedings of the 2017 IEEE 2nd Advanced Information Technology, Electronic and Automation Control Conference (IAEAC), Chongqing, China, 25–26 March 2017; pp. 635–639. [Google Scholar]
  15. Granada-Echeverri, M.; Cubides, L.; Bustamante, J. The electric vehicle routing problem with backhauls. Int. J. Ind. Eng. Comput. 2020, 11, 131–152. [Google Scholar] [CrossRef]
  16. Montoya, A. Electric Vehicle Routing Problems: Models and Solution Approaches. Doctoral Dissertation, Université d’Angers, Angers, France, 2016. [Google Scholar]
  17. Montoya, A.; Guéret, C.; Mendoza, J.E.; Villegas, J.G. The electric vehicle routing problem with nonlinear charging function. Transp. Res. Part B Methodol. 2017, 103, 87–110. [Google Scholar] [CrossRef]
  18. Penna, P.H.V.; Afsar, H.M.; Prins, C.; Prodhon, C. A hybrid iterative local search algorithm for the electric fleet size and mix vehicle routing problem with time windows and recharging stations. IFAC-PapersOnLine 2016, 49, 955–960. [Google Scholar] [CrossRef]
  19. Zhang, S.; Gajpal, Y.; Appadoo, S.S.; Abdulkader, M.M.S. Electric vehicle routing problem with recharging stations for minimizing energy consumption. Int. J. Prod. Econ. 2018, 203, 404–413. [Google Scholar] [CrossRef]
  20. Keskin, M.; Çatay, B.; Laporte, G. A simulation-based heuristic for the electric vehicle routing problem with time windows and stochastic waiting times at recharging stations. Comput. Oper. Res. 2021, 125, 105060–105075. [Google Scholar] [CrossRef]
  21. Kouider, T.O.; Cherif-Khettaf, W.R.; Oulamara, A. Large neighborhood search for periodic electric vehicle routing problem. In Proceedings of the the 8th International Conference on Operations Research and Enterprise Systems ICORES, Prague, Czech Republic, 19–21 February 2019; pp. 169–178. [Google Scholar] [CrossRef]
  22. Kouider, T.O.; Ramdane Cherif-Khettaf, W.; Oulamara, A. Metaheuristics for the generalised periodic electric vehicle routing problem. In Proceedings of the Computational Logistics: 10th International Conference, ICCL 2019, Barranquilla, Colombia, 30 September–2 October 2019; Proceedings 10. pp. 219–232. [Google Scholar]
  23. Löffler, M.; Desaulniers, G.; Irnich, S.; Schneider, M. Routing electric vehicles with a single recharge per route. Networks 2020, 76, 187–205. [Google Scholar] [CrossRef]
  24. Pelletier, S.; Jabali, O.; Laporte, G. The electric vehicle routing problem with energy consumption uncertainty. Transp. Res. Part B Methodol. 2019, 126, 225–255. [Google Scholar] [CrossRef]
  25. Yang, J.; Sun, H. Battery swap station location-routing problem with capacitated electric vehicles. Comput. Oper. Res. 2015, 55, 217–232. [Google Scholar] [CrossRef]
  26. Zhang, R.; Guo, J.; Wang, J. A time-dependent electric vehicle routing problem with congestion tolls. IEEE Trans. Eng. Manag. 2020, 69, 861–873. [Google Scholar] [CrossRef]
  27. Rodríguez-Esparza, E.; Masegosa, A.D.; Oliva, D.; Onieva, E. A new hyper-heuristic based on adaptive simulated annealing and reinforcement learning for the capacitated electric vehicle routing problem. Expert Syst. Appl. 2024, 252, 124197–124212. [Google Scholar] [CrossRef]
  28. Ding, N.; Batta, R.; Kwon, C. Conflict-Free Electric Vehicle Routing Problem with Capacitated Charging Stations and Partial Recharge; SUNY: Buffalo, NY, USA, 2015. [Google Scholar]
  29. Euchi, J.; Yassine, A. A hybrid metaheuristic algorithm to solve the electric vehicle routing problem with battery recharging stations for sustainable environmental and energy optimization. Energy Syst. 2023, 14, 243–267. [Google Scholar] [CrossRef]
  30. Preis, H.; Frank, S.; Nachtigall, K. Energy-optimized routing of electric vehicles in urban delivery systems. In Proceedings of the Operations Research Proceedings 2012: Selected Papers of the International Annual Conference of the German Operations Research Society (GOR), Leibniz University of Hannover, Hannover, Germany, 5–7 September 2012; pp. 583–588. [Google Scholar]
  31. Wang, L.; Song, Y. Multiple charging station location-routing problem with time window of electric vehicle. J. Eng. Sci. Technol. Rev. 2015, 8, 190–201. [Google Scholar]
  32. Ghobadi, A.; Tavakkoli Moghadam, R.; Fallah, M.; Kazemipoor, H. Multi-depot electric vehicle routing problem with fuzzy time windows and pickup/delivery constraints. J. Appl. Res. Ind. Eng. 2021, 8, 1–18. [Google Scholar] [CrossRef]
  33. Hof, J.; Schneider, M.; Goeke, D. Solving the battery swap station location-routing problem with capacitated electric vehicles using an AVNS algorithm for vehicle-routing problems with intermediate stops. Transp. Res. Part B Methodol. 2017, 97, 102–112. [Google Scholar] [CrossRef]
  34. Kancharla, S.R.; Ramadurai, G. Electric vehicle routing problem with non-linear charging and load-dependent discharging. Expert Syst. Appl. 2020, 160, 113714–113731. [Google Scholar] [CrossRef]
  35. Lin, B.; Ghaddar, B.; Nathwani, J. Electric vehicle routing with charging/discharging under time-variant electricity prices. Transp. Res. Part C Emerg. Technol. 2021, 130, 103285–113307. [Google Scholar] [CrossRef]
  36. Zhou, Y.; Huang, J.; Shi, J.; Wang, R.; Huang, K. The electric vehicle routing problem with partial recharge and vehicle recycling. Complex Intell. Syst. 2021, 7, 1445–1458. [Google Scholar] [CrossRef]
  37. Soysal, M.; Cimen, M.; Belbağ, S. Pickup and delivery with electric vehicles under stochastic battery depletion. Comput. Ind. Eng. 2020, 146, 106512–106526. [Google Scholar] [CrossRef]
  38. Lu, J.; Chen, Y.; Hao, J.K.; He, R. The time-dependent electric vehicle routing problem: Model and solution. Expert Syst. Appl. 2020, 161, 113593–113610. [Google Scholar] [CrossRef]
  39. Zhao, Z.; Li, X.; Zhou, X. Distribution route optimization for electric vehicles in urban cold chain logistics for fresh products under time-varying traffic conditions. Math. Probl. Eng. 2020, 2020, 9864935. [Google Scholar] [CrossRef]
  40. Yazır, O.A.; Koç, Ç.; Yücel, E. The multi-period home healthcare routing and scheduling problem with electric vehicles. OR Spectr. 2023, 45, 853–901. [Google Scholar] [CrossRef]
  41. Karakatič, S. Optimizing nonlinear charging times of electric vehicle routing with genetic algorithm. Expert Syst. Appl. 2021, 164, 114039–114053. [Google Scholar] [CrossRef]
  42. Yang, S.; Ning, L.; Tong, L.C.; Shang, P. Optimizing electric vehicle routing problems with mixed backhauls and recharging strategies in multi-dimensional representation network. Expert Syst. Appl. 2021, 176, 114804–114826. [Google Scholar] [CrossRef]
  43. Zhu, X.; Yan, R.; Huang, Z.; Wei, W.; Yang, J.; Kudratova, S. Logistic optimization for multi depots loading capacitated electric vehicle routing problem from low carbon perspective. IEEE Access 2020, 8, 31934–31947. [Google Scholar] [CrossRef]
  44. Küçükoğlu, I.; Dewil, R.; Cattrysse, D. The electric vehicle routing problem and its variations: A literature review. Comput. Ind. Eng. 2021, 161, 107650–107680. [Google Scholar] [CrossRef]
  45. Mavrovouniotis, M.; Menelaou, C.; Timotheou, S.; Ellinas, G.; Panayiotou, C.; Polycarpou, M. A benchmark test suite for the electric capacitated vehicle routing problem. In Proceedings of the 2020 IEEE Congress on Evolutionary Computation (CEC), Glasgow, UK, 19–24 July 2020; pp. 1–8. [Google Scholar]
  46. Li, J.; Wang, F.; He, Y. Electric vehicle routing problem with battery swapping considering energy consumption and carbon emissions. Sustainability 2020, 12, 10537. [Google Scholar] [CrossRef]
  47. Basso, R.; Kulcsár, B.; Sanchez-Diaz, I. Electric vehicle routing problem with machine learning for energy prediction. Transp. Res. Part B Methodol. 2021, 145, 24–55. [Google Scholar] [CrossRef]
  48. Ceselli, A.; Felipe, Á.; Ortuño, M.T.; Righini, G.; Tirado, G. A branch-and-cut-and-price algorithm for the electric vehicle routing problem with multiple technologies. Oper. Res. Forum 2021, 2, 8. [Google Scholar] [CrossRef]
  49. Jie, W.; Yang, J.; Zhang, M.; Huang, Y. The two-echelon capacitated electric vehicle routing problem with battery swapping stations: Formulation and efficient methodology. Eur. J. Oper. Res. 2019, 272, 879–904. [Google Scholar] [CrossRef]
  50. Ge, X.; Zhu, Z.; Jin, Y. Electric vehicle routing problems with stochastic demands and dynamic remedial measures. Math. Probl. Eng. 2020, 2020, 1–15. [Google Scholar] [CrossRef]
  51. Sayarshad, H.R.; Mahmoodian, V.; Gao, H.O. Non-myopic dynamic routing of electric taxis with battery swapping stations. Sustain. Cities Soc. 2020, 57, 102113–102127. [Google Scholar] [CrossRef]
  52. Mavrovouniotis, M.; Li, C.; Ellinas, G.; Polycarpou, M. Solving the Electric Capacitated Vehicle Routing Problem with Cargo Weight. In Proceedings of the 2022 IEEE Congress on Evolutionary Computation (CEC), Padua, Italy, 18–23 July 2022; pp. 1–8. [Google Scholar]
  53. Doush, I.A.; Al-Betar, M.A.; Awadallah, M.A.; Alyasseri, Z.A.A.; Makhadmeh, S.N.; El-Abd, M. Island neighboring heuristics harmony search algorithm for flow shop scheduling with blocking. Swarm Evol. Comput. 2022, 74, 101127–101140. [Google Scholar] [CrossRef]
  54. Pan, Q.K.; Suganthan, P.N.; Tasgetiren, M.F.; Liang, J.J. A self-adaptive global best harmony search algorithm for continuous optimization problems. Appl. Math. Comput. 2010, 216, 830–848. [Google Scholar] [CrossRef]
  55. Güven, A.F.; Yörükeren, N.; Samy, M.M. Design optimization of a stand-alone green energy system of university campus based on Jaya-Harmony Search and Ant Colony Optimization algorithms approaches. Energy 2022, 253, 124089–124104. [Google Scholar] [CrossRef]
  56. Li, G.; Wang, H. Improved harmony search algorithm for global optimization. In Proceedings of the 2018 Chinese Control and Decision Conference (CCDC), Shenyang, China, 9–11 June 2018; pp. 864–867. [Google Scholar]
  57. Jung, K.H.; Lee, J.H. Determination of an Optimal Parameter Combination for Single PEMFC Using the Taguchi Method and Orthogonal Array. Energies 2024, 17, 1690. [Google Scholar] [CrossRef]
  58. Shao, S.; Guan, W.; Bi, J. Electric vehicle-routing problem with charging demands and energy consumption. IET Intell. Transp. Syst. 2018, 12, 202–212. [Google Scholar] [CrossRef]
  59. Bernal, J.; Escobar, J.W.; Linfati, R. A simulated annealing-based approach for a real case study of vehicle routing problem with a heterogeneous fleet and time windows. Int. J. Shipp. Transp. Logist. 2021, 13, 185–204. [Google Scholar] [CrossRef]
  60. Alsattar, H.A.; Zaidan, A.A.; Zaidan, B.B. Novel meta-heuristic bald eagle search optimisation algorithm. Artif. Intell. Rev. 2020, 53, 2237–2264. [Google Scholar] [CrossRef]
  61. Zhang, X.; Yao, J.; Liao, Z.; Li, J. The electric vehicle routing problem with soft time windows and recharging stations in the reverse logistics. In Proceedings of the Twelfth International Conference on Management Science and Engineering Management, Melbourne, VIC, Australia, 1–4 August 2019; pp. 171–182. [Google Scholar]
  62. Janinhoff, L.; Klein, R.; Scholz, D. Multitrip vehicle routing with delivery options: A data-driven application to the parcel industry. OR Spectr. 2024, 46, 241–294. [Google Scholar] [CrossRef]
  63. Abdulaal, A.; Cintuglu, M.H.; Asfour, S.; Mohammed, O.A. Solving the multi variant EV routing problem incorporating V2G and G2V options. IEEE Trans. Transp. Electrif. 2016, 3, 238–248. [Google Scholar] [CrossRef]
  64. Yang, L.; Li, X.; Sun, M.; Sun, C. Hybrid policy-based reinforcement learning of adaptive energy management for the Energy transmission-constrained island group. IEEE Trans. Ind. Inform. 2023, 19, 10751–10762. [Google Scholar] [CrossRef]
  65. Li, Y.; Han, M.; Yang, Z.; Li, G. Coordinating flexible demand response and renewable uncertainties for scheduling of community integrated energy systems with an electric vehicle charging station: A bi-level approach. IEEE Trans. Sustain. Energy 2021, 12, 2321–2331. [Google Scholar] [CrossRef]
  66. Barco, J.; Guerra, A.; Munoz, L.; Quijano, N. Optimal routing and scheduling of charge for electric vehicles: A case study. Math. Probl. Eng. 2017, 2017, 1–17. [Google Scholar] [CrossRef]
  67. Abomazid, A.M.; El-Taweel, N.A.; Farag, H.E. Optimal energy management of hydrogen energy facility using integrated battery energy storage and solar photovoltaic systems. IEEE Trans. Sustain. Energy 2022, 13, 1457–1468. [Google Scholar] [CrossRef]
Figure 1. An illustration of EVRP.
Figure 1. An illustration of EVRP.
Energies 17 03716 g001
Figure 2. Harmony memory.
Figure 2. Harmony memory.
Energies 17 03716 g002
Figure 3. Graph of convergences of the Modified HSA vs. Traditional HSA.
Figure 3. Graph of convergences of the Modified HSA vs. Traditional HSA.
Energies 17 03716 g003
Figure 4. Algorithm overview.
Figure 4. Algorithm overview.
Energies 17 03716 g004
Figure 5. Assigning charging station node step.
Figure 5. Assigning charging station node step.
Energies 17 03716 g005
Figure 6. The route before optimizing the order in which the vehicle visits the charging station (left) and the same route after the charging optimization is performed (right).
Figure 6. The route before optimizing the order in which the vehicle visits the charging station (left) and the same route after the charging optimization is performed (right).
Energies 17 03716 g006
Figure 7. Main effect plots for small and large instances ((left) and (right), respectively).
Figure 7. Main effect plots for small and large instances ((left) and (right), respectively).
Energies 17 03716 g007
Figure 8. Performance algorithm in solution quality and computational time. ((left) and (right), respectively).
Figure 8. Performance algorithm in solution quality and computational time. ((left) and (right), respectively).
Energies 17 03716 g008
Table 1. Literature review on EVRPs with different heuristic algorithms.
Table 1. Literature review on EVRPs with different heuristic algorithms.
Heuristic AlgorithmLiterature
ACOJia et al., 2021 [7]
Mavrovouniotis et al., 2019 [8]
CSZhou and Tan, 2018 [9]
GALi et al., 2019 [10]
Ait-uahmed et al., 2014 [11]
Yang et al., 2015 [12]
Shao et al., 2017 [13]
Zhenfeng et al., 2017 [14]
Granada-Echeverri et al., 2020 [15]
ILSMontoya, 2016 [16]
Montoya et al., 2017 [17]
Penna et al., 2016 [18]
Zhang et al., 2018 [19]
LNSKeskin et al., 2021 [20]
Kouider et al., 2019a [21] and 2019b [22]
Löffler et al., 2020 [23]
Pelletier et al., 2019 [24]
Yang and Sun 2015 [25]
Zhang et al., 2018 and 2020 [19,26]
SARodríguez-Esparza et al., 2024 [27]
TSDing et al., 2015 [28]
Euchi and Yassine., 2023 [29]
Preis et al., 2012 [30]
Wang and Song 2015 [31]
Yang et al., 2015 [12]
Yang and Sun, 2015 [25]
Zhang et al., 2018 [19]
VNSGhobadi et al., 2021 [32]
Hof et al., 2017 [33]
Kancharla and Ramadurai, 2020 [34]
Lin et al., 2021 [35]
Zhou et al., 2021 [36]
Table 2. Notation used in EVRP mathematical model.
Table 2. Notation used in EVRP mathematical model.
NotationDescription
x i j equals to 1 if a vehicle travels from node i to node j; otherwise x i j = 0
Na set of nodes ( 0 I F )
Ia set of customer nodes
Fa set of charging station nodes
d i j the travel distance from node i to node j
u i remaining vehicle capacity when arriving at node i
u j remaining vehicle capacity when arriving at node j
u 0 remaining capacity at depot node {0}
Cthe vehicle capacity
δ j demand in node j
y i remaining battery capacity when arriving at node i
y j remaining battery capacity when arriving at node j
y 0 remaining battery capacity when arriving at depot node {0}
Q battery capacity
h i variable energy consumption rate
h i d i j energy consumption to travel from vertex i to vertex j.
Table 3. HSA parameter settings.
Table 3. HSA parameter settings.
ParametersValues
# of Neighboring Solutions100
HMS100
HMCRmax0.95
HMCRmin0.80
PARmax0.90
PARmin0.20
Table 4. Lf (44) orthogonal array.
Table 4. Lf (44) orthogonal array.
Experimental RunFactors (Levels)
F1 (4)F2 (4)F3 (4)F4 (4)
11111
21222
31333
41444
52123
62214
72341
82432
93134
103243
113312
123421
134142
144231
154324
164413
Model summary.
Table 5. Model summary.
Table 5. Model summary.
SR-SqR-Sq(adj)
4.2399.61%98.05%
Table 6. Analysis of variance (ANOVA) means.
Table 6. Analysis of variance (ANOVA) means.
SourceDFSeq SSAdj SSAdj MSFP
F135343.25343.191781.0699.520.002
F232393.22393.19797.7344.580.005
F33913.7913.69304.5617.020.022
F435059.75059.691686.5694.240.002
Residual Error353.753.6917.90
Total1513,763.4
Table 7. Proposed HSA results on small instances.
Table 7. Proposed HSA results on small instances.
Proposed HSA
Benchmark InstanceBestMean ± StdevWorsttavg (s)
E-n29-k4-s7383(4)384 ± 2.8839012
E-n30-k3-s7577(3)581 ± 3.3958418
E-n35-k3-s5527(4)535 ± 5.3854222
E-n37-k4-s4853(4)860 ± 3.6386636
E-n60-k5-s9564(5)579 ± 7.7759082
F-n49-k4-s4729(4)736 ± 1.7173685
Table 8. Proposed HSA results on large instances.
Table 8. Proposed HSA results on large instances.
Proposed HSA
Benchmark InstanceBestMean ± StdevWorsttavg (s)
E-n89-k7-s13739(7)749.3 ± 7.0765154
E-n112-k8-s11885(8)901.4 ± 17.7943223
M-n110-k10-s9842(10)844.5 ± 3.5850176
M-n126-k7-s51116(8)1128.5 ± 6.81141194
M-n163-k12-s121144(12)1184.5 ± 22.91223221
M-n212-k16-s121457(17)1494.1 ± 23.01546245
F-n80-k4-s8257(4)272.4 ± 4.8281141
F-n140-k7-s51268(7)1304.2 ± 15.51326219
X-n147-k7-s417,655(7)17,967.4 ± 145.318,199193
X-n221-k11-s712,637(12)13,010.3 ± 222.913,364231
X-n360-k40-s928,425(43)29,069.2 ± 254.329,414720
X-n469-k26-s1027,133(27)28,238.9 ± 462.328,8311246
X-n577-k30-s457,577(32)57,960.5 ± 266.658,3261842
X-n698-k75-s1378,260(80)78,493.2 ± 299.679,0153617
X-n759-k98-s1086,186(104)86,597.08 ± 337.987,1254254
X-n830-k171-s11170,126(174)170,794.07 ± 649.3172,1364839
X-n920-k207-s4352,103(211)351,873.55 ± 582.1353,1575488
X-n1006-k43-s581,021(45)81,211.75 ± 343.282,1876248
Table 9. Comparison of HSA results on small instances.
Table 9. Comparison of HSA results on small instances.
Previous StudiesProposed HSA
Benchmark InstanceMMAS [45]MMAS+ls [52]Gap to MMAS (%)Gap to MMAS+ls (%)
E-n29-k4-s7383(4)383(4)0.000.00
E-n30-k3-s7582(3)577(3)−0.860.00
E-n35-k3-s5530(4)527(3)−0.570.00
E-n37-k4-s4865(4)857(4)−1.39−0.47
E-n60-k5-s9544(5)537(5)3.685.03
F-n49-k4-s4769(4)746(4)−5.20−2.28
Average−0.722.28
Table 10. Comparison of HSA results on large instances.
Table 10. Comparison of HSA results on large instances.
Previous StudiesProposed HSA
Benchmark InstanceMMAS [45]MMAS+ls [52]Gap to MMAS (%)Gap to MMAS+ls (%)
E-n89-k7-s13724(7)711(7)2.03.9
E-n112-k8-s11860(8)845(8)2.94.7
M-n110-k10-s9914(10)876(10)−7.8−3.9
M-n126-k7-s51099(7)1094(7)1.52.0
M-n163-k12-s121109(12)1088(12)3.15.1
M-n212-k16-s121398(17)1386(17)4.25.1
F-n80-k4-s8240(4)239(4)7.07.5
F-n140-k7-s51229(7)1210(7)3.14.7
X-n147-k7-s417,704(5)17,345(7)−0.21.7
X-n221-k11-s712,235(12)12,130(12)3.24.1
X-n360-k40-s927,701(41)27,327(41)2.64.0
X-n469-k26-s1026,881(26)26,763(27)0.91.3
X-n577-k30-s455,266(30)54,779(30)4.15.1
X-n698-k75-s1375,048(77)74,818(78)4.24.6
X-n759-k98-s1084,996(101)83,204(100)1.43.5
X-n830-k171-s11167,575(181)166,593(179)1.52.1
X-n920-k207-s4345,214(216)341,599(214)2.03.0
X-n1006-k43-s580,765(43)79,635(43)0.31.7
Average2.03.3
Table 11. Comparison of HSA number of charges on small instances.
Table 11. Comparison of HSA number of charges on small instances.
Benchmark InstanceProposed HSAMMAS+ls [52]
Recharging OccurrencesRecharging
Time (Minutes)
Recharging OccurrencesRecharging
Time (Minutes)
E-n29-k4-s741204120
E-n30-k3-s73905150
E-n35-k3-s53904120
E-n37-k4-s42604120
E-n60-k5-s961807210
F-n49-k4-s4130130
Max61807210
Min130130
Average3.17954.17125
Standard Deviation1.7251.671.9458.22
Table 12. Comparison of HSA number of charges on large instances.
Table 12. Comparison of HSA number of charges on large instances.
Benchmark InstanceProposed HSAMMAS+ls [52]
Recharging OccurrencesRecharging
Time (Minutes)
Recharging OccurrencesRecharging
Time (Minutes)
E-n89-k7-s139.2708240
E-n112-k8-s1172107210
M-n110-k10-s951506180
M-n126-k7-s541204120
M-n163-k12-s12618010300
M-n212-k16-s121133012360
F-n80-k4-s841205150
F-n140-k7-s5390260
X-n147-k7-s451505150
X-n221-k11-s792708240
X-n360-k40-s982409270
X-n469-k26-s101442016480
X-n577-k30-s43090032960
X-n698-k75-s13431290451350
X-n759-k98-s10451350471410
X-n830-k171-s11942820972910
X-n920-k207-s4762280762280
X-n1006-k43-s52472027810
Max942820972910
Min390260
Average22.05268.9123.11294.81
Standard Deviation26.48252.7927.03279.47
Table 13. Summary of improvements in all objectives.
Table 13. Summary of improvements in all objectives.
Improvement in Total Distance
Instance SizeGap to MMAS+ls [52]
Small Instancesaverage gap 2.2%
Large Instancesaverage gap 3.3%
Improvement in Number of Charges
Instance SizeGap to MMAS+ls [52]
Small InstancesImproved by reducing 6 visits
Large InstancesImproved by reducing 19 visits
Improvement in Total Time
Instance SizeGap to MMAS+ls [52]
Small Instancesaverage gap −24.0%
Large Instancesaverage gap −4.5%
Table 14. Comparison of Modified HSA and MILP in small instances.
Table 14. Comparison of Modified HSA and MILP in small instances.
Modified HSAMILP
Benchmark InstanceObjective Functiontavg (s)Upper Bound (UB)tavg (s)
E-n29-k4-s7383(4)12383(4)734
E-n30-k3-s7577(3)18577(3)1753
E-n35-k3-s5527(4)22527(4)4183
E-n37-k4-s4853(4)36854(4)6327
E-n60-k5-s9564(5)82582(5)10,800
F-n49-k4-s4729(4)85735(4)10,800
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Minanda, V.; Liang, Y.-C.; Chen, A.H.L.; Gunawan, A. Application of an Improved Harmony Search Algorithm on Electric Vehicle Routing Problems. Energies 2024, 17, 3716. https://doi.org/10.3390/en17153716

AMA Style

Minanda V, Liang Y-C, Chen AHL, Gunawan A. Application of an Improved Harmony Search Algorithm on Electric Vehicle Routing Problems. Energies. 2024; 17(15):3716. https://doi.org/10.3390/en17153716

Chicago/Turabian Style

Minanda, Vanny, Yun-Chia Liang, Angela H. L. Chen, and Aldy Gunawan. 2024. "Application of an Improved Harmony Search Algorithm on Electric Vehicle Routing Problems" Energies 17, no. 15: 3716. https://doi.org/10.3390/en17153716

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop