Table of Contents Author Guidelines Submit a Manuscript
Scientific Programming
Volume 2017, Article ID 1021432, 13 pages
Research Article

A Modified Harmony Search Algorithm for Solving the Dynamic Vehicle Routing Problem with Time Windows

Department of Information Science and Technology, Dalian Maritime University, Dalian 116026, China

Correspondence should be addressed to Rong Chen; nc.ude.umld@nehcr

Received 19 April 2017; Accepted 2 November 2017; Published 28 November 2017

Academic Editor: Emiliano Tramontana

Copyright © 2017 Shifeng Chen et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.


The Vehicle Routing Problem (VRP) is a classical combinatorial optimization problem. It is usually modelled in a static fashion; however, in practice, new requests by customers arrive after the initial workday plan is in progress. In this case, routes must be replanned dynamically. This paper investigates the Dynamic Vehicle Routing Problem with Time Windows (DVRPTW) in which customers’ requests either can be known at the beginning of working day or occur dynamically over time. We propose a hybrid heuristic algorithm that combines the harmony search (HS) algorithm and the Variable Neighbourhood Descent (VND) algorithm. It uses the HS to provide global exploration capabilities and uses the VND for its local search capability. In order to prevent premature convergence of the solution, we evaluate the population diversity by using entropy. Computational results on the Lackner benchmark problems show that the proposed algorithm is competitive with the best existing algorithms from the literature.

1. Introduction

The Vehicle Routing Problem (VRP) was first introduced in 1959 [1]. Since then, it has become a central research problem in the field of operation research and is also an important application in the areas of transportation, distribution, and logistics. The problem involves a depot, some customers, and some cargo. The cargo must be delivered from a central depot to customers at various locations using several vehicles. This is a combinatorial optimization problem in which the goal is to find an optimal solution that satisfies the service requirements, routing restrictions, and vehicle constraints.

DVRPs have been a vital research area for last 3 decades. Thanks to recent advances in information and communication technologies, vehicle fleets can now be managed in real time. In this context, Dynamic Vehicle Routing Problems (DVRPs) are becoming increasingly important [24]. A variety of aspects is addressed by numerous approaches. Early research on DVRP can be found in Psaraftis’s work [5]. They proposed a dynamic programming approach. Bertsimas and Van Ryzin [6] considered a DVRP model with a single vehicle and no capacity restrictions where requests appear randomly. They characterized the problem by a generic mathematical model that regarded waiting time as the objective function. Regarding DVRPTW, Chen and Xu [7] proposed a dynamic column generation algorithm for the DVRPTWs based on their notion of decision epochs over the planning horizon, which indicate the best times of the day to execute the reoptimization process. de Oliveira et al. [8] addressed the issue that arises with customers whose demands take place in real time in the DVRPTW and a capacitated fleet. Their solution was obtained through a metaheuristic approach using an ant colony system. Hong [9] also considered time windows and the fact that some requests may be urgent. This work adopted a continuous reoptimization approach and used a large neighbourhood search algorithm. When a new request arrives, it is immediately considered to be included in the current solution; therefore, it runs the large neighbourhood search again to obtain a new solution. de Armas and Melián-Batista [10] tackled a DVRPTW with several real-world constraints. Similar to Hong’s work, they also adopted a continuous reoptimization approach, but they calculated solutions using a variable neighbourhood search algorithm. In some recent surveys, Pillac et al. [11] classify routing problems from the perspective of information quality and evolution. They introduce the notion of degree of dynamism and present a comprehensive review of applications and solution methods for dynamic vehicle routing problems. Bekta et al. [12] provide another survey in this area; they provide a deeper and more detailed analysis. Last but not least, Psaraftis et al. [13] shed more light into work in this area over more than 3 decades by developing a taxonomy of DVRP papers according to 11 criteria.

