0% found this document useful (0 votes)
153 views9 pages

An Improved Hybrid Firefly Algorithm For Capacitated Vehicle Routing Problem

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views9 pages

An Improved Hybrid Firefly Algorithm For Capacitated Vehicle Routing Problem

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Applied Soft Computing Journal 84 (2019) 105728

Contents lists available at ScienceDirect

Applied Soft Computing Journal


journal homepage: www.elsevier.com/locate/asoc

An improved hybrid firefly algorithm for capacitated vehicle routing


problem

Asma M. Altabeeb , Abdulqader M. Mohsen, Abdullatif Ghallab
Department of Computer Sciences, Faculty of Computing and Information Technology, University of Science & Technology, Sana’a, Yemen

article info a b s t r a c t

Article history: Firefly algorithm (FA) is a new meta-heuristic which is successfully applied to solve several optimiza-
Received 5 March 2019 tion problems. However, it suffers from a drawback of easily getting stuck at local optima. This paper
Received in revised form 13 July 2019 proposes a new hybrid FA, called CVRP-FA, to solve capacitated vehicle routing problem. In CVRP-FA, FA
Accepted 19 August 2019
is integrated with two types of local search and genetic operators to enhance the solution’s quality and
Available online 22 August 2019
accelerate the convergence. The experiments are conducted over 82 benchmark instances. The results
Keywords: demonstrate that CVRP-FA has fast convergence rate and high computational accuracy. It significantly
Firefly algorithm outperforms the other state-of-the-art FA variants in majority of the tested instances.
Capacitated vehicle routing problem © 2019 Elsevier B.V. All rights reserved.
Meta-heuristic
Local search
Taguchi method

1. Introduction (ACO) and lévy flight search to solve unit commitment problem,
continuous numerical optimization problem, complex non lin-
Firefly algorithm (FA) is a new nature-inspired algorithm re- ear problem, micro-array data to predict cancer and numerical
cently developed by Yang [1]. Fister et al. summarized its features optimization problem respectively [8–12].
as follows: (i) FA is simple, flexible and versatile; (ii) FA has multi- FA was hybridized with different methods to solve discrete
modal characteristics, thus it can handle multi-modal problems optimization problems such as scheduling problems, traveling
efficiently; (iii) FA can be applied as a global problem solver salesman problem (TSP) and vehicle routing problems (VRPs). For
or a local search heuristic; and (iv) FA can work with many example, FA was hybridized with local search heuristic to solve
optimization, classification problems, and in almost all branches graph 3-coloring [13]. Horng used Linde–Buzo–Gray algorithm to
of engineering problems in practice [2]. initialize FA to develop the vector quantization algorithm [14].
FA is originally developed for solving continuous optimiza- FA was also combined with local search to solve the permuta-
tion problems. It has been successfully applied to different fields tion flow shop scheduling problem and multi-objective flexible
and applications [2,3]. The great success of FA has led many job shop scheduling problem. [15,16]. FA was integrated with
researchers to improve the basic version of FA through its many the basic concepts of quantum computing and the movement
variants as shown in surveys [2,3]. For example, FA outperformed strategy of PSO to strike a balance between intensification and
artificial bee colony (ABC), particle swarm optimization (PSO) diversification for solving 0–1 knapsack and the multidimensional
and genetic algorithm (GA) to solve antenna design optimiza- knapsack problems [17]. To solve TSP, FA was integrated with
tion and find the optimum spacing between the radiating an- mutation and selection operations, called EDFA [18]. Saraei et al.
tenna elements and tune the parameters of proportional integral hybridized FA with greedy algorithm [19]. FA was combined k-opt
controllers respectively [4–7]. algorithm, namely MDFA, [20]. Mohsen and Al-Sorori hybridized
Furthermore, the improvements of FA were conducted in dif- FA with local search and genetic operators, called HDFA, [21].
ferent ways such as hybridization. Hybridization of FA with other The results showed that HDFA outperformed EDFA and MDFA in
algorithms can enhance the chances of finding good quality so- terms of the quality of the solutions and convergence rate.
lutions compared with other previously proposed algorithms. To To the best of our knowledge, four researches utilized FA to
solve continuous optimization problems, FA was hybridized with solve different type of VRPs. A variant of discrete FA was proposed
lagrangian method, learning automata, GA, the evolutionary op- to solve VRP with time window (VRPTW) and other variant was
erations of differential evolution method, ant colony optimization proposed to solve rich VRPTW in [22,23] respectively. Although
the authors had successfully adapted FA to VRPTW, the obtained
∗ Corresponding author. results were not so promising as presented in the literature.
E-mail address: [email protected] (A.M. Altabeeb). To solve capacitated VRP (CVRP), FA was hybridized with local

https://doi.org/10.1016/j.asoc.2019.105728
1568-4946/© 2019 Elsevier B.V. All rights reserved.
2 A.M. Altabeeb, A.M. Mohsen and A. Ghallab / Applied Soft Computing Journal 84 (2019) 105728

search (2-opt) for optimizing heterogeneous fixed fleet VRP (HF- Eq. (1) is the objective function, which minimizes the total
FVRP) [24]. The authors used CVRP’s benchmarks because there distance traveled by the vehicles. If vehicle k travels from cus-
are no benchmarks for HFFVRP in the literature. The experimental tomer i to customer j directly, Xijk = 1 otherwise Xijk = 0. The
results showed that the hybrid firefly was effective only for small remaining equations represent a set of constraints as follows:
instances, however, it was trapped into local optima for most (i) constraints (2) and (3) guarantee that customers can only be
of instances. M. Saraei et al. [25] used the combination of FA serviced by one vehicle; (ii) constraint (4) ensures that the total
with adaptive mutation and genetic algorithm, called CFAGA. This demand of the customers allocated in a route cannot exceed the
research has some drawbacks such as: (i) it used only five small- vehicle capacity Q ; and (iii) constraint (5) guarantees that each
scale instances; (ii) it failed to reach the best known solution tour of each vehicle starts from the depot and ends at the same
(BKS) of the five instances; and (iii) there was no comparison with depot. A solution of CVRP is feasible if all routes satisfy the ca-
the recently proposed algorithms in literature; instead, the com-
pacity constraint and no customer is visited more than once [30].
parison was made with the basic FA and GA. It is worthy to note
For the number of vehicles (routes) K that serve the customers,
that the searching capability of meta-heuristic algorithms can be
some researches such as [31] considered it as a constraint variable
increased by integrating a component of anther meta-heuristic
while other researches considered it as a decision variable such
algorithm, instead of integrating the whole meta-heuristic [26].
as [32].
This paper proposes a new enhanced FA, namely CVRP-FA, to
solve CVRP with two main contributions. The first one is the em-
bedding of local search techniques (improved 2-Opt method [27] 3. Preliminaries
and 2-h-opt local search [28]) to speed up the convergence to-
ward the optimal solution. The second is the introduction of Paper’s key concepts i.e. FA and its enhancement for VRPs are
a crossover and two types of mutation techniques to strike a briefly described in the following subsections.
balance between intensification and diversification. Furthermore,
the best values for the parameters of the proposed algorithm is 3.1. The basic firefly algorithm
determined statistically using Taguchi method. The effectiveness
of the proposed algorithm is compared with the recent developed
Firefly is a nature-inspired algorithm was developed recently
FAs i.e. hybrid firefly [24] and CFAGA [25].
by Yang [1] to imitate a flashing behavior of the fireflies. It was
The rest of the paper is organized as follows. In Section 2,
formulated with the following three assumptions:
the CVRP is formulated. An overview of the paper key concepts
such as the basic FA and enhancement of firefly algorithm for • All fireflies of the swarm are single sex which means that a
VRPs are provided in Section 3. Section 4 explains the proposed
firefly attracts all other fireflies regardless of their sex.
algorithm CVRP-FA. CVRP-FA’s parameters tuning and compari-
• The attraction of a firefly is related to its light. For example,
son with other FA variants are reported in Section 5. Finally, the
given two fireflies, the brighter one will attract the less
conclusions of the study are given in Section 6.
brighter one; in other words; the less brighter firefly will
2. Mathematical modeling of capacitated vehicle routing prob- move toward the brighter one. The attraction decreases as
lem the distance between the fireflies increases. Furthermore,
if one firefly is the brightest one of the swarm, it moves
CVRP is described as a graph G = (N , E) with a set of nodes randomly.
N = {0, 1, . . . , n} where the node 0 represents the depot and • The brightness of a firefly is determined by the value of the
[1, . . . , n] represent the customers. Each edge {i, j} ∈ E has a objective function of problem under consideration.
non-negative cost cij . Each customer i ∈ V ′ = V \ {0} has a
demand qi where {i = 1, 2, . . . , n}. For a single depot 0, a set The main steps of FA are given in Algorithm 1. There are three
of homogeneous vehicles K with capacity limit Q start from the important factors that should be considered when implementing
depot to serve each customer and return back. The loading of each FA i.e the attractiveness, the distance between fireflies and the
vehicle cannot exceed the capacity limit Q . The objective is to de- movement of fireflies. In the basic version of FA, these factors are
termine the routes that serve and meet all the customers’ demand tackled in the following way. First of all, the attractiveness of a
and minimize the total routing cost. CVRP can be formulated as firefly is determined by its light intensity via Eq. (6):
follows [29]: 2
β = β0 exp(−γ r ) , (6)
N N K
∑∑∑
Minimize cij Xijk (1) where β0 is the attractiveness at distance r = 0. Secondly, the
i=0 j=0 k=1 distance rij between any two fireflies i and j is calculated using
the Cartesian distance as shown in Eq. (7):
Subject to

K N
 N
∑ ∑ ∑
Xijk = 1 j ∈ {1, . . . , N } : i ̸ = j (2) rij = ∥xi − xj ∥ = √ (xik − xjk )2 , (7)
k=1 i=0 k=1

K N
where xik and xjk is the kth component of the spatial coordinate xi
and xj of the ith and jth fireflies. Finally, the movement of a firefly
∑ ∑
Xijk =1 i ∈ {1, . . . , N } : i ̸ = j (3)
i toward any other brighter firefly j is determined by Eq. (8):
k=1 j=0
(−γ rij2 )
xti +1 = xti + β0 exp (xtj − xti ) + αϵit , (8)
N N
∑∑
Xijk qi ≤Q k ∈ {1, . . . , K } (4) where α indicates that the randomization parameter, ϵit is a
i=0 j=0 vector of random numbers drawn from a Gaussian distribution
N
∑ N
∑ at iteration t and γ is a scaling factor that represent the light
Xijk = Xjik ≤ 1 for i = 0 and k ∈ {1, . . . , K } (5) absorption coefficient in a given medium. rij is the Cartesian
j=1 j=1 distance between the two fireflies i and j at positions xi and xj .
A.M. Altabeeb, A.M. Mohsen and A. Ghallab / Applied Soft Computing Journal 84 (2019) 105728 3

Algorithm 1: Pseudo-code of basic FA Algorithm 2: Pseudo-code of CVRP-FA


1 begin 1 begin
2 Input:objective function f (x); 2 Input:objective function f (x);
3 Output: the best solution x*; 3 Output: the best firefly x∗;
4 Initialize the firefly population X = (x1 , x2 , ...., xn ) ; 4 Initialize parameters P-S, MI, C-R, and M-R;
5 Evaluate each firefly xi in the initial population by f (xi ); 5 t=0;; /* t is the iteration number */
6 Light intensity Ii at xi is determined by f (xi ); 6 Initialize firefly population p: X = (x1 , x2 , ...., xn ) ;
7 while termination criterion not reached do 7 for i = 1 to P − S do /* For each firefly in p */
8 for i=1 to n do 8 Calculate the objective function f (xi ) for firefly xi ;
9 for j=1 to n do 9 Light intensity Ii at xi is determined by Eq. (9);
10 if Ii > Ij then 10 Find the current best firefly x∗ ;
11 Compute the attractiveness based on Eq. (6); 11 end
12 Move firefly i toward j based on Eq. (8) ; 12 while termination criterion not reached do
13 end 13 for i = 1 to P − S do /* For each firefly in p */
14 end 14 for j = 1 to i do
15 end 15 if Ii > Ij then
16 Evaluate the population; 16 if rand < C − R then
17 Rank the fireflies, find the current best; 17 PMX procedure (xi );
18 end 18 end
19 Return global best solution x∗ ; 19 local search procedure(xi );
20 mutation procedure(xi );
20 end
21 end
22 end
23 end
24 Rank the fireflies, find the current best among all fireflies x∗ ;
3.2. Related enhanced FAs for VRPs 25 t=t+1;
26 end
27 Return global best firefly x∗ ;
Originally FA is developed to address the continuous opti-
28 end
mization problems and cannot be applied directly to solve any
discrete optimization problem. Thus, FA should be adapted to
solve discrete optimization problem such as VRPs [23].
To make FA suitable to VRPs, three approaches have been
proposed. Matthopoulos and Sofianopoulou [24] adapted the real-
coded schema of CVRP. From practical point of view, this adapta-
tion is not worthy. The results are not so promising as the results
presented in the literature. Saraei and Ghaheri [25] adapted FA
with permutation representations to solve CVRP. In addition, they
used a combination of mutation operators to represent the move-
ment of fireflies. Osaba et al. [23] had successfully adapted FA
to solve VRPTW via Insertion Function to represent the fireflies’ Fig. 1. Two solution representations.
movement in which the distance between two fireflies i and j was
calculated using hamming distance (HD). It is worthy to note that
the same movement idea was also applied with FA to solve TSP
which obtained good results [20,21]. Accordingly, this movement 4.2. Initialization
idea will be used in this paper.

4. The proposed algorithm (CVRP-FA) CVRP-FA’s parameters i.e. population size (P-S), maximum
number of iteration (MI), crossover_rate (C-R) and mutation_rate
A new variant of FA, called CVRP-FA, is proposed. The main (M-R) are initialized to control CVRP-FA’s performance. It is worth
purpose of CVRP-FA is to overcome the drawbacks of FA that mentioning that the generating of the initial swarm randomly
were mentioned above via hybridization to solve CVRP. Two local
is the most appropriate way to prove the optimization quality
search procedures i.e. improved 2-opt and 2-h-opt are introduced
to speed up the convergence. In addition, crossover and two of a meta-heuristic algorithms [33]. Thus, The fireflies of CVRP-
types of mutations operators of genetic algorithm are combined FA’s swarm are generated randomly. Each firefly is constructed
to strike a balance between local and global search. Algorithm according to the following steps: (i) a route is created with start
2 shows pseudo-code of CVRP-FA’s steps. In each step, CVRP- point (the depot); (ii) a random costumer is selected from the
FA must maintain the constraints of CVRP. These steps will be costumers’ list and deleted from the same list to ensure that
discussed in the following subsections: the costumer is not selected again; (iii) the selected costumer is
added to the route accordingly; (iv) If the route’s capacity <=
4.1. Solution representation
vehicle’s capacity; steps ii and iii are repeated; otherwise the
CVRP-FA represents the solutions of CVRP in two permutation end point (the depot) is added to the route; (v) the number of
representations. As shown in Fig. 1, CVRP solution representation route is increased by 1; and (vi) steps i to v are repeated until all
∑K
(CVRP-SR) is represented as an array list i=1 (Si + 2), where K costumers are served.
is the number of vehicles, Si is the number of costumers who Once the firefly is constructed, its objective function is calcu-
are assigned to each route and 2 is the start and the end points lated accordingly. The objective function is the total distance of
(the depot) of route i. TSP solution representation (TSP-SR) is
all routes in the corresponding firefly. The distance of each route
represented as one dimension array (N), where N is the number
is calculated by the sum of euclidean distances between all its
of customers including the depot. The two representations help
CVRP-FA algorithm to transform from CVRP to TSP in easy way costumers including the depot in the start and the end points.
and vice versa. The purpose of the local search transformation will Because CVRP is a minimization problem, the firefly with lower
be discussed in Section 4.5. objective function value is the most attractive one.
4 A.M. Altabeeb, A.M. Mohsen and A. Ghallab / Applied Soft Computing Journal 84 (2019) 105728

Algorithm 3: Pseudo-code of local search procedure


1 begin
2 Input: The current firefly xi and the best firefly xbest ;
3 Output: The improved firefly x′i ;
4 similarity_degree= hamming_distance(xi ,xbest );
5 if similarity_degree < (n/2) then
6 Generate xnew from xi by improved 2-Opt;
7 end
8 else
9 Transform xi to TSP-SR y;
10 Enhance y by 2-h-opt;
11 Transform y to CVRP-SR xnew ;
Fig. 2. Example of computing HD for two fireflies.
12 end
13 if objectiv efunction(xnew ) <= objectiv efunction(xi ) then
14 Let x′i =xnew ;
15 end
4.3. Computing the light intensity of fireflies
16 else
17 Let x′i =xi ;
To compute the light intensity of each firefly, firstly HD is used 18 end
to calculate the distance between each firefly and the lightest one 19 Return x′i ;
which is the best solution. HD between two fireflies is the number 20 end
of non-corresponding elements in the two fireflies. HD of CVRP
firefly, which is represented by a giant-tour, is calculated by the
comparison of the order of costumers in the giant-tour (excluding Algorithm 4: Pseudo-code of mutation procedure
the depot). Fig. 2 shows an example of two fireflies (xi , xbest ) with 1 begin
nine customers to explain how HD is calculated. It is clear from 2 Input: The current firefly xi and M − R;
the figure, HD between xi and xbest is five. 3 Output: The firefly x′i ;
After HD is calculated, The light intensity of the firefly i (Ii ) is 4 Generate rand = random(0,1);
5 if rand <= M − R then
computed using Eq. (9). According to Ii , the firefly i moved toward 6 Step1: For firefly xi , select one route r1 ,in the firefly at random;
another brighter firefly. 7 Step2: select two customers c1 and c2 ,in the route r1 at random;
8 Step3: Swap xi (r1 (c1 )) and xi (r1 (c2 ));
Ii = Ramdom(1, HDi,best ) (9) 9 end
10 Generate rand = random(0,1);
11 if rand <= M − R then
4.4. Crossover 12 Step1: For firefly xi , select two routes r1 and r2 ,in the firefly at
random;
According to a predefined probability of crossover, partially 13 Step2: select two customers c1 from route r1 and c2 from route r2
randomly;
matched crossover (PMX) is applied between the global best
14 Step3: Swap xi (r1 (c1 )) and xi (r2 (c2 ));
firefly position xbest and the current firefly position xi to improve 15 end
the ability of the local exploitation for the firefly algorithm. After 16 Return new mutated firefly x′i ;
crossing, the objective function of xi is compared with the objec- 17 end
tive function of the two offspring produced by PMX to select the
best one as the new firefly position x′i .

4.5. Local search 4.7. Termination criterion

To enhance the quality of the solutions and accelerate the The steps of CVRP-FA is repeated, until the predefined termi-
convergence, two types of local search are applied to produce nation criteria of CVRP-FA are met. These criteria are the maxi-
new firefly position xnew . In the first procedure, If HD between mum number of iteration or the best known solution. Finally, the
xbest and xi is less than n/2 where n is customers’ number, each best firefly x∗ is return as an output of the algorithm.
route in xi is enhanced by applying improved 2-Opt procedure
according to HD. Meanwhile, in the second procedure, xi is trans-
5. Results and discussion
formed from multi route CVRP-SR to a single route TSP-SR y
and applying 2-h-opt procedure. The key idea here is to find the
In this section, the experimental results to analyze the perfor-
customers’ locations which are close to each other and rebuild the
multi route CVRP-SR i.e. xnew accordingly. After that, the objective mance of CVRP-FA are introduced. CVRP-FA is coded in java and
function of xi is compared with that of xnew to select the best one run the code over 12 computers with specifications of Intel i-5 at
as x′i . The steps of local search is illustrated in Algorithm 3. 3.2 GHz CPU and 4 GB RAM, running under a 32-bit Windows 7.
CVRP-FA is tested on 83 instances from four standard benchmarks
4.6. Mutation including Augerat et al. A, B, and P [34], Christofides and Eilon
E and M [35] as shown in Table 1. CVRP-FA runs 10 times in-
Two types of mutation techniques are used to maintain the dependently for each tested instance. CVRP-FA has two stopping
diversity of the fireflies and prevent the fireflies in the next move- criteria either when it reaches to the best-known solution (BKS)
ment from converging into local minima. According to a given or the maximum number of iteration i.e. 1000 iterations. It is
probability of mutation, each firefly in the population may be worth noting that for some datasets such as A-n33-k6, B-n52-
modified to produce new firefly via two types of mutation or one k7 and P-n76-k4 the proposed algorithm terminates after when
of them. In the first mutation, two customers are selected ran- BKS is found in the early iterations. Meanwhile, it reaches the
domly from the same route and swapped. In the second mutation, maximum number of iteration for other datasets such as A-n80-
two customers are selected randomly from two different random k10 and B-n78-k10. After that the obtained results including the
routes and swapped. The pseudo-code of mutation procedure is best and average found solutions are tied together with numerous
listed in Algorithm 4. text scripts and EXCEL sheets.
A.M. Altabeeb, A.M. Mohsen and A. Ghallab / Applied Soft Computing Journal 84 (2019) 105728 5

Table 1 Table 5
The range of nodes number for each benchmark. S/N ratios obtained from the Taguchi experimental design.
Benchmarks #instances Range Level P-S M-R C-R
A 27 32–80 1 −60.04 −60.06 −60.03
B 23 31–78 2 −60.04 −59.99 −60.03
P 24 16–101 3 −60.02 −60.00 −60.03
E 8 22–76 4 −60.02 −60.02 −60.02
M 1 200 5 −60.01 −60.06 −60.03
Delta 0.03 0.07 0.01
Rank 2 1 3
Table 2
CVRP-FA’s parameters and their levels.
Factors Level 1 Level 2 Level 3 Level 4 Level 5 Table 6
P-S 50 70 90 100 110 Parameter levels and values for predictions.
M-R 0.01 0.1 0.3 0.5 0.7 Parameters Level Value
C-R 0.7 0.8 0.9 0.95 1 P-S 5 110
M-R 2 0.10
C-R 4 0.95
Table 3
The orthogonal array L25 .
Experiment P-S M-R C-R Table 7
1 50 0.01 0.7 The results of CVRP-FA in comparison with CFAGA.
2 50 0.1 0.8 Instance BK CVRP-FA CFAGA
3 50 0.3 0.9 Best Avg. Best Avg.
. . . .
. . . . A-n32-k5 784 796 798.1 791.84 944.6
23 110 0.3 0.8 P-n19-k2 212 212 212 218.17 239.56
24 110 0.5 0.9 P-n22-k2 216 216 216 219.55 239.9
25 110 0.7 0.95 P-n45-k5 510 510 510 519.13 611.94
E-n23-k3 569 569 569 573.55 724.84

Table 4
CVRP tested instances.
Name City It is clear from Fig. 3 that the better performance and robust-
A-n33-k5 33 ness of CVRP-FA is when its parameters P-S, M-R and C-R are
A-n46-k7 46 set to the levels 5, 3 and 4 respectively. The predicted values for
A-n80-k10 80 CVRP-FA’s parameters are listed in Table 6.
B-n35-k5 35
B-n50-k7 50
5.2. Performance analyses of CVRP-FA
B-n68-k9 68
F-n45-k4 45
F-n72-k4 72 This section shows the behavior of CVRP-FA to reach BKS or
M-n101-k10 101 near to BKS with two CVRP large instances i.e. P-n101-k4 and
M-n200-k17. Thus, the findings can be generalized to the other
instances.
5.1. CVRP-FA’s parameters tuning using Taguchi method Fig. 4 demonstrates the results of P-n101-k4 and M-n200-k17
instances from a single run of CVRP-FA. The figure depicts the
best found and the average solution obtained during the run and
The statistical Taguchi experimental design is applied for
shows the convergence behavior of CVRP-FA.
CVRP-FA’s parameters tuning and to determining the best values
The figure shows how quickly CVRP-FA algorithm finds BKS of
of these parameters. Taguchi classifies parameters into control-
P-n101-k4 and M-n200-k17 after around 360 and 680 iterations
lable and noise parameters. This method is used to minimize
respectively. It is noticed that during the initial stage, CVRP-FA
the effect of noisy parameters and determine optimal levels
has high convergence speed with diversified solutions. During the
of important controllable parameters based on the concept of search process, CVRP-FA provides a good balance between diver-
robustness [36]. sification and intensification. This balance helps CVRP-FA to ex-
Minitab software is used to generate and analyze the Taguchi plore the search space efficiently and converges to the promising
results. CVRP-FA’s parameters (factors) and their levels are de- areas of optimal solution. Additionally, no stagnation happened
termined as shown in Table 2. In the case of an experiment during the search process.
where classic full factorials are used, 35 = 243 experiments
would be needed for each observation value. However, Taguchi 5.3. Comparison with other FA variants
method generates an appropriate orthogonal array with 25 ex-
periments (L25 ) which provides a balance among the orthogonal This section presents the comparison of CVRP-FA results with
index, parameters, and levels to identify the effective parameters the results of the recent two firefly algorithm variants CFAGA and
and levels as shown in Table 3. hybrid firefly.
Table 4 shows the subset instances that are used to conduct Table 7 shows the comparison of CVRP-FA with CFAGA [25].
the 25 experiments. Each experiment is conducted 10 times to Column 1 shows CVRP instances; column 2 shows BKS and the re-
increase the reliability of the experiments. The average results of maining columns give the values of the evaluation measurements
all different observation values are evaluated by transforming the i.e. the best found solutions over all runs (Best) and the average
results into S/N ratios in the Taguchi experimental design. It can of solutions over all runs(Avg.).
be concluded from Table 5 that the significance of parameters With respect to the best found solution and average solutions,
prevails in the following order of importance: (1) M-R; (2) P-S; as it can be seen from the tabulated values, CVRP-FA is signif-
(3) C-R icantly superior to CFAGA. CVRP-FA is able to obtain BKS in all
6 A.M. Altabeeb, A.M. Mohsen and A. Ghallab / Applied Soft Computing Journal 84 (2019) 105728

Fig. 3. The plots obtained from the Taguchi experimental design.

Fig. 4. The objective function landscape of a single run of CVRP-FA.

runs for four out of five instances whereas CFAGA fails to obtain Table 8
it. Moreover, in terms of the average, CVRP-FA achieves better The results of CVRP-FA in comparison with hybrid firefly for benchmark A.
results than CFAGA in all instances. Instance BK Hybrid firefly CVRP-FA
Tables 8–11 show the comparison of the results of CVRP-FA Best Best Avg
with those of hybrid firefly [24] for A, B, P and E benchmarks. The
A-n32-k5 784 831 796 798.1
results show that CVRP-FA achieves significantly better results A-n33-k5 661 711 661 661
than hybrid firefly. A-n33-k6 742 783 742 742.7
For benchmark A, in terms of the best found solution, Table 8 A-n34-k5 778 827 778 778
reveals that CVRP-FA finds BKS in 12 out of 27 instances whereas A-n36-k5 799 870 799 804.2
A-n37-k5 669 669 669 669
hybrid firefly fails to find it. Both algorithms attain similar results
A-n37-k6 949 1021 949 955.5
to BKS in only one instance i.e. A-n37-k5. Furthermore, CVRP-FA A-n38-k5 730 787 730 730.7
obtains solutions that are near to BSK and outperforms hybrid A-n39-k5 822 898 822 822
firefly in the remaining instances. A-n39-k6 831 868 831 834.6
For benchmark B, Table 9 shows that both algorithms are able A-n44-k6 937 1051 937 937
to find BKS in B-n31-k5 and B-n34-k5 instances. CVRP-FA obtains A-n45-k6 944 1108 953 959.4
A-n45-k7 1146 1281 1147 1153.3
solutions that are close to BSK and overcomes hybrid firefly in A-n46-k7 914 1049 914 914
12 out of 23 instances. Moreover, CVRP-FA finds BKS in nine A-n48-k7 1073 1218 1073 1073
instances whereas hybrid firefly fails to find the same results in A-n53-k7 1010 1200 1011 1014.8
terms of the best found solution. A-n54-k7 1167 1374 1172 1172
Referring to Table 10, with respect to the best found solution, A-n55-k9 1073 1324 1074 1078.6
A-n60-k9 1354 1650 1355 1364.7
CVRP-FA overcomes hybrid firefly in four instances of benchmark
A-n61-k9 1034 1362 1039 1048.4
E i.e. E-n51-k5, E-n76-k10, E-n76-k14 and E-n76-k7. Moreover, A-n62-k8 1288 1566 1298 1312.2
CVRP-FA finds BKS as hybrid firefly in the remaining instances. A-n63-k10 1314 1606 1314 1333.4
For benchmark P, both algorithms are able to obtain BKS in A-n63-k9 1616 1976 1630 1644.8
seven out of 23 instances. CVRP-FA finds BKS and outperforms A-n64-k9 1401 1684 1420 1424.9
hybrid firefly in 10 instances. Moreover, CVRP-FA finds solutions A-n65-k9 1174 1522 1178 1180.7
A-n69-k9 1159 1534 1162 1174
that are near to BSK and better than hybrid firefly in six instances A-n80-k10 1763 2235 1773 1787.2
with respect to the best found solution as shown in Table 11.
Generally speaking, the overall results demonstrate that CVRP-
FA is superior to CFAGA and hybrid firefly in almost all tested in-
stances. This superiority may refer to the adding of crossover and In addition, it is worth highlighting that the computational
mutation operations which maintain a balance between intensi- capability of CVRP-FA is able to find new solutions which are
fication and diversification. Furthermore, they enhance the learn- better than BKS 1016, 506, 590, 629, 576 and 1328 for six in-
ing capability of CVRP-FA from the previously detected promising stances B-n51-k7, E-n30-k3, P-n22-k8, P-n50-k8, P-n55-k8 and
areas and exploit the current search space efficiently. M-n200-k17 respectively as shown in Fig. 5.
A.M. Altabeeb, A.M. Mohsen and A. Ghallab / Applied Soft Computing Journal 84 (2019) 105728 7

Fig. 5. New solutions obtained by CVRP-FA.

5.4. Statistical analysis an independent variable. It used to compare differences between


two independent groups.
Under the null hypothesis which means the mean ranks of
For rigorous and fair conclusions, the statistical analysis is
conducted using the obtained results. According to Shapiro–Wilk each pair of the groups i.e. CVRP-FA and hybrid firefly are the
test, the tested variables i.e. algorithms were not normally dis- same. The Mann–Whitney U test is conducted using the obtained
tributed. Therefore, the non-parametric test should be used such results i.e. Best. The results depicted in Table 12, clearly show that
as Mann–Whitney U test. The Mann–Whitney U test is a non- the p-value p of the first group is 0.016, which is less than 0.05.
parametric test for a between-subjects design using two levels of According to this result, the null hypothesis of Mann–Whitney
8 A.M. Altabeeb, A.M. Mohsen and A. Ghallab / Applied Soft Computing Journal 84 (2019) 105728

Table 9 Table 11
The results of CVRP-FA in comparison with hybrid firefly for benchmark B. The results of CVRP-FA in comparison with hybrid firefly for benchmark P.
Instance BK Hybrid firefly CVRP-FA Instance BK Hybrid firefly CVRP-FA
Best Best Avg Best Best Avg
B-n31-k5 672 672 672 672 P-n16-k8 450 450 450 450
B-n34-k5 788 788 788 789.7 P-n19-k2 212 212 212 212
B-n35-k5 955 986 955 955.1 P-n20-k2 216 216 216 216
B-n38-k6 805 834 806 806.2 P-n21-k2 211 211 211 211
B-n39-k5 549 605 550 553.9 P-n22-k2 216 216 216 216
B-n41-k6 829 919 829 829.8 603 603 602.5
P-n22-k8 603
B-n43-k6 742 793 742 742 – 590** 590
B-n44-k7 909 1003 909 913.3 P-n23-k8 529 529 529 529
B-n45-k5 751 843 751 754.2 P-n40-k5 458 508 458 459.9
B-n45-k6 678 751 686 692.8 P-n45-k5 510 595 510 510
B-n50-k7 741 838 741 744.8 P-n50-k10 696 843 697 702.9
B-n50-k8 1312 1414 1318 1329.6 P-n50-k7 554 689 554 557.3
1230 1032 1021 828 631 633.4
B-n51-k7 1032 P-n50-k8 631
– 1016** 1017.4 – 629** 632.9
B-n52-k7 747 889 747 747.6 P-n51-k10 741 895 742 750.3
B-n56-k7 707 825 709 713.9 P-n55-k10 694 853 698 699.4
B-n57-k7 1153 1469 1153 1162.5 P-n55-k7 568 670 568 573.5
B-n57-k9 1598 1802 1610 1615.2 P-n55-k8 588 741 576*** 577
B-n63-k10 1496 1811 1503 1540.6 P-n60-k10 744 940 749 752.6
B-n64-k9 861 1162 862 887.8 P-n60-k15 968 1195 968 983.2
B-n66-k9 1316 1560 1319 1324.8 P-n65-k10 792 1020 792 799.3
B-n67-k10 1032 1318 1042 1067.6 P-n70-k10 827 1119 827 827.9
B-n68-k9 1272 1512 1278 1288.1 P-n76-k4 593 733 593 598.8
B-n78-k10 1221 1625 1224 1248 P-n76-k5 627 832 628 630.7
P-n101-k4 681 874 681 684.7
**Indicates new solution with increasing number of routes by 1.
**Indicates new solution with increasing number of routes by 1.
***Indicates new solution with decreasing number of routes by 1.
Table 10
The results of CVRP-FA in comparison with hybrid firefly for benchmark E.
Instance BK Hybrid firefly CVRP-FA Table 12
Mann–Whitney U test statistics for CVRP-FA and hybrid firefly.
Best Best Avg
Best
E-n22-k4 375 375 375 375
E-n23-k3 569 569 569 569 Mann–Whitney U 2558.5
534 534 534.6 Wilcoxon W 5879.5
E-n30-k3 534 Z −2.419
– 506** 512.5
E-n33-k4 835 835 835 845.2 Asymp. Sig. (2-tailed) 0.016
E-n51-k5 521 626 521 521
E-n76-k10 830 1186 835 844.1
E-n76-k14 1021 1406 1029 1039.3
E-n76-k7 682 922 683 688.9 For future work, CVRP-FA algorithm can be applied to solve
M-n200-k17 1373 – 1328* 1338.7 other VRPs such as VRP with time window or different combina-
*Indicates new solution with the same number of routes of BKS. torial optimization problems. CVRP-FA can be further developed
**Indicates new solution with increasing number of routes by 1. using a cooperative model.

Declaration of competing interest


U test is rejected. Therefor, it can be concluded that there are
significant differences between CVRP-FA and hybrid firefly. No author associated with this paper has disclosed any po-
tential or pertinent conflicts which may be perceived to have
6. Conclusion impending conflict with this work. For full disclosure statements
refer to https://doi.org/10.1016/j.asoc.2019.105728.
This paper proposed a new variant of FA, called CVRP-FA, to
solve CVRP. Two types of local search algorithms, improved 2- Acknowledgment
opt and 2-h-opt, were integrated to enhance the solution’s quality
and speed up the convergence. PMX crossover and two mutations We would like to thank Dr. Waleed Mohammed Abdullah
operators were used to improve the ability of local exploitation Ahmed for his quick and precise proofreading of this paper.
toward the promising area and to maintain the diversity of the
fireflies and prevent the fireflies from converging into local min- References
ima. Furthermore, the best values of CVRP-FA’s parameters are
determined via Taguchi method which shows that the best com- [1] X.-S. Yang, Firefly algorithms for multimodal optimization, in: International
Symposium on Stochastic Algorithms, Springer, 2009, pp. 169–178.
bination values of the parameters are 110, 0.10 and 0.95 for P-S,
[2] I. Fister, I. Fister Jr, X.-S. Yang, J. Brest, A comprehensive review of firefly
M-R and C-R respectively. The experimental results proved that algorithms, Swarm Evol. Comput. 13 (2013) 34–46.
CVRP-FA was effective to solve CVRP instances with a satisfactory [3] I. Fister, X.-S. Yang, D. Fister, I. Fister Jr, Firefly algorithm: a brief review of
performance. CVRP-FA was significantly superior over CFAGA and the expanding literature, in: Cuckoo Search and Firefly Algorithm, Springer,
hybrid firefly algorithms in terms of the best found solution and 2014, pp. 347–360.
[4] A. Chatterjee, G.K. Mahanti, A. Chatterjee, Design of a fully digital con-
the average solutions in all tested CVRP instances. CVRP-FA was
trolled reconfigurable switched beam concentric ring array antenna using
able to find new best solutions to six instances i.e. B-n51-k7, firefly and particle swarm optimization algorithm, Prog. Electromagn. Res.
E-n30-k3, P-n22-k8, P-n50-k8, P-n55-k8 and M-n200-k17. B 36 (2012) 113–131.
A.M. Altabeeb, A.M. Mohsen and A. Ghallab / Applied Soft Computing Journal 84 (2019) 105728 9

[5] B. Basu, G.K. Mahanti, Fire fly and artificial bees colony algorithm for syn- [22] E. Osaba, R. Carballedo, X.-S. Yang, F. Diaz, An Evolutionary Discrete Firefly
thesis of scanned and broadside linear array antenna, Prog. Electromagn. Algorithm with Novel Operators for Solving the Vehicle Routing Problem
Res. B 32 (2011) 169–190. with Time Windows, Springer International Publishing, Cham, 2016, pp.
[6] M.A. Zaman, A. Matin, et al., Nonuniformly spaced linear antenna array 21–41.
design using firefly algorithm, Int. J. Microw. Sci. Technol. (2012). [23] E. Osaba, X.-S. Yang, F. Diaz, E. Onieva, A.D. Masegosa, A. Perallos, A
[7] S. Abd-Elazim, E. Ali, Load frequency controller design of a two-area system discrete firefly algorithm to solve a rich vehicle routing problem modelling
composing of pv grid and thermal generator via firefly algorithm, Neural a newspaper distribution system with recycling policy, Soft Comput. (2016)
Comput. Appl. 30 (2) (2018) 607–616. 1–14.
[8] B. Rampriya, K. Mahadevan, S. Kannan, Unit commitment in deregu- [24] P.-P. Matthopoulos, S. Sofianopoulou, A firefly algorithm for the
lated power system using lagrangian firefly algorithm, in: Communication heterogeneous fixed fleet vrp, Int. J. Ind. Syst. Eng. (2019).
Control and Computing Technologies (ICCCCT), 2010 IEEE International [25] M. Saraei, S.A. Ghaheri, An effective hybrid algorithm for vehicle routing
Conference on, IEEE, 2010, pp. 389–393. problem by indicating capacity using genetic and firefly algorithms, Int. J.
[9] S.M. Farahani, A.A. Abshouri, B. Nasiri, M. Meybodi, Some hybrid models Eng. Educ. (IJEE) (2017).
to improve firefly algorithm performance, Int. J. Artif. Intell. 8 (12) (2012) [26] N. Zhao, Z. Wu, Y. Zhao, T. Quan, Ant colony optimization algorithm with
97–117. mutation mechanism and its applications, Expert Syst. Appl. 37 (7) (2010)
[10] A. Abdullah, S. Deris, M.S. Mohamad, S.Z.M. Hashim, A new hybrid firefly 4805–4810.
algorithm for complex and nonlinear problem, in: Distributed Computing [27] Z. Yanwei, L. Longlong, Q. Zhenyu, W. Wanliang, A discrete hybrid invasive
and Artificial Intelligence, Springer, 2012, pp. 673–680. weed optimization algorithm for the capacitated vehicle routing problem,
[11] A. Rajini, V.K. David, A comparative performance study on hybrid swarm Procedia Comput. Sci. 91 (2016) 978–987, promoting Business Analytics
model for micro array data, Int. J. Comput. Appl. 30 (6) (2011) 10–14. and Quantitative Management of Technology: 4th International Conference
[12] X.-S. Yang, S. Deb, Eagle strategy using lévy walk and firefly algorithms on Information Technology and Quantitative Management (ITQM 2016).
for stochastic optimization, in: Nature Inspired Cooperative Strategies for [28] J.J. Bentley, Fast algorithms for geometric traveling salesman problems,
Optimization (NICSO 2010), Springer, 2010, pp. 101–111. ORSA J. Comput. 4 (4) (1992) 387–411.
[13] I. Fister Jr., X.-S. Yang, I. Fister, J. Brest, Memetic firefly algorithm for [29] L. Shih-Wei, L. Zne-Jung, Y. Kuo-Ching, L. Chou-Yuan, Applying hybrid
combinatorial optimization, arXiv preprint arXiv:1204.5165. meta-heuristics for capacitated vehicle routing problem, Expert Syst. Appl.
[14] M.-H. Horng, Vector quantization using the firefly algorithm for image 36 (2, Part 1) (2009) 1505–1512.
compression, Expert Syst. Appl. 39 (1) (2012) 1078–1091. [30] S. Irnich, P. Toth, D. Vigo, Chapter 1: The family of vehicle routing prob-
[15] M. Sayadi, R. Ramezanian, N. Ghaffari-Nasab, A discrete firefly meta- lems, in: Vehicle Routing: Problems, Methods, and Applications, second
heuristic with local search for makespan minimization in permutation flow ed., SIAM, 2014, pp. 1–33.
shop scheduling problems, Int. J. Ind. Eng. Comput. 1 (1) (2010) 1–10. [31] C.B. Mouaouia, A.H. Hacene, S. Said, An integration of lagrangian split and
[16] S. Karthikeyan, P. Asokan, S. Nickolas, T. Page, A hybrid discrete firefly al- vns: The case of the capacitated vehicle routing problem, Comput. Oper.
gorithm for solving multi-objective flexible job shop scheduling problems, Res. 78 (2017) 513–525.
Int. J. Bio-Inspired Comput. 7 (6) (2015) 386–401. [32] M. Amous, S. Toumi, B. Jarboui, M. Eddaly, A variable neighborhood search
[17] D. Zouache, F. Nouioua, A. Moussaoui, Quantum-inspired firefly algorithm algorithm for the capacitated vehicle routing problem, Electron. Notes
with particle swarm optimization for discrete optimization problems, Soft Discrete Math. 58 (2017) 231–238.
Comput. 20 (7) (2016) 2781–2799. [33] E. Osaba, R. Carballedo, F. Diaz, E. Onieva, A. Masegosa, A. Perallos, Good
[18] G.K. Jati, et al., Evolutionary Discrete Firefly Algorithm for Travelling practice proposal for the implementation, presentation, and comparison of
Salesman Problem, Springer, 2011. metaheuristics for solving routing problems, Neurocomputing 271 (2018)
[19] M. Saraei, R. Analouei, P. Mansouri, Solving of travelling salesman problem 2–8.
using firefly algorithm with greedy approach, Cumhur. Sci. J. 36 (6) (2015) [34] P. Augerat, J.M. Belenguer, E. Benavent, A. Corberán, D. Naddef, G. Rinaldi,
267–273. Computational results with a branch-and-cut code for the capacitated
[20] L. Zhou, L. Ding, X. Qiang, Y. Luo, An improved discrete firefly algorithm for vehicle routing problem.
the traveling salesman problem, J. Comput. Theor. Nanosci. 12 (7) (2015) [35] N. Christofides, S. Eilon, An algorithm for the vehicle-dispatching problem,
1184–1189. J. Oper. Res. Soc. 20 (3) (1969) 309–318.
[21] A.M. Mohsen, W. Al-Sorori, A new hybrid discrete firefly algorithm [36] M. Alssager, Z.A. Othman, Taguchi-Based Parameter Setting of Cuckoo
for solving the traveling salesman problem, in: Applied Computing and Search Algorithm for Capacitated Vehicle Routing Problem, Springer
Information Technology, Springer, 2017, pp. 169–180. International Publishing, Cham, 2016, pp. 71–79.

You might also like