Discrete Dynamics in Nature and Society

Volume 2018, Article ID 1295485, 13 pages

https://doi.org/10.1155/2018/1295485

## Dynamic Vehicle Routing Problems with Enhanced Ant Colony Optimization

School of Computer Science and Technology, Hangzhou Dianzi University, Hangzhou, China

Correspondence should be addressed to Haitao Xu; nc.ude.udh@oatiahux

Received 20 October 2017; Revised 17 January 2018; Accepted 21 January 2018; Published 15 February 2018

Academic Editor: Gabriella Bretti

Copyright © 2018 Haitao Xu 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.

#### Abstract

As we all know, there are a great number of optimization problems in the world. One of the relatively complicated and high-level problems is the vehicle routing problem (VRP). Dynamic vehicle routing problem (DVRP) is a major variant of VRP, and it is closer to real logistic scene. In DVRP, the customers’ demands appear with time, and the unserved customers’ points must be updated and rearranged while carrying out the programming paths. Owing to the complexity and significance of the problem, DVRP applications have grabbed the attention of researchers in the past two decades. In this paper, we have two main contributions to solving DVRP. Firstly, DVRP is solved with enhanced Ant Colony Optimization (E-ACO), which is the traditional Ant Colony Optimization (ACO) fusing improved* K*-means and crossover operation.* K*-means can divide the region with the most reasonable distance, while ACO using crossover is applied to extend search space and avoid falling into local optimum prematurely. Secondly, several new evaluation benchmarks are proposed, which can objectively and comprehensively estimate the proposed method. In the experiment, the results for different scale problems are compared to those of previously published papers. Experimental results show that the algorithm is feasible and efficient.

#### 1. Introduction

In the past few decades, because of the global developments in transportation and logistics, our lives have been significantly changed. For any local products that need to be sold to other cities or countries, the cost of transportation and logistics is indispensable. Actually, recent research data has shown that the cost of transportation and logistics usually accounts for 20% of the product’s value or more [1]; the logistics system has played an ever-growing and indispensable role in daily economic lives. Nevertheless, it also brings many negative effects, for example, air contamination, noises, and traffic accidents [2].

Although transportation and logistics have inevitable consequences for daily lives, efficient vehicles routing arrangements based on optimization algorithm could reduce negative impacts as little as possible, as well as enterprise logistics cost. This is because shortening vehicles running distances will promote the efficiency of vehicles and drivers. In addition, the algorithm can improve customers service quality, reduce exhaust emissions, and promote vehicles dispatch efficiency [3]. Consequently, the research of vehicle routing problem, which is a significate topic, has grabbed the scholars’ attentions during the past few decades [4].

In the history of VRP, the simplest and most famous routing problem is the Travelling Salesman Problem (TSP): given a set of urban locations, a salesman must go to every city once and return to the initial starting city, to find out the shortest travelling routes [5]. By the variant of TSP, researchers design many kinds of VRP; the basic VRP involves a set of customers (each customer should just be serviced once by one vehicle), who need to be serviced by a fleet of vehicles, and all vehicles start and return to the same depot. In addition, due to the limits of the vehicle running length and/or travelling time, service process may need multiple different routes [6, 7]. Actually, the VRP has been classified to several variants, such as Capacitated VRP (CVRP), Multidepot VRP (MDVRP), and VRP with time windows (VRPTW) [8–12].

In most studies of VRP, researchers almost define some basic information concerning customers’ locations and demands, available vehicles, and so on, which are entirely known before carrying out service. However, in actual service processes, VRP is dynamic; that is to say, customers’ demands and arrangements are changing gradually over time, although a part of customers’ demands may be known in advance before starting service. In addition, the DVRP is NP-hard problem, so traditional exact algorithms (linear programming, dynamic programming, greedy algorithm, etc.) are notoriously difficult to solve it under time limitations. However, modern optimization techniques (Ant Colony Optimization (ACO) [13, 14], genetic algorithm (GA) [15–17], particle swarm optimization (PSO) [18], etc.) which have the ability to generate high-quality solutions (although they are not exact) are the most suitable methods to solve DVRP. In these approaches, ACO is a classical and efficient heuristic algorithm.

ACO is a classical bionic algorithm, which is inspired by the process of observing foraging behavior of ant colony. Ant individuals communicate and exchange information by secreting pheromone (a special chemical substance) in the environment. Via sensing concentration of pheromone, ants can choose the appropriate path to reach food sources. This behavior has grabbed people’s attentions and created artificial ant systems to resolve combinatorial optimization problems [19].

The initial ACO was proposed by Dorigo in 1991, called ant system. However, it suffered from nonconvergence and local optima problems. A large number of variants of ant system were introduced to make up for its disadvantage effectively, such as elitist ant system, max–min ant system, and ant colony system [20]. Moreover, several novel mechanisms are proposed to promote the performance of algorithm, such as changing rules to enlarge the space of random search [14],* N*-Opt local random searches, and applying social insects to design distributed control [21]. For the DVRP, the goal of algorithm is not only to search optimum solution, but also to track the optimal solution over time by information of the previous search space. The algorithm needs to be sufficiently quick and flexible to adapt to the changed information. Based on this consideration, the adaptability of algorithm should be enhanced adequately.

ACO is a typical adaptive algorithm since it can transfer information from past environment to new environment and quickly adapt to dynamic changes. In addition, ACO has strong robustness and handles extreme conditions reasonably. In order to better meet dynamic environment, a great number of strategies are introduced to enhance ACO for resolving the DVRP. These can be summarized as (a) maintaining diversity by immigrant schemes [22], (b) memory-based methods [23], (c) multiple population approaches [24], and (d) clustering based algorithms [25].

In this paper, we design an enhanced ACO to solve different scale DVRP. A large number of actual instances show that ACO algorithms can efficiently solve optimization problems in different fields, including the Feature Subset Selection [26], Set Covering Problem [27], and Wireless Sensor Networks [28].

There are two main contributions in this paper. The first is that this paper solves DVRP by enhanced ACO which tries best to improve the degree of randomization and avoid falling into local search prematurely. In order to enhance the ACO, this paper proposes the following modifications:(1)Dividing region by improved* K*-means(2)Optimizing the initial solutions with the crossover(3)Improving the solutions with 2-Opt.

By a mass of comparative experiments based on different scale data sets, enhanced ACO has shown its advantages.

The second contribution is to design a more equitable evaluation system for DVRP. To date, in most published papers, time-based assessment strategy and cost-based assessment strategy are widespread among VRP. However, those evaluation approaches are biased: they just show the separate cost of several methods. Therefore, except the customary evaluations, the concepts of dynamic degree, vehicles utilization rate, and the -test are added to the evaluation system.

The reminder of this paper is organized as follows. In Section 2, we describe DVRP model and define the problem. In Section 3, the details of enhanced ACO are shown. The experimental details and results are discussed in Section 4. Some conclusions and future works are provided in Section 5.

#### 2. Problem Description and Definition

In this section, the DVRP will be described in detail. The problem model is defined in the following part.

##### 2.1. Static Vehicle Routing Problem

Generally, static VRP can be defined nearly as follows: to search a route or several routes that link depot with a crowd of customers; meanwhile the total cost is as small as possible.

In the past decades, most papers use an undirected graph to establish a mathematical model. In the model, represents the vertex set and is an edge set. A set of homogenous vehicles (having the same and invariable capacity ) depart from a single depot, which is represented by the vertex , and must visit total customers that are represented by vertexes . In , we calculate the distance of customers and and get distance matrix . Every customer has a demand and needs to be visited once by only one vehicle. is divided into routes that include all customers. The distance of route where and the depot is calculated byand calculating cumulative to total cost of solutions is as follows:

On the whole, the static VRP needs to observe the following constraints [15]:(1)Each vehicle starts from and returns to the same depot.(2)Each customer is to be visited once by only one vehicle exactly.(3)Each vehicle (assuming all vehicles are of the same model) has a capacity limitation.(4)The vehicle arrives and service time must satisfy the stipulated time.

##### 2.2. Dynamic Vehicle Routing Problem

###### 2.2.1. A General Definition

In the real world, the VRP is subject to dynamic environments. With the maturity of Global Positioning System (GPS) and widespread use of smart phones, tracing and managing a fleet of vehicles in real time can be realized easily. Due to the developments of new technologies, the process of plan-execute is replaced by dynamic planning vehicle routes [29].

Generally, the dynamism has mainly revealed the uncertainty of customer requests during the services. More concretely, the varieties of requests can be the number of goods [30–32] and services [33]. The travel time [34] and service time, two dynamic factors of the most read-world environments, have been taken into account. In this paper, dynamism focuses on the changes of service time. According to customer request time, the algorithm handles the orders dynamically.

###### 2.2.2. DVRP Model

We study a classical DVRP model which is proposed by Montemanni et al. [35]. In this paper, DVRP is regarded as a variety of the ordinary static VRP by dividing a whole DVRP into a set of standard VRP and then solving them in sequence with ACO. A number of vehicles have been arranged to serve customers that are known in advance; meanwhile many new customers’ demands are emerging constantly over time. These newly joined customers’ demands should be sent to the vehicles that are working or are handled by additional vehicles according to new customers’ required time. Thus, there are always some customers which have been serviced and new customers who wait to be serviced at any moment in working day. If a day is divided into a lot of little time periods, the DVRP can be regarded as a set of standard static VRP in every time period. Due to the fact that VRP is a NP-hard problem, this indicates that the DVRP also is a NP-hard problem [36], so DVRP must be also handled in each setting time period. A DVRP example is shown in Figure 1; as shown, some known customers (black dots) orders have been known in advance. Red lines and black lines represent initial designed routes to service known customers. As time goes on, new customer/s (blue triangle) orders are added to the system; thus the additional new customers are inserted into existing routes and will generate more new routes [15].