As we know, for large-scaled DVRPTW, it is very difficult to develop exact methods to solve this type of problem. The majority of the existing studies deal with the metaheuristics and intelligent optimization algorithms. Harmony Search (HS) algorithm is a metaheuristic algorithm, developed in [14]. This algorithm imitates the behaviors of musical improvisation process. The musician adjusts the resultant tones with the rest of the band, relying on his own memory in the music creation, and finally the tones reach a wonderful harmony state. Similarly, it has been successfully employed by many researchers to solve various complex problems such as university course scheduling [15, 16], nurse rostering [17], water network design [18], and the Sudoku puzzle [19]. Due to its optimization ability, the HS algorithm has also been employed as a search framework to solve VRPs. To solve the Green VRP (an extension of the classic VRP), Kawtummachai and Shohdohji [20] presented a hybrid algorithm based on the HS algorithm in which the HS is hybridized by a local improvement process. They tested the proposed algorithm with a real case from a retail company, and the results indicated that the method could be applied effectively to the case study. Moreover, Pichpibul and Kawtummachai [21] presented a modified HS algorithm for the capacitated VRP and incorporated the probabilistic Clarke-Wright savings algorithm into the harmony memory mechanism to achieve better initial solutions. Then, the roulette wheel selection procedure was employed with the harmony improvisation mechanism to improve its selection strategy. The results showed that the modified HS algorithm is competitive with the best existing algorithms. Recently, Yassen et al. [22] proposed a meta-HS algorithm (meta-HAS) to solve the VRPTW. The results of comparisons confirmed that the meta-HS produces results that are competitive with other proposed methods.

As described above, the HS algorithm has been successfully applied to solve standard VRPs but has not been applied to solve dynamic VRPs. Solving a dynamic VRP is usually more complex than solving the corresponding standard VRP, as we should solve more than one VRP when we deal with dynamic requests. It is well-known that minimizing travel distances of standard VRPs is NP-hard in the general case, so solving dynamic VRPs with the same objective function is also a hard computational task. In this paper, we propose a Modified Harmony Search (MHS) algorithm to solve the DVRPTW. It is related to the static VRPTW, as it can be described as a routing problem in which information about the problem can change during the working day. It is a discrete-time dynamic problem and can be viewed as a series of static VRPTW problem. Therefore, the MHS algorithm we proposed includes two parts: one is the static problem optimization; we combine the basic HS algorithm with the Variable Neighbourhood Descent (VND) algorithm, with the goal of achieving the benefits of both approaches to enhance searching. The combined HSVND algorithm distinguishes itself in three aspects: first, the encoding of harmony memory has been improved based on the characteristics of routing in VRPs. Second, this augmented HS was hybridized with an enhanced VND method to coordinate search diversification and intensification effectively. In this scheme, four neighbourhood structures were proposed. Third, in order to prevent premature convergence of the solution, we evaluate the population diversity by using entropy. The other is the dynamic customer check and insertion. Four rules were employed within the DVRPTW that address the insertion of dynamic requests into the DVRPTW. Furthermore, the MHS is verified for practical implementation by using a comparison study with other recently proposed approaches. The results show that our algorithm performs better than the compared algorithms; its average refusal rate was smallest among the three compared algorithms. Moreover, travel distances computed by our algorithm were also best in 29 out of 30 instances.

The remainder of this paper is structured as follows. The next section provides a formal mathematical model of DVRP. The notations are briefly described in Section 2. Section 3 describes the main framework and details the development of the HSVND algorithm for DVRP. The experimental setting and results are presented in Section 4. Finally, Section 5 summarizes the major conclusions of this article and recommends some possible directions for future research.

2. Problem Definition

The DVRPTW can be mathematically modelled by an undirected graph , where is the set of vertices including the depot () and the customers , also called requests, orders, or demands and is the set of edges between each pair of vertices. Each vertex has several nonnegative weights associated with it, namely, a request time , a location coordinates , the demand , service time , and an earliest and latest , possible start time for the service, which define a time window , while is the service time range. At the same time, each edge is associated a travel time and a travel distance .

A total number of customers are to be served by fixed size fleet of identical vehicles, each vehicle has associated with a nonnegative capacity . Every customer has arrival time and begin service time . Particularly, the vehicle is only allowed to start the service no earlier than the earliest service time , . In other words, if a vehicle arrives earlier than , it must wait until . The customers can be divided into two groups, static customers () and dynamic customers (), according to the time at which the customers made their requests. Customers in whose locations and demands are known at the beginning of the planning horizon (i.e., time 0), are also called priority customers because they must be serviced within the current day. The locations and demands of customers who belong to set will be known only at the time of the order request. These customers call in requesting on-site service over time.

The objective is to accept as many requests as possible while finding a feasible set of routes with the minimum total travelled distance. The goal we consider here is a hierarchical approach, which is similar to the goal defined in [10]. The objective functions are considered in a lexicographic order as follows.(i)Number of refused customers.(ii)Total travelled distance.(iii)Total number of routes.

Note that [10] included 7 objective functions: total infeasibility (Sum of the hours that the customers’ time windows are exceeded), number of postponed services, number of extra hours (sum of hours that vehicles’ working shifts are exceeded), number of extra hours (sum of the hours that the vehicles’ working shifts are exceeded), total travelled distance, total number of routes, and time balance (difference between the longest and shortest route time made by one vehicle regarding time). They regarded the time windows as soft constraints; consequently, they needed to consider these additional objective functions. In contrast, because we regarded the time windows as hard constraints, the objective functions related to time windows could be removed.

The DVRPTW can be modelled by the following formulas. First, we introduce three binary decision variables , , and , which are defined as follows: = 1 if edge is travelled by vehicle and 0 otherwise. = 1 if vehicle is used and 0 otherwise. = 1 if the dynamic customer is accepted.

Then the main objective can be described as in the following formula:where is the vehicles arrival time at the customer and is the actual start time of , so as (9) stated. In addition, for each customer , let indicate the reverse arrival time, defined as (10).

The objective function (1) minimizes the number of refused customers, (2) aims to minimize the travel distance, and (3) minimizes the total number of routes. Eq. (4) is a flow conservation constraint: each customer must have its in-degree equal to its out-degree, which is at most one. Eq. (5) ensures that each customer must be visited by exactly one vehicle. Eq. (6) ensures that every route starts and ends the central depot. Eq. (7) specifies the capacity of each vehicle. Eq. (8)–(11) define the time windows. Finally, (12) imposes restrictions on the decision variables.

The degree of dynamism of a problem (Dod) [23] is defined to represent how many dynamic requests occur in a problem. Let and be the number of static and dynamic requests, respectively. Then, the Dod is described as follows:where Dod varies between 0 and 1. When Dod is equal to 0, all the requests are known in advance (static problem), whereas when it is equal to 1, all the requests are dynamic.

3. Solution Approach

In this section, we present a metaheuristic algorithm to solve the DVRPTW. First, we introduce the framework of the heuristic algorithm to show how it can solve DVRPTWs interactively. Then, we discuss the details of the proposed harmony search-based algorithm, including its initialization, the way it improvises new solutions, and its VND-based local search method. Finally, we present some strategies used to accommodate dynamic requests.

3.1. The Framework of the General Algorithm

The general algorithm to solve a DVRPTW interactively is summarized in Algorithm 1. First, the routes and deliveries to the static customers are solved by HSVND, which is our proposed harmony search-based algorithm described in Section 3.2. HSVND will return the best solution found, in which all the static customers have been inserted into routes. Consequently, the fleet can start to deliver goods for the customers based on the routes found in this solution. Then, dynamic customers submit requests. When a new dynamic customer request occurs, the algorithm will immediately check the feasibility of servicing the request Algorithm 3 (discussed in Section 3.3). If the request is acceptable, it then invokes the HSVND again to rearrange all the known customer requests that have not been serviced so far. Otherwise, the request will be rejected. This dynamic procedure is repeated until there are no new requests. Then, the entire solution including service for all static and dynamic customers’ requests will be returned by the general algorithm.

Algorithm 1: General algorithm-MHS.

The following subsections discuss the HSVND algorithm and the method for inserting dynamic customer requests in more detail.

3.2. The Framework of HSVND

In this section, we describe the core of the MHS that incorporates two known methods: the harmony search (HS) algorithm and the Variable Neighbourhood Descent (VND) algorithm. This hybrid algorithm, called HSVND, benefits from the strengths of both HS and VND; the HS has high global search capability while the VND excels at local search.

The HS algorithm was proposed by Geem et al. [14] based on the way musicians improvise new harmonies in memory. HS is a population-based evolutionary algorithm in which the solutions are represented by the harmonies and the population is represented by harmony memory. The HS is an iterative process that starts with a set of initial solutions stored in harmony memory (HM). Each iteration generates a new solution, and then the objective function is used to evaluate the quality of the new solution. The HS method will replace the worst solution with the new solution if the new solution is of better quality than the worst solution in HM. This process repeats until a predetermined termination criterion is met. The pseudocode of the HSVND is given in Algorithm 2.

Algorithm 2: HSVND .
Algorithm 3: VND .

The HSVND algorithm consists of the following six steps: initialization, evaluation, improvising a new solution from the HM, local searching by VND, updating the HM, and checking the termination criteria. After initialization, the hybrid algorithm improves solutions iteratively until a termination criterion is satisfied. The following subsections explain each step in the HSVND algorithm in detail.

3.2.1. Initialization

During initialization, the parameters for HS are initialized first. These parameters are (i) the Harmony Memory Size (HMS), which determines the number of initial solutions in HM; (ii) Harmony Memory Consideration Rate (HMCR), which determines the rate at which values are selected from HM solutions; (iii) Pitch Adjustment Rate (PAR), which determines the rate of local improvement; and (iv) the number of improvisations (NI), which corresponds to the maximum number of iterations allowed for improving the solution. Next, the initial solution population will be generated randomly and stored in the HM. These solutions are sorted in ascending order with respect to their objective function values.

The population is also initialized. HM is represented by a matrix of three dimensions. The rows contain a set of solutions, and the columns contain the vehicles (routes) for each solution . Each vehicle route can be considered as a sequence of customers , where and represent the depot. In classical HS, the dimensions of each harmony in HM must be the same [14]. In our study, a harmony represents a set containing vehicles (routes). Therefore, the dimension of each harmony in HM can be different, as shown inwhere is the total number of vehicles in solution .

In DVRP, a decision of waiting or moving should be made when a vehicle finishes servicing a customer. In this paper, we introduce an Anticipatory Waiting strategy. Assume that the actual time is . Vehicle has finished serving customer and is ready to serve the next customer . We allow the vehicle to wait at the location until . Consequently, the vehicle will be waiting at the current location, when

Solutions in the population are constructed by generating vehicle routes iteratively. The algorithm sequentially opens routes and fills them with customers until no more customers can be inserted while still keeping the routes feasible. More precisely, the procedure chooses an unrouted customer and tries to insert it into the current route to generate a feasible route that includes the customer. This step will be repeated as long as customers can be inserted into the route without violating any constraint. When this is no longer possible, the route is closed and added to the solution and the procedure continues with the next vehicle route until all the customers have been inserted into the solution.

3.2.2. Evaluating Population Entropy

The diversity of the harmony is set according to the population entropy, and it is defined as follows:where HMS is the harmony memory size, is the objective function value of th harmony, and is normalized population entropy. In each generation, after updating HM, the population entropy is computed. If the population entropy increase or remains constant, it would certainly have taken place in premature convergence. Then, the best harmony will retain. For the others, it counts its frequency in the HM, removes the highest frequency of harmonies, and then generates new harmonies.

3.2.3. Improvising a New Solution

A new solution is improvised based on three rules: (i) random selection, (ii) memory consideration, and (iii) pitch adjustment. The random selection rule allows vehicle to choose a route from the whole search range randomly. In addition to random selection, vehicle can take the route from previous routes for the same vehicle stored in HM such that . After a new pitch (route) is generated from memory, it is further considered to determine whether a pitch adjustment is required. Specifically, the new solution is generated as follows: first, create an empty solution ; next, generate a random number in the range . If is less than the HMCR, choose one route from HM and add it to . Otherwise, generate new route randomly and append it to . Specifically, new pitches (routes) are generated as follows.

When a new route is selected from the HM, it is adjusted at the probability PAR by a local search, where . We produce a random number between 0 and 1. If is smaller than the PAR, then the current route will be modified via a randomly selected neighbouring strategy. The improvisation process ends when the number of vehicles in the new solution is equal to the smallest one stored in HM. For DVRP, different neighbourhood structures have been used to improve the routes locally. Hence, we used three neighbourhood search methods as follows.

Shift. This operation selects a customer randomly and moves it from its current position to a new random position in the same route. For example, in Figure 1(b), customer 2 was selected and moved after the 6th customer.

Figure 1: Pitch-adjusted neighbourhood structures.

Exchange. This operation selects two customers randomly and exchanges their positions in the same route. In Figure 1(c), the positions of customers 2 and 6 were swapped.

Invert. This operation selects two customers randomly and inverts a subsequence between them in the same route. In Figure 1(d), edges (1, 2) and (6, 7) were deleted and edges (1, 6) and (2, 7) were linked; thus, the subsequence from 2 to 6 was inverted.

Note that any local change leading to an infeasible route will be discarded; only feasible routes are accepted. Each of neighbourhood structure is controlled by a specific PAR range as follows:

As Figure 1 shows, the new solution may be infeasible because some customers may be missed or repeated. Therefore, after a new solution is produced during the improvisation process, we must check its feasibility. A repair technique is utilized to transform an infeasible solution into a feasible solution using the following two steps: first, we identify customers who are neither scheduled nor replicated in the new solution. Then, we delete any repeated customers from the old route and, finally, either assign the missed customers to any route that can accept them or generate a new route for them.

3.2.4. The VND Method

After improvising a new solution, we use the VND method to further optimize the solution. To make the VND method available for a DVRPTW, it is necessary to define appropriate neighbourhood structures for DVRPTW solutions. We propose four different neighbourhood structures as follows.

Swap. Select one customer from a route and another customer from another route and then swap them (see Figure 2(a)).

Figure 2: Neighbourhood structures.

2-Opt. Choose two routes and exchange the last parts of both routes after choosing two selection points, one from each route (see Figure 2(b)).

String-Exchange. Select a subsequence of customers from one route and another subsequence of customers from another route and exchange both subsequences (where represents the maximum length of the subsequences) (see Figure 2(c)).

Relocation. Delete one customer from one route and insert it into another route (see Figure 2(d)).

The proposed VND method is shown in Algorithm 3, starting with the first structure . In each iteration, the algorithm finds a solution in the current neighbourhood structure with the smallest objective function value (line ). In the evaluation step, if , then solution becomes the next incumbent solution (line ) and the algorithm continues to use (line ); otherwise, it explores the next neighbourhood structure (line ). When the last structure, , has been applied and no further improvements are possible, the VND method is terminated and returns the final local optimal solution.

3.2.5. Updating the HM

The new solution is substituted and added to the HM if it is better than the worst harmony solution in HM in terms of the objective function value. Otherwise, the newly created solution is rejected. Then, the HM is sorted again by objective function value.

3.2.6. Checking the Termination Criteria

The procedures of the HS continue until a termination criterion is satisfied. We employed three termination criteria: reaching the maximum number of improvisations (NI), no improvement occurred after a certain number of improvisations (CUIN), and the best solution in HM reached a certain value (CBS). It will stop if one of the termination criteria is satisfied.

3.3. Inserting Dynamic Requests

Required information about a dynamic request such as its customer location and time window is acquired when the request arrives. Moreover, at a given time point, vehicles may either be servicing a customer, waiting for a customer, or moving towards the next customer. Our DVRPTW algorithm should first determine whether requests arriving at this time point can be accepted and, if so, which vehicles and which time points can service them. The algorithm should reject requests for which no vehicle can be scheduled to service them. To decide to accept or reject a request, we shall discuss some insertion rules.

Rule 1 (time window constraints). Suppose customer requests service at time , and vehicle is visiting customer or is on the way to visit that customer based on the planned route r. For the new request to be inserted into the solution, it must satisfy at least one vehicle or schedule a new vehicle that can arrive at before the end of the customer’s time window. The rule is expressed as follows:or

Rule 2 (capacity constraints). A customer can be inserted into route (assume it is served by vehicle ) if it does not violate vehicle ’s capacity constraint. The rule to check this condition is expressed as follows:

Rule 3 (direct insert). A new customer can be inserted between customers and in route if it allows the vehicle to arrive at before the end of its time window and also services after the beginning of its time window. The rule is expressed as follows:

Rule 4 (split insert). This rule governs the condition when customer cannot be inserted at any position in route ; however, if route is split into two routes ( and ) and the customer can be inserted into either of these two new routes (using Rules 3 and 4), then the customer can be accepted. A route can be split into and if

Algorithm 4 describes how dynamic requests can be inserted in a route.

Algorithm 4: Check Requests ().

4. Experimental Results

This section shows the computational results obtained from intensive experiments using the proposed HSVND. We implemented the HSVND using the C# programming language compiled for the  .NET Framework 4.5 and executed all the experiments on a PC with an Intel® Pentium® CPU G645 processor clocked at 2.90 GHz with 2 GB of RAM running the Windows 7 operating system.

The experiments were performed on the Lackner benchmark, which originated from the standard Solomon benchmark. In this benchmark, 100 customers are distributed in a Euclidean plane over 100 × 100 square areas, where travel times between customers equal the corresponding distances. The benchmark is divided into six groups, named R1, R2, C1, C2, RC1, and RC2, respectively. Each group contains 8 to 12 instances, so there are 56 instances in total. To accommodate the dynamic portion of the test, each instance is associated with one of five different degrees of dynamism, 10%, 30%, 50%, 70%, and 90%, respectively. In the following experiments, we label each instance using the notation “Group-Index-Dod,” where Group is the group name that instance belongs to, Index is its index within the group (using two Arabic numerals), and Dod is its dynamic degree value. For example, the label “R1-05-70” denotes the fifth instance in group R1, and that instance contains 70 dynamic customers.

4.1. Parameter Settings

This subsection investigates the HSVND parameters HMS, HMCR, and PAR, as well as the convergence speed. We randomly selected 15 instances for these experiments. They are “C1-01-50,” “C1-05-90,” “C2-01-30,” “C2-07-10,” “R1-03-30,” “R1-09-70,” “R1-03-10,” “R2-03-50,” “R2-06-10,” “R2-09-70,” “RC1-04-50,” “RC1-06-90,” “RC2-02-70,” “RC2-03-90,” and “RC2-08-30.” For each instance, 10 independent runs were carried out. Because we split the DVRP into a series of static VRPs during the solving process, we only user the static customers at the beginning of the planning horizon () in all experiments, and we set the termination condition of the algorithm to consider only the maximum number of improvisations (NI = 1000). Tables 13 show the results of the optimization of the objective functions using different settings for HMS, HMCR, and PAR.

Table 1: The mean results of the HSVND with different HMS values.
Table 2: The mean results of the HSVND with different HMCR values.
Table 3: The effect of the PAR on the mean function optimization.

The results in Table 1 demonstrate that the performance of the HSVND depends on the size of the HM: the larger the HMS is, the better the mean results are. Consequently, using larger values for HMS can achieve better solutions with lower objective function values. This may occur because having a larger number of solutions in the HM provides better shift patterns that are more likely to be combined into good new solutions. Therefore, HMS = 30 is chosen for all benchmark instances.

As listed in Table 2, the performance of the proposed algorithm degrades when increasing the number of random selections when HMCR values are below 0.8. However, perturbation is necessary to bring diversity to the HM and avoid local minima. Therefore, we suggest a value of 0.8 for the HMCR based on the experimental results.

Table 3 shows that small PAR values reduce the convergence rate of the HSVND. Based on the experimental results, we suggest using PAR values greater than 0.6.

We also evaluated the convergence speed of the HSVND. In this experiment, we set HMS = 30, HMCR = 0.8, and PAR = 0.6 as described above. In the same way as the previous experiments, for each instance we ran the HSVND 10 times and terminated it after a maximum of NI = 1000 iterations. The maximum and average of the Continuous Unimproved Iteration Number (CUIN) and the Count of Best Solutions (CBS) are reported in Table 4, where CUIN indicates the number of iterations required to find the next local optimal solution from the current local optimal solution. During this period between the current best solution and the next one, CBS is defined as the number of solutions found that have the same objective value as the current best solution.

Table 4: The maximum and average of CUIN and CBS.

From Table 4, it can be seen that, on average, the HSVND requires at least 13 iterations to find a new local optimal solution, while, at most, it requires 150 iterations. During the search, it finds at least one solution and, at most, finds 7 solutions with the same objective value. Consequently, we set the other termination conditions as follows: CUIN = 200 and CBS = 10.

4.2. Comparison with Existing Algorithms

To assess the performance of the proposed HSVND algorithm, we ran the algorithm on the Lackner benchmark instances and compared it with two existing methods: ILNS [9] and GVNS [10]. Comparisons were made concerning these algorithms based on the ratios of refused service, the number of vehicles required, and the total distance travelled. To collect the experimental data, ten separate runs were performed for each instance and for each degree of dynamism from the Lackner benchmark. We recorded the best execution from the ten runs and calculated average values for each group. Items in boldface text in these tables indicate matches with the current best-known solution. We set the HS parameters as follows: HMS = 30, HMCR = 0.8, PAR = 0.6, NI = 1000, CUIN = 200, and CBS = 10. Table 5 lists the comparison results, where the first column indicates the group of instances (), the second column shows the degrees of dynamism (), and the other columns show the average number of vehicles, average total distance, average insertion time, and the refusal ratio, respectively. The last two rows of this table list the overall average results obtained by the different methods and the characteristics of the computers on which the algorithms were executed.

Table 5: Comparison of the experimental results of the proposed method with other methods.

As shown in Table 5, HSVND outperforms other methods on average. First, HSVND obtains the smallest average refusal ratio, 0.46%, whereas ILNS refused 0.50%, and GVNS refused 0.61%. Both HSVND and GVNS were able to service all requests for groups R2, C2, and RC2; consequently, they obtained the same refusal ratio (i.e., 0.00%). HSVND performed better than GVNS for groups R1 and RC1 with respect to the refusal ratio while GVNS performed best for the C1 group. On average, ILNS achieves a better refusal ratio than GVNS. The average number of vehicles required by our algorithm is lower than that of GVNS but slightly larger than that of ILNS. The average number of vehicles is 8.58, 8.50, and 8.88 for HSVND, ILNS, and GVNS, respectively. However, HSVND revealed good performance in finding short distances; its average distance was 1030.28, while the average distances of ILNS and GVNS were 1100.62 and 1098.40, respectively. Note that HSVND was the best at optimizing travel distances among the three algorithms for all groups. Overall average insertion time also indicates that our proposed algorithm improves on the others; however, note that the computational environments under which the algorithms were executed are different.

Similar to the evaluation performed for GVNS, we also calculated the average performance of 10 executions for each customer and compared that with GVNS, as shown in Table 6. HSVND improved on GVNS in terms of the avg. total distance in all cases. There are 7 types, and HSVND outperformed GVNS completely on refusal ratio, avg. number of vehicles, and avg. total distance. When the refusal ratio remains constant, there are 10 types for which HSVND can find a better solution than GVNS.

Table 6: The average performance comparison of HSVND and GVNS.

Overall, our results demonstrate that HS achieved good results compared with the existing methods as our algorithm has the ability to strike a good balance between diversification and intensification for the DVRPTWs.

5. Conclusions

In this paper, we have proposed a Modified Harmony Search for DVRPTW, called MHS, which is based on HS algorithm. First of all, the encoding of harmony memory has been improved based on the characteristics of routing in VRPs. Secondly, in order to provide an effective balance between the global diversification and local intensification, an enhanced basic Variable Neighbourhood Descent (VND) is incorporated into the iterative HS. Thirdly, improvisation of a new harmony has also been improved. In this procedure, in order to prevent premature convergence of the solution, we evaluate the population diversity by using entropy. Finally, when dynamic requests arrive, five rules were employed within the DVRPTW that address the insertion of dynamic requests into the DVRPTW. In order to verify the efficiency of our approach, we carried out some numerical experiments by using standard benchmarks. Results are analyzed intensively by comparing with recently proposed algorithms. The comparison results show that the proposed MHS algorithm can obtain better solutions than other existing algorithms. There are several interesting future research subjects to explore. One of them can be adapting the MHS heuristic for solving other dynamic vehicle problems. Another prospective research may focus on extending the DVRPTW by introducing some realistic aspects and constraints.

Conflicts of Interest

The authors declare no conflicts of interest.


This research was partly supported by the National Natural Science Foundation of China (no. 61402070, no. 61672122, and no. 61602077), the Natural Science Foundation of Liaoning Province of China (no. 2015020023), the Educational Commission of Liaoning Province of China (no. L2015060), and the Fundamental Research Funds for the Central Universities (no. 3132016348, no. 3132017125). This support is gratefully acknowledged.


  1. G. B. Dantzig and J. H. Ramser, “The truck dispatching problem,” Management Science, vol. 6, no. 1, pp. 80–91, 1959. View at Publisher · View at Google Scholar · View at MathSciNet
  2. A. Goel and V. Gruhn, “Solving a Dynamic Real-Life Vehicle Routing Problem,” in Operations Research Proceedings, Operations Research Proceedings, pp. 367–372, Springer, Berlin, Heidelberg, 2006. View at Google Scholar
  3. A. Larsen, O. B. Madsen, and M. M. Solomon, “Classification of Dynamic Vehicle Routing Systems,” in Dynamic Fleet Management, Operations Research/Computer Science Interfaces Series, pp. 19–40, Springer, Boston, MA, USA, 2007. View at Google Scholar
  4. V. Pillac, C. Guéret, and A. Medaglia, Dynamic vehicle routing problems: state of the art and prospects 5-6, Universidad de los Andes, Bogotá, Colombia, 2010.
  5. H. N. Psaraftis, “Dynamic programming solution to the single vehicle many-to-many immediate request dial-a-ride problem,” Transportation Science, vol. 14, no. 2, pp. 130–154, 1980. View at Publisher · View at Google Scholar · View at Scopus
  6. D. J. Bertsimas and G. Van Ryzin, “A stochastic and dynamic vehicle routing problem in the Euclidean plane,” Operations Research, vol. 39, pp. 601–615, 1991. View at Google Scholar
  7. Z.-L. Chen and H. Xu, “Dynamic column generation for dynamic vehicle routing with time windows,” Transportation Science, vol. 40, no. 1, pp. 74–88, 2006. View at Publisher · View at Google Scholar · View at Scopus
  8. S. M. de Oliveira, S. R. de Souza, and M. A. L. Silva, “A solution of dynamic vehicle routing problem with time window via ant colony system metaheuristic,” in Proceedings of the 10th Brazilian Symposium on Neural Networks, SBRN '08, pp. 21–26, Brazil, October 2008. View at Publisher · View at Google Scholar · View at Scopus
  9. L. Hong, “An improved LNS algorithm for real-time vehicle routing problem with time windows,” Computers & Operations Research, vol. 39, no. 2, pp. 151–163, 2012. View at Publisher · View at Google Scholar · View at Scopus
  10. J. de Armas and B. Melián-Batista, “Variable neighborhood search for a dynamic rich vehicle routing problem with time windows,” Computers & Industrial Engineering, vol. 85, pp. 120–131, 2015. View at Publisher · View at Google Scholar · View at Scopus
  11. V. Pillac, M. Gendreau, C. Guéret, and A. L. Medaglia, “A review of dynamic vehicle routing problems,” European Journal of Operational Research, vol. 225, no. 1, pp. 1–11, 2013. View at Publisher · View at Google Scholar · View at MathSciNet
  12. T. Bekta, P. P. Repoussis, and C. D. Tarantilis, Dynamic Vehicle Routing Problems, 2014.
  13. H. N. Psaraftis, M. Wen, and C. A. Kontovas, “Dynamic vehicle routing problems: Three decades and counting,” Networks, vol. 67, no. 1, pp. 3–31, 2016. View at Publisher · View at Google Scholar · View at Scopus
  14. Z. W. Geem, J. H. Kim, and G. V. Loganathan, “A new heuristic optimization algorithm: harmony search,” Simulation, vol. 76, no. 2, pp. 60–68, 2001. View at Publisher · View at Google Scholar · View at Scopus
  15. M. A. Al-Betar and A. T. Khader, “A harmony search algorithm for university course timetabling,” Annals of Operations Research, vol. 194, pp. 3–31, 2012. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus
  16. M. A. Al-Betar, A. T. Khader, and M. Zaman, “University course timetabling using a hybrid harmony search metaheuristic algorithm,” IEEE Transactions on Systems, Man, and Cybernetics, Part C: Applications and Reviews, vol. 42, no. 5, pp. 664–681, 2012. View at Publisher · View at Google Scholar · View at Scopus
  17. M. Hadwan, M. Ayob, N. R. Sabar, and R. Qu, “A harmony search algorithm for nurse rostering problems,” Information Sciences, vol. 233, pp. 126–140, 2013. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus
  18. Z. W. Geem, “Particle-swarm harmony search for water network design,” Engineering Optimization, vol. 41, no. 4, pp. 297–311, 2009. View at Publisher · View at Google Scholar · View at Scopus
  19. Z. Geem, “Harmony Search Algorithm for Solving Sudoku,” in Knowledge-Based Intelligent Information and Engineering Systems, B. Apolloni, R. J. Howlett, and L. Jain, Eds., vol. 4692, pp. 371–378, Springer, Berlin, Germany, 2007. View at Publisher · View at Google Scholar
  20. R. Kawtummachai and T. Shohdohji, “A Hybrid Harmony Search (HHS) algorithm for a Green Vehicle Routing Problem (GVRP),” in Proceedings of the 4th International Conference on Engineering Optimization, pp. 573–578, CRC Press, Lisbon, Portugal, 2000. View at Scopus
  21. T. Pichpibul and R. Kawtummachai, “Modified harmony search algorithm for the capacitated vehicle routing problem,” in Proceedings of the International MultiConference of Engineers and Computer Scientists, IMECS '13, pp. 1094–1099, Hong Kong, China, 2013. View at Scopus
  22. E. T. Yassen, M. Ayob, M. Z. A. Nazri, and N. R. Sabar, “Meta-harmony search algorithm for the vehicle routing problem with time windows,” Information Sciences, vol. 325, pp. 140–158, 2015. View at Google Scholar · View at Scopus
  23. K. Lund, O. Madsen, and J. Rygaard, “Vehicle routing problems with varying degrees of dynamism,” Tech. Rep., IMM Institute of Mathematical Modelling. Technical University of Denmark, Lyngby, Denmark, 1996. View at Google Scholar