International Journals of Advanced Research in
Computer Science and Software Engineering
ISSN: 2277-128X (Volume-7, Issue-6)
Research Article
June
2017
Evaluation of Capacitated Vehicle Routing Problem with
Time Windows using ACO-GA
Jyoti Gupta, Chander Diwaker
Department of Computer Engineering, U.I.E.T., Kurukshetra University, Kurukshetra,
Haryana, India
Abstract— The capacitated vehicle routing problem with time windows (CVRPTW), broadly utilize in practice, comes
under category of NP-hard problem. This paper introduces an Ant Colony Optimization- Genetic Algorithm (ACO-GA)
for solving the CVRPTW. In CVRPTW, vehicles must follow the constraint of time windows allied with every
customer along with capacity constraints. In ACO-GA mutation operators of Genetic Algorithm (GA) are introduced
as these operators enhance the diversity of population, solution space can be explored completely. The effectiveness of
ACO-GA is evaluated by comparing it with other meta-heuristics such as GA and ACO.
Keywords— Ant colony optimization, Genetic algorithm, CVRPTW, mutation operator, pheromone trail
I.
INTRODUCTION
Industrial market’s economy is greatly impacted by the process of transportation of merchandise and finished goods.
Industry organizations are searching for efficient technique for transportation of goods so that efforts can be reduced in
context of both desired time and distance covered. This puts enormous emphasis on logistic and supply chain
management. This problem of transportation can be interpret as VRP as commenced by Dantzig and Ramser in 1959[1].
VRP is a standard name specified for a class of problems that ascertain a troop of vehicle routes, within which each one
vehicle start out from a particular depot, provide services to a specific troop of customers, and again come back to similar
depot. Numerous services emerge in viable situations, whilst physical distribution of merchandise is most familiar one
[2]. VRP is an escalation of eminent Travelling Salesman Problem (TSP) along with some added constraints. In TSP, a
sales person initiates from a town and come back to that particular town after the travelling of all other towns and has to
be performed with least possible total distance covered. In VRP each one vehicle posses a bounded capacity and vehicle
has to come back to depot as capacity is exceeded [1].
For the VRP the subsequent constraints must hold[3]:
(1) Each one route initiates and terminates at same depot.
(2) Every customer is serviced exactly once and through one vehicle.
(3) Total requirement on each route does not go beyond the entire capacity of one vehicle .
Several variants of VRP exists depending on numerous constraints such as VRP with time windows (VRPTW), multi
depot VRP (MDVRP), open VRP (OVRP), capacitated VRP (CVRP), pickup and delivery VRP (PDVRP), time
dependent VRP (TVRP), periodic VRP (PVRP) [4], Stochastic VRP (SVRP) and VRP with Backhauls (VRPB), each
type of VRP has several applications [1]. The VRP is well-known as the NP-hard problem, which cannot be solved
within a reasonable polynomial time [5]. The solution techniques can be mainly split up into two categories: exact
solution methods and heuristic methods. The exact algorithms always guarantee to yield a best possible solution.
Although, it may entail unbearable computation time, particularly when problem level is large. Heuristics, aims to
provide suitable suboptimal solutions within suitable computing time, whilst could not theoretically guarantee that the
attained solutions are the globally optimal ones [6].
Fig.1 Illustration of VRP with 13 customers and 3 vehicles with heterogeneous capacities [7]
© www.ijarcsse.com, All Rights Reserved
Page | 610
Gupta et al., International Journals of Advanced Research in Computer Science and Software Engineering
ISSN: 2277-128X (Volume-7, Issue-6)
VRP has many real life applications such as:
a) collection and delivery of goods b)school bus routing c) street cleaning d) waste collection e) dial a ride systems f)
transportation of handicap people g) routing of salespeople[4] h) Handing over of newspapers and magazines i) Courier
service j) Grocery delivery services, k) Taxis l) Maintenance operations[8].
II. CVRPTW
Capacitated Vehicle Routing Problem with Time Windows is a generality of CVRP. In CVRPTW capacity constraints
and time windows constraints are introduced. CVRPTW can be represented by a weighted directed graph G = (V, A),
where V = {v0, v1, v2………..vn} represents the whole set of vertices, A = {vi, vj): i ≠ j} represents all the arcs between the
vertices. The vertex v0 represents depot and others represent clients. For each arc (vi, vj) is associated a non negative
value dij that corresponds to the distance between the vertex vi and the vertex vj that is the cost between the two vertices.
Each one client (vertex) vi holds a demand qi, a time window, which signifies that each one client i has a already defined
time with an earliest time of arrival ei i.e. lower bound and a latest time of arrival li i.e. upper bound for visit of vehicles.
Vehicles have to arrive sooner than the upper bound of window li and if arrival is sooner than the lower bound ei then
vehicles must have to wait for some time wi (time wait). Each client entails a service time δi which corresponds to the
merchandise loading / unloading time. Time window of depot denotes that each vehicle that leave depot at time e0, return
to depot before time l0. Goals of CVRPTW is to design the shortest path through minimizing travelling costs,
minimizing number of vehicles and using optimum distance without violating the constraints of time windows and
loading capacity of vehicle [9].
III. RELATED WORK
Different authors solve the numerous variants of VRP by using ACO and GA meta-heuristics which are described briefly
as follows:
Zhen et al. [10] proposed a hybrid Ant Colony Algorithm (ACA) to solve VRPTW. The proposed method is a
combination of sweep method and ACA, firstly sweep method is applied which constitutes improvement to outcome by
grouping customers then use the ACA for optimizing the path. Here, optimization search speed effectively improved and
also get the optimal performance.
Liu and Song [11] solved the VRP with multiple constraints through an improved GA (IGA). Multiple objectives which
are achieved through IGA are distance, time penalty, fixed cost and risk. Feasibility and validity of proposed algorithm
were confirmed by a numerical example.
Yunfei et al. [12] proposed an improved ACO which depends on ITO differential equation for solving the VRP. Proposed
algorithm assimilates versatility of Ito with accuracy of ACO for VRP solving. Intensity of move plus wave operators
integrated to be reflected by exercise ability. Also, a novel pheromone updating rule is specified which is more in line
with Brownian motion and ACO.
Janjarassuk and Masuchun [l3] was deployed ACO method for solving CVRP with stochastic demand. For improving the
qualities of solution 2-opt local search was employed with ACO. Simulation technique was used for estimating the
expected cost with stochastic demands.
Lingxin et al. [14] proposed a scheme for solving VRPTW by deployed a combination of ACO and insert heuristic.
Firstly ACO algorithm was applied for getting the pre-optimization path, after that, sub-path was optimized in
accordance with insert heuristic algorithm. Comparison result shows that proposed algorithm solves the VRPTW
problems more effectively.
Abderrahman et al. [15] introduced a new variant of VRPTW named as VRPTW with target time (VRPTWTT) for
solving this, a hybrid method was introduced. Proposed method is a combination of neighbourhood search and ACO.
Firstly ACO was applied and when ACO is near to optimal solution, neighbourhood search was applied for maintaining
diversity of ACO and discovering new solutions.
IV. PROBLEM FORMULATION AND PROPOSED SOLUTION
Problem can be formulated as follows by reviewing the different papers:
A. Problem
VRP is a real-time problem. Many problems comes when VRP solved by ACO meta-heuristic, like getting trapped in
local minimum, no fixed time of providing services, problems related to minimum time and minimum distance comes.
Researchers done lot of work to overcome the problems but no one can provide an efficient solution.
So, I will try to propose a scheme which could more effective in solving this.
B. Proposed algorithm
For achieving the objectives mentioned above ACO-GA technique is used. ACO is an efficient meta-heuristic but still it
has some flaws such as search generally gets trapped in local optimal solution, requires a large amount of computational
time for obtaining the optimal solution and tough to adjust the parameters for attaining the good performance. In the
proposed algorithm mutation operators of the GA are introduced as this can enhance the diversity of population, solution
space can be explored completely.
1) ACO: ACO was proposed by Dorigo (1992). Key thought of ACO was to emulate the activities of real ants exploring
for food. It was found that real ants were able to communicate information concerning food sources via an aromatic
essence called pheromone. While move along, real ants leave up pheromone in a quantity which depends on value of
© www.ijarcsse.com, All Rights Reserved
Page | 611
Gupta et al., International Journals of Advanced Research in Computer Science and Software Engineering
ISSN: 2277-128X (Volume-7, Issue-6)
food source exposed. Other ants, notice pheromone track, are attracted to go along it. Therefore, the more ants will be
attracted as the path will be enhanced [16]. Pheromones have a propensity to evaporate and therefore, over an interval of
time, larger extent of pheromone accumulated at the shortest trail as compared to other trails and this becomes the
preferred trail. The core components in ACO are ants which autonomously build solutions for the problem. For an ant k,
the chance of it visits a node j after visits a node i depends on the two attributes specifically:
• Attractiveness (ŋij): this is a static element that never changes. In the VRP, it is evaluated as inverse of length of arc for
shortest path problems, it may depend on other factors also besides the arc length like in VRPTW it depends on current
time and the time window.
• Pheromone trails (Tij): It is the dynamic element that modify with time. It is used for measuring the desirability of
inclusion of an arc into the solution. In other terms, if an ant discovers a sturdy pheromone trail leading to a specific node
than that direction will be more desirable than other directions.
Random probability rule for selection of next customer to be chosen that has to be visited is shown by following equation
[17].
(1)
[6]
Pij denotes the probability of customer i to the subsequent customer j.
are the influence levels of the pheromone
(ℸ ) and ant’s visibility (ŋ) respectively.
2) GA: GA is an optimization technique which calculates the optimal or relatively near optimal solutions for search
problems. GA has three basic principles reproduction, selection and the diversity of individuals. . The procedure of
evolution and selection are calculated on the population of candidate individuals [18]. The process is accomplished
through repetitive applications of three genetic operators: selection, crossover, and mutation. Firstly, the better
chromosomes are chosen to become parents to generate new offspring (new chromosomes). To simulate the survivor of
fittest, the chromosomes with higher fitness value are selected with high probabilities than the chromosomes with poorer
fitness value. The selection probabilities are generally defined by comparing the fitness values. As the parent
chromosomes are selected, the crossover operator unite the chromosomes of the parents for producing the new offspring.
Since stronger (fitter) individuals are being chosen more often therefore there is a tendency so as to new solutions may
become very similar after some generations, and also the diversity may decline; and this could lead to population
stagnation. Mutation is an approach to inject diversity into the population to avoid stagnation. If the specific number of
generation is attained, stop and return the average fitness and the fitness of the finest solution inwards the current
population [19].
3) ACO-GA: In proposed algorithm mutation operators of GA were introduced in ACO. By applying the ACO-GA
effective results for CVRPTW can be achieved.
The detailed steps of the ACO-GA are as follows:
1. Initialization
In this phase all the parameters are initialized and each ant selects a random customer.
2. Tour construction
(i) The construction of vehicle routes is performed by every ant and selection of the next customer is computed by the
probability rule mention in eqn. (1).
(ii) Vehicle route can also be constructed by using the mutation operators of Genetic Algorithm named as flip, swap and
slide.
a. Flip: In flipping of a bits set is flipped
Fig. 2(a)
b.
Swap: In swap mutation two positions on chromosome selected randomly and interchanged the values.
Fig. 2(b)
c.
Slide: In slide, genes of a chromosome are slide.
Fig.2(c)
Fig. 2 representation of different mutation operator
© www.ijarcsse.com, All Rights Reserved
Page | 612
Gupta et al., International Journals of Advanced Research in Computer Science and Software Engineering
ISSN: 2277-128X (Volume-7, Issue-6)
(iii)Select the best tour from above two criteria.
3. Calculate fitness
Calculate the fitness for all the ants, due to concept of time windows fitness of a given solution cannot be computed
directly. In this study, we use the total distance for calculating the fitness. The fitness is estimated by using following eqn.
f=f-e1*min(f)
(2) [20]
4. Update the trace
The updating of pheromone trace is a key factor in ACO that indicate s the superiority of solutions and enhance
subsequent solutions. First, in turn to simulate the biological evaporation of pheromone, amount of pheromone on every
segment is reduced. Afterwards pheromone increments are allotted to each one visited edge. This is accomplished with
the subsequent pheromone updating equation.
t(i,j)= (1-e) * t (i,j) + dt
(3) [21]
5. Update the Global best
Update the global best value by calculating the local best value.
4) DFD of ACO-GA
Fig. 3 DFD for ACO-GA
5) Parameters and tool used:
The algorithms used in this study are coded in MATLAB 7.9.0 (R2009b) and run on a Windows7, Intel Core i3 2.53
GHz, 2 GB RAM computers. The parameters used in ACO-GA are shown in table 1. Standard dataset is taken for the
CVRPTW from VRP instances.
S. no.
1.
2.
3.
4.
5.
6.
7.
8.
9.
Table 1 ACO-GA Parameters
Parameter
Value
Vehicles
30
Vehicle capacity
700
Vehicle average speed 1
Depot DUETIME
3300
e1 (evaporation rate)
0.97
Alpha
8
Beta
4
miter (max iteration)
100
e
0.15
V. RESULTS AND ANALYSIS
The outcome of proposed method is shown in Fig. 3 and Fig. 4, shows the comparison results of the GA, ACO and ACOGA algorithm for CVRPTW. For comparing the performance of the algorithms several objectives are considered such as
distance, time, vehicle used and number of iterations. The comparison shows that modified ACO has better performance
than the other two methods.
© www.ijarcsse.com, All Rights Reserved
Page | 613
Gupta et al., International Journals of Advanced Research in Computer Science and Software Engineering
ISSN: 2277-128X (Volume-7, Issue-6)
Total no of vehivcles:4, Optimal Total Distance = 571.4820, Optim Time: 3246.8201
90
1614 12
Total no of vehivcles:3, Optimal Total Distance = 350.4789, Optim Time: 2956.8326
90
1614 12
19 15
80
1
9
70
23
26
5
23
39 36 34
3332
48
35 31
40 3837
47 43
50 4241
45
30
3332
44
10
0
10
20
47 43
50 4241
45
30
8
21
27 22
29 24 20
3332
49
40
44
20
50
60
10
70
(a) Route followed by GA
0
10
20
48
35 31
47 43
50 4241
45
30
46
49
40
30
51
6
46
40
30
40 3837
7 3
4
5
30
50
48
35 31
25
26
51
2
11
10
60
39 36 34
46
20
23
28
6
1
9
70
8
50
39 36 34
18 17 13
7 3
4
5
21
30
27 22
29 24 20
28
6
25
26
51
2
11
10
60
21
30
27 22
29 24 20
50
1
9
70
8
60
40 3837
7 3
4
19 15
80
18 17 13
2
11
10
25
28
19 15
80
18 17 13
Total no of vehivcles:4, Optimal Total Distance = 348.0229, Optim Time: 1376.6125
90
1614 12
40
50
44
20
60
10
70
0
10
20
30
49
40
40
50
60
70
(b) Route followed by ACO
(c) Route followed by ACO-GA
Fig 3 Routes followed by different meta-heurists
Among Fig. 3(a), 3(b) and 3(c) distance travelled is relatively lower in 3(c) than the other two methods. When
considering the aspect of time fig. shows that less time is used by modified ACO and less number of vehicles are used by
ACO.
Fitness Graph
740
368
720
366
700
364
680
362
660
640
600
354
580
352
10
20
30
40
50 60
Iteration
70
80
90
(a) Cost evaluation by GA
350
100
380
358
356
0
390
360
620
560
Fitness Graph
400
Best Cost
370
Best Cost
Best Cost
Fitness Graph
760
370
360
350
0
10
20
30
40
50 60
Iteration
70
80
90
100
340
0
10
20
30
40
50 60
Iteration
70
80
90
100
(b) Cost evaluation by ACO
(c) Cost evaluation by ACO-GA
Fig. 4 cost evaluation by different meta-heuristics
In fig. 4 cost is evaluated and outcome shows that GA gets the optimum values at 79 th iteration, ACO achieves the
optimum 42nd iterations modified ACO get the optimum at 19th iterations.
VI. CONCLUSION
By applying the proposed algorithm optimized results are obtained. Comparison among the GA, ACO and ACO-GA
shows that proposed algorithm can solve the CVRPTW problems effectively. The main objectives which are achieved
through this algorithm are: distance was minimized, time used is less and no. of iterations is also less. The considered
problem is solved by using the MATLAB software and presents optimal solution.
REFERENCES
[1]
Sathyanarayanan S, Dr. K. Suresh Joseph and Dr.S.K.V.Jayakumar, “A Hybrid Population Seeding Technique
Based Genetic Algorithm for Stochastic Multiple Depot Vehicle Routing Problem,” in Proc. International
Conference on Computing and Communications Technologies (ICCCT), 2015, pp. 119-127.
[2]
The Jin Ai and Voratas Kachitvichyanukul, “A Particle Swarm Optimization for the VRP with Simultaneous
Pickup and Delivery,” Journal of Computers & Operations Research, vol. 36, no. 5, pp. 1693 - 1702, 2009.
[3]
Oren E. Nahum, Yuval Hadas and Uriel Spiegel, “Multi- Objective Vehicle Routing Problems with Time
Windows: a Vector Evaluated Artificial Bee Colony Approach,” International Journal of Computer and
Information Technology, vol. 3, no. 1, pp. 41-47, Jan. 2014.
© www.ijarcsse.com, All Rights Reserved
Page | 614
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
Gupta et al., International Journals of Advanced Research in Computer Science and Software Engineering
ISSN: 2277-128X (Volume-7, Issue-6)
Mazin Abed Mohammed, Mohd Sharifuddin Ahmad and Salama A. Mostafa, “Using Genetic Algorithm in
Implementing Capacitated Vehicle Routing Problem,” in Proc. International Conference on Computer &
Information Science (ICCIS), June 2012, pp. 257-262.
S.Z. Zhang and C.K.M. Lee, “An Improved Artificial Bee Colony Algorithm for the Capacitated VRP,” in Proc.
IEEE International Conference on Systems, Man, and Cybernetics, Oct. 2015, pp. 2124-2128.
Xinyu Wang, Tsan-Ming Choi, Haikuo Liu, and Xiaohang Yue, “Novel Ant Colony Optimization Methods for
Simplifying Solution Construction in Vehicle Routing Problems,” IEEE Transactions on Intelligent
Transportation Systems, vol.17. no.11, pp. 3132-3141, April 2016.
Frank W.Takes and Walter A. Kosters, “Applying Monte Carlo Techniques to the Capacitated VRP,” in
Proceedings of 22th Benelux Conference on Artificial Intelligence (BNAIC), , May 2010, pp. 1-8.
Victor Pillac , Michel Gendreau, Christelle Gueret and Andres L. Medaglia, “ A Review of Dynamic
VRPs,” European Journal of operational research , vol. 225, no. 1,pp. 1- 36, 2013.
Amir Hajjam, El Hassani, Lyamine Bouhafs and Abder Koukam, Vehicle Routing Problem, Tonci Caric and
Hrvoje Gold, Ed. Vienna, Austria: Intech open, 2008.
Tong Zhen, Qiuwen Zhang, Wenshuai Zhang and Zhi Ma, “Hybrid Ant Colony Algorithm for the Vehicle
Routing with Time Windows,” ISECS International Colloquium on Computing, Communication, Control, and
Management, pp. 8-12, 2008.
Hui Liu and Yongduan Song, “Dealing with Vehicle Routing Problem Under Multi-Objective Using Improved
Genetic Algorithm,” in Proc. 26th Chinese Control and Decision Conference (CCDC), May 2014, pp. 41004105.
Yi Yunfei, Lin Xiaodong, Sheng Kang and Cai Yongle, “An Improved Ant Colony Algorithm to Solve Vehicle
Routing Problem with Time Windows,” Intelligent computing theories and methodologies, pp. 11-22, 2015.
Udom Janjarassuk and Ruedee Masuchun, “An Ant Colony Optimization Method for the Capacitated Vehicle
Routing Problem with Stochastic Demands,” in Proc. Computer Science and Engineering Conference (ICSEC),
2016, pp. 1-5.
Meng Lingxin, Lin Cong, Huang Huadong and CAI Xiushan, “Vehicle Routing Plan Based on Ant Colony and
Insert Heuristic Algorithm,” in Proceedings of the 35th Chinese Control Conference, July 2016, pp. 2658- 2662.
Abbassi Abderrahman, El Bouyahyiouy Karim, El Hilali Aloui Ahmed and Bellabdaouiadil, “A Hybrid
Algorithm for Vehicle Routing Problem with Time Windows and Target Time,” Journal of Theoretical and
Applied Information Technology, 2017,vol. 95, no.1, pp. 210-219.
Qiulei Ding, XiangpeiHu , LijunSun and Yunzeng Wang “An Improved Ant Colony Optimization and
its Application to VRP with Time Windows,” Neurocomputing , vol. 98, pp. 101-107, 2012.
Gautham Puttur
Rajappa, Joseph H. Wilck and John E. Bell, “An Ant Colony Optimization and
Hybrid Meta-heuristics Algorithm to Solve the Split Delivery VRP”, International Journal of Applied
Industrial Engineering, vol. 3, no.1 , pp. 55-73 ,2016.
Saso Karakatic and Vili Podgorelec, “A Survey of Genetic Algorithms for Solving Multi Depot Vehicle
Routing Problem,” Applied Soft Computing, vol. 27, pp. 519-532, 2014.
Voratas Kachitvichyanukul, “Comparison of Three Evolutionary Algorithms: GA, PSO, and DE ”, Industrial
Engineering & Management Systems vol. 11, no.3, pp. 215-223, 2012.
Macros Villagra and Benjamin Baran, “Ant Colony Optimization with Adaptive Fitness Function for
Satisfiability Testing,” in Proc. Logic, Language, Information and Computation, 14th International Workshop,
July 2007.
Bin Yu and Zhong Zhen Yang “An ant colony optimization model: The period VRP with time windows,”
Transportation Research Part E, vol. 47, pp. 166-181, 2011.
© www.ijarcsse.com, All Rights Reserved
Page | 615
© Copyright 2026 Paperzz