Research Article Heuristic-Based Firefly Algorithm...

13
Research Article Heuristic-Based Firefly Algorithm for Bound Constrained Nonlinear Binary Optimization M. Fernanda P. Costa, 1 Ana Maria A. C. Rocha, 2 Rogério B. Francisco, 1 and Edite M. G. P. Fernandes 2 1 Department of Mathematics and Applications, Centre of Mathematics, University of Minho, 4710-057 Braga, Portugal 2 Algoritmi Research Centre, University of Minho, 4710-057 Braga, Portugal Correspondence should be addressed to M. Fernanda P. Costa; [email protected] Received 30 May 2014; Accepted 20 September 2014; Published 8 October 2014 Academic Editor: Imed Kacem Copyright © 2014 M. Fernanda P. Costa et al. is 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. Firefly algorithm (FA) is a metaheuristic for global optimization. In this paper, we address the practical testing of a heuristic- based FA (HBFA) for computing optima of discrete nonlinear optimization problems, where the discrete variables are of binary type. An important issue in FA is the formulation of attractiveness of each firefly which in turn affects its movement in the search space. Dynamic updating schemes are proposed for two parameters, one from the attractiveness term and the other from the randomization term. ree simple heuristics capable of transforming real continuous variables into binary ones are analyzed. A new sigmoid “erf” function is proposed. In the context of FA, three different implementations to incorporate the heuristics for binary variables into the algorithm are proposed. Based on a set of benchmark problems, a comparison is carried out with other binary dealing metaheuristics. e results demonstrate that the proposed HBFA is efficient and outperforms binary versions of differential evolution (DE) and particle swarm optimization (PSO). e HBFA also compares very favorably with angle modulated version of DE and PSO. It is shown that the variant of HBFA based on the sigmoid “erf ” function with “movements in continuous space” is the best, in terms of both computational requirements and accuracy. 1. Introduction is paper aims to analyze the merit, in terms of performance, of a heuristic-based firefly algorithm (HBFA) for computing the optimal and binary solution of bound constrained non- linear optimization problems. e problem to be addressed has the form min () subject to ∈Ω⊂ R (a compact convex set) ∈ {0, 1} for = 1, . . . , , (1) where is a continuous function. Due to the compactness of Ω, we also have , =1,...,, where and are the vectors of the lower and upper bounds, respectively. We do not assume that is differentiable and convex. Instead of searching for any local (nonglobal) solution we want the globally best binary point. Direct search methods might be suitable since we do not assume differentiability. However, they are only local optimization procedures and therefore there is no guarantee that a global solution is reached. For global optimization, stochastic methods are generally used and aim to explore the search space and converge to a global solution. Metaheuristics are higher-level procedures or heuristics that are designed to search for good solutions, known as near-optimal solutions, with less computational effort and time than more classical algorithms. ey are usually nondeterministic and their behaviors do not depend on problem’s properties. Population-based metaheuristics have been used to solve a variety of optimization problems, from continuous to the combinatorial ones. Metaheuristics are common for solving discrete binary optimization problems [110]. Many approaches have been developed aiming to solve nonlinear programming problems Hindawi Publishing Corporation Advances in Operations Research Volume 2014, Article ID 215182, 12 pages http://dx.doi.org/10.1155/2014/215182

Transcript of Research Article Heuristic-Based Firefly Algorithm...

Page 1: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

Research ArticleHeuristic-Based Firefly Algorithm for Bound ConstrainedNonlinear Binary Optimization

M Fernanda P Costa1 Ana Maria A C Rocha2

Rogeacuterio B Francisco1 and Edite M G P Fernandes2

1 Department of Mathematics and Applications Centre of Mathematics University of Minho 4710-057 Braga Portugal2 Algoritmi Research Centre University of Minho 4710-057 Braga Portugal

Correspondence should be addressed to M Fernanda P Costa mfcmathuminhopt

Received 30 May 2014 Accepted 20 September 2014 Published 8 October 2014

Academic Editor Imed Kacem

Copyright copy 2014 M Fernanda P Costa et al This is an open access article distributed under the Creative Commons AttributionLicense which permits unrestricted use distribution and reproduction in any medium provided the original work is properlycited

Firefly algorithm (FA) is a metaheuristic for global optimization In this paper we address the practical testing of a heuristic-based FA (HBFA) for computing optima of discrete nonlinear optimization problems where the discrete variables are of binarytype An important issue in FA is the formulation of attractiveness of each firefly which in turn affects its movement in the searchspace Dynamic updating schemes are proposed for two parameters one from the attractiveness term and the other from therandomization term Three simple heuristics capable of transforming real continuous variables into binary ones are analyzed Anew sigmoid ldquoerf rdquo function is proposed In the context of FA three different implementations to incorporate the heuristics forbinary variables into the algorithm are proposed Based on a set of benchmark problems a comparison is carried out with otherbinary dealing metaheuristics The results demonstrate that the proposed HBFA is efficient and outperforms binary versions ofdifferential evolution (DE) and particle swarm optimization (PSO)The HBFA also compares very favorably with angle modulatedversion of DE and PSO It is shown that the variant of HBFA based on the sigmoid ldquoerf rdquo function with ldquomovements in continuousspacerdquo is the best in terms of both computational requirements and accuracy

1 Introduction

Thispaper aims to analyze themerit in terms of performanceof a heuristic-based firefly algorithm (HBFA) for computingthe optimal and binary solution of bound constrained non-linear optimization problems The problem to be addressedhas the form

min 119891 (119909)

subject to 119909 isin Ω sub R119899 (a compact convex set)

119909119897isin 0 1 for 119897 = 1 119899

(1)

where 119891 is a continuous function Due to the compactness ofΩ we also have 119871119887

119897le 119909119897le 119880119887119897 119897 = 1 119899 where 119871119887 and 119880119887

are the vectors of the lower and upper bounds respectivelyWe do not assume that119891 is differentiable and convex Insteadof searching for any local (nonglobal) solution we want the

globally best binary point Direct search methods might besuitable since we do not assume differentiability Howeverthey are only local optimization procedures and thereforethere is no guarantee that a global solution is reached Forglobal optimization stochastic methods are generally usedand aim to explore the search space and converge to aglobal solution Metaheuristics are higher-level proceduresor heuristics that are designed to search for good solutionsknown as near-optimal solutions with less computationaleffort and time than more classical algorithms They areusually nondeterministic and their behaviors do not dependon problemrsquos properties Population-based metaheuristicshave been used to solve a variety of optimization problemsfrom continuous to the combinatorial ones

Metaheuristics are common for solving discrete binaryoptimization problems [1ndash10] Many approaches have beendeveloped aiming to solve nonlinear programming problems

Hindawi Publishing CorporationAdvances in Operations ResearchVolume 2014 Article ID 215182 12 pageshttpdxdoiorg1011552014215182

2 Advances in Operations Research

with mixed-discrete variables by transforming the discreteproblem into a continuous one [11] The most used andsimple approach solves the continuous relaxed problem andthen discretizes the obtained solution by using a round-ing scheme This type of approach works well on sim-ple and small dimension academic and benchmark prob-lems but may be somehow limited on some real-worldapplications

Recently ametaheuristic optimization algorithm termedfirefly algorithm (FA) that mimics the social behavior offireflies based on the flashing and attraction characteristicsof fireflies has been developed [12 13] This is a swarm intel-ligence optimization algorithm that is capable of competingwith the most well-known algorithms like ant colony opti-mization particle swarm optimization artificial bee colonyartificial fish swarm and cuckoo-search

FA performance is controlled by three parameters therandomization parameter 120572 the attractiveness 120573 and theabsorption coefficient 120574 Authors have argued that its effi-ciency is due to its capability of subdividing the populationinto subgroups (since local attraction is stronger than long-distance attraction) and its ability to adapt the search toproblem landscape by controlling the parameter 120574 [14 15]Several variants of the firefly algorithm do already exist inthe literature Based on the settings of their parameters aclassification scheme has appeared Gaussian FA [16] hybridFA with harmony search [17] hybrid genetic algorithm withFA [18] self-adaptive step FA [15] and modified FA in [19]are just a few examples Further improvements have beenmade aiming to accelerate convergence (see eg [20ndash22]) Apractical convergence analysis of FA with different parametersets is presented in [23] FA has become popular and widelyused in recent years in many applications like economicdispatch problems [24] and mixed variable optimizationproblems [25]The extension of FA tomultiobjective continu-ous optimization has already been investigated [26] A recentreview of firefly algorithms is available in [14]

Based on the effectiveness of FA in continuous opti-mization it is predicted that it will perform well whensolving discrete optimization problems Discrete versions ofthe FA are available for solving discrete NP hard optimizationproblems [27 28]

The main purpose of this study is to incorporate someheuristics aiming to deal with binary variables in the fireflyalgorithm for solving nonlinear optimization problems withbinary variables The binary dealing methods that wereimplemented are adaptations of well-known heuristics fordefining 0 and 1 bit strings from real variables Furthermorea new sigmoid function aiming to constrain a real valuedvariable to the range [0 1] is also proposed Three differentimplementations to incorporate the heuristics for binaryvariables and adapt FA to binary optimization are proposedWe apply the proposed heuristic strategies to solve a set ofbenchmark nonlinear problems and show that the newlydeveloped HBFA is effective in binary nonlinear program-ming

The remaining part of the paper is organized as followsSection 2 reviews the standard FA and presents new dynamicupdates for some FA parameters and Section 3 describes

different heuristic strategies and reports on their implemen-tations to adapt FA to binary optimization All the heuristicapproaches are validated with tests on a set of well-knownbound constrained problemsThese results and a comparisonwith other methods in the literature are shown in Section 4Finally the conclusions and ideas for future work are listed inSection 5

2 Firefly Algorithm

Firefly algorithm is a bioinspired metaheuristic algorithmthat is able to compute a solution to an optimization problemIt is inspired by the flashing behavior of fireflies at nightAccording to [12 13 19] the three main rules used toconstruct the standard algorithm are the following

(i) all fireflies are unisex meaning that any firefly can beattracted to any other brighter one

(ii) the attractiveness of a firefly is determined by itsbrightness which is associated with the encodedobjective function

(iii) attractiveness is directly proportional to brightnessbut decreases with distance

Throughout this paper we let sdot represent the Euclideannorm of a vector We use the vector 119909 = (119909

1 1199092 119909

119899)119879

to represent the position of a firefly in the search space Theposition of the firefly 119895 will be represented by 119909119895 isin R119899 Weassume that the size of the population of fireflies is 119898 Inthe context of problem (1) firefly 119895 is brighter than firefly 119894

if 119891(119909119895) lt 119891(119909119894)

21 Standard FA First in the standard FA the positions ofthe fireflies are randomly generated in the search space Ω asfollows

119909119894119897= 119871119887119897+ rand (119880119887

119897minus 119871119887119897) for 119897 = 1 119899 (2)

where rand is a uniformly distributed random number in[0 1] hereafter represented by rand sim 119880[0 1] The move-ment of a firefly 119894 is attracted to another brighter firefly 119895 andis given by

119909119894 = 119909119894 + 120573 (119909119895 minus 119909119894) + 120572 (rand minus 05) 119878 (3)

where 120572 isin [0 1] is the randomization parameter rand sim119880[0 1] 119878 isin R119899 is a problem dependent vector of scalingparameters and

120573 = 1205730exp (minus12057410038171003817100381710038171003817119909

119894 minus 11990911989510038171003817100381710038171003817119901

) for 119901 ge 1 (4)

gives the attractiveness of a firefly which varies with the lightintensitybrightness seen by adjacent fireflies and the distancebetween themselves and 120573

0is the attraction parameter when

the distance is zero [12 13 22 29] Besides the presented ldquoexprdquofunction any monotonically decreasing function could beusedTheparameter 120574which characterizes the variation of theattractiveness is the light absorption coefficient and is crucial

Advances in Operations Research 3

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Evaluate 119891(119909119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and |119891(1199091) minus 119891lowast| gt 120578 do

forall 119909119894 such that 119894 = 2 119898 doforall 119909119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573Move firefly 119894 towards 119895 using (3)

Evaluate 119891(119909119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 1 Standard FA

to determine the speed of convergence of the algorithm Intheory 120574 could take any value in the set [0infin)When 120574 rarr 0the attractiveness is constant 120573 = 120573

0 meaning that a flashing

firefly can be seen anywhere in the search space This isan ideal case for a problem with a single (usually global)optimum since it can easily be reached On the other handwhen 120574 rarr infin the attractiveness is almost zero in the sightof other fireflies and each firefly moves in a random wayIn particular when 120573

0= 0 the algorithm behaves like a

random search method [13 22]The randomization term canbe extended to the normal distribution119873(0 1) or to any otherdistribution [15] Algorithm 1 presents the main steps of thestandard FA (on continuous space)

22 Dynamic Updates of 120572 and 120574 The relative value of theparameters 120572 and 120574 affects the performance of FA Theparameter 120572 controls the randomness or to some extent thediversity of solutions Parameter 120574 aims to scale the attractionpower of the algorithm Small values of 120574 with large values of120572 can increase the number of iterations required to convergeto an optimal solution Experience has shown that 120572 musttake large values at the beginning of the iterative process toenforce the algorithm to increase the diversity of solutionsHowever small 120572 values combined with small values of 120574in the final iterations increase the fine-tuning of solutionssince the effort is focused on exploitation Thus it is possibleto improve the quality of the solution by reducing the ran-domness Convergence can be improved by varying the ran-domization parameter 120572 so that it decreases gradually as theoptimum solution is approaching [22 24 26 29] In order toimprove convergence speed and solution accuracy dynamicupdates of the parameters 120572 and 120574 of FA which depend onthe iteration counter 119896 of the algorithm are implemented asfollows

Similarly to the factor which controls the amplifica-tion of differential variations in differential evolution (DE)metaheuristic [5] the inertial weight in particle swarmoptimization (PSO) [29 30] and the pitch adjusting rate inthe harmony search (HS) algorithm [31] we allow the value

of 120572 to decrease linearly with 119896 from an upper level 120572max to alower level 120572min

120572 (119896) = 120572max minus 119896120572max minus 120572min

119896max (5)

where 119896max is the maximum number of allowed iterationsTo increase the attractiveness with 119896 the parameter 120574 isdynamically updated by

120574 (119896) = 120574max exp(119896

119896maxln(

120574min120574max

)) (6)

where 120574min and 120574max are the minimum variation and maxi-mum variation of attractiveness respectively

23 Levy Dependent Randomization Term We remark thatour implementation of the randomization term in the pro-posed dynamic FA considers the Levy distribution Based onthe attractiveness 120573 in (4) the equation for the movementof firefly 119894 towards a brighter firefly 119895 can be written asfollows

119909119894 = 119909119894 + 119910119894 with 119910119894 = 120573 (119909119895 minus 119909119894) + 120572119871 (1199091) 120590119894119909 (7)

where 119871(1199091) is a random number from the Levy distributioncentered at 1199091 the position of the brightest firefly with anunitary standard deviation The vector 120590119894

119909represents the

variation around 1199091 (and based on real position 119909)

120590119894119909= (|1199091198941minus 11990911| |119909119894

119899minus 1199091119899|)119879

(8)

3 Dealing with Binary Variables

The standard FA is a real-coded algorithm and some mod-ifications are needed to enable it to deal with discreteoptimization problems This section describes the imple-mentation of some heuristics with FA for binary nonlinearoptimization problems In the context of the proposedHBFAthree different heuristics to transform a continuous real

4 Advances in Operations Research

variable into a binary one are presented Furthermore toextend FA to binary optimization different implementationsto incorporate the heuristic strategies into FA are describedWe will use the term ldquodiscretizationrdquo to define the processthat transforms a continuous real variable represented forexample by 119909 into a binary one represented by 119887

31 Sigmoid Logistic Function This discretization methodol-ogy is the most common in the literature when population-based stochastic algorithms are considered in binary opti-mization namely PSO [6 8 9] DE [3] HS [1 32] artificialfish swarm [33] and artificial bee colony [4 7 10]

When 119909119894 moves towards 119909119895 the likelihood is that thediscrete components of 119909119894 change from binary numbers toreal ones To transform a real number into a binary one thefollowing sigmoid logistic function constrains the real valueto the interval [0 1]

sig (119909119894119897) =

1

1 + exp (minus119909119894119897) (9)

where 119909119894119897 in the context of FA is the component 119897 of the

position vector 119909119894 (of firefly 119894) aftermovementmdashrecall (7) and(4) Equation (9) interprets the floating-point components ofa solution as a set of probabilities These are then used toassign appropriate binary values by using

119887119894119897=

1 if rand le sig (119909119894119897)

0 otherwise(10)

where sig(119909119894119897) gives the probability that the component itself

is 0 or 1 [28] and rand sim 119880[0 1] We note that during theiterative process the firefly positions 119909 were not allowed tomove outside the search space Ω

32 Proposed Sigmoid erf Function The error function isa special function with a shape that appears mainly inprobability and statistics contexts Denoted by ldquoerfrdquo themathematical function defined by the integral

erf (119909) = 2

radic120587int119909

0

exp (minus1199052) 119889119905 (11)

satisfies the following properties

erf (0) = 0 erf (minusinfin) = minus1 erf (+infin) = 1

erf (minus119909) = minus erf (119909)(12)

and it has a close relation with the normal distributionprobabilities When a series of measurements are describedby a normal distribution with mean 0 and standard deviation120590 the erf function evaluated at (119909120590radic2) for a positive119909 givesthe probability that the error of a single measurement lies inthe interval [minus119909 119909] The derivative of the erf function followsimmediately from its definition

119889

119889119905erf (119905) = 2

radic120587exp (minus1199052) for 119905 isin R (13)

x

Sigm

oid

func

tion

1

09

08

07

06

05

04

03

02

01

0minus5 minus4 minus3 minus2 minus1 0 1 2 3 4 5

1(1 + exp(minusx))05(1 + (x))erf

Figure 1 Sigmoid functions

The good properties of the erf function are thus used to definea new sigmoid function the sigmoid erf function

sig (119909119894119897) = 05 (1 + erf (119909119894

119897)) (14)

which is a bounded differentiable real function defined forall 119909 isin R and has a positive derivative at each point Acomparison of both functions (9) and (14) is depicted inFigure 1 Note that the slope at the origin of the sigmoidfunction in (14) is around 05641895 while that of function(9) is 025 thus yielding a faster growing from 0 to 1

33 Rounding to Integer Part The simplest discretizationprocedure of a continuous component of a point into 01 bituses the rounding to the integer part function known as floorfunction and is described in [34] Each continuous value119909119894119897isin R is transformed into a binary one 0 bit or 1 bit 119887119894

119897

for 119897 = 1 119899 in the following way

119887119894119897= lfloor

10038161003816100381610038161003816119909119894

119897mod 2

10038161003816100381610038161003816rfloor (15)

where lfloor119911rfloor represents the floor function of 119911 and gives thelargest integer not greater than 119911 The floating-point value119909119894119897is first divided by 2 and then the absolute value of the

remainder is floored The obtained integer number is the bitvalue of the component

34 Heuristics Implementation In this study three methodscapable of computing global solutions to binary optimizationproblems using FA are proposed

341 Movement on Continuous Space In this implemen-tation of the previously described heuristics denoted byldquomovement on continuous spacerdquo (mCS) the movementof each firefly is made on the continuous space and itsattractiveness term is updated considering the real positionvector The real position of firefly 119894 is discretized only after allmovements towards brighter fireflies have been carried outWe note that the fitness evaluation of each firefly for firefly

Advances in Operations Research 5

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119909119894 such that 119894 = 2 119898 doforall 119909119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573Move position 119909119894 of firefly 119894 towards 119909119895 using (7)

Discretize positions 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest119891)Set 119896 = 119896 + 1

Algorithm 2 HBFA with mCS

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119887119894 such that 119894 = 2 119898 doforall 119887119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573 based on distance 10038171003817100381710038171003817119887

119894 minus 11988711989510038171003817100381710038171003817119901

Move binary position 119887119894 of firefly 119894 towards 119887119895using 119909119894 = 119887119894 + 120573(119887119895 minus 119887119894) + 120572119871(1198871)120590119894

119887

Discretize position of firefly 119894 119909119894 rarr 119887119894Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 3 HBFA with mBS

ranking is always based on the binary position Algorithm 2presents the main steps of HBFA with mCS

342 Movement on Binary Space This implementationdenoted by ldquomovement on binary spacerdquo (mBS) moves thebinary position of each firefly towards the binary positionsof brighter fireflies that is each movement is made on thebinary space although the corresponding position may fail tobe 0 or 1 bit string andmust be discretized before the updatingof attractiveness Here fitness is also based on the binarypositions Algorithm 3 presents the main steps of HBFA withmBS

343 Probability for Binary Component For this implemen-tation named ldquoprobability for binary componentrdquo (pBC) weborrow the concept from the binary PSO [6 9 35] whereeach component of the velocity vector is directly used tocompute the probability that the corresponding componentof the particle position 119909119894

119897 is 0 or 1 Similarly in the FA

algorithm we do not interpret the vector 119910119894 in (7) as a step

size but rather as amean to compute the probability that eachcomponent of the position vector of firefly 119894 is 0 or 1Thus wedefine

119887119894119897=

1 if rand le sig (119910119894119897)

0 otherwise(16)

where sig() represents a sigmoid function Algorithm 4 is thepseudocode of HBFA with pBC

4 Numerical Experiments

In this section we present the computational results that wereobtained with HBFAmdashAlgorithms 2 3 and 4 using (9) (14)or (15)mdashaiming to investigate its performance when solvinga set of binary nonlinear optimization problems Two small0-1 knapsack problems are also used to test the algorithmsrsquobehavior on linear problems with 01 variables

The numerical experiments were carried out on a PCIntel Core 2 Duo Processor E7500 with 29GHz and 4Gbof memory The algorithms were coded in Matlab Version800783 (R2012b)

6 Advances in Operations Research

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119887119894 such that 119894 = 2 119898 doforall 119887119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573 based on distance 10038171003817100381710038171003817119887

119894 minus 11988711989510038171003817100381710038171003817119901

Compute 119910119894 using binary positions (see (7))Discretize 119910119894 and define 119887119894 using (16)

Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 4 HBFA with pBC

41 Experimental Setting Each experimentwas conducted 30times The size of the population is made to depend on theproblemrsquos dimension and is set to 119898 = min40 2119899 Someexperiments have been carried out to tune certain parametersof the algorithms In the proposed FA with dynamic 120572 and 120574they are set as follows 120573

0= 1 119901 = 1 120572max = 05 120572min =

001 120574max = 10 and 120574min = 01 In Algorithms 2 (mCS) 3(mBS) and 4 (pBC) iterations were limited to 119896max = 500and the tolerance for finding a good quality solution is 120578 =

10minus6 Results reported are averaged (over the 30 runs) of bestfunction values number of function evaluations and numberof iterations

42 Experimental Results First we use a set of ten bench-mark nonlinear functions with different dimensions andcharacteristics For example five functions are unimodal andthe remaining multimodal [3 9 10 36] They are displayedin Table 1 Although they are widely used in continuousoptimization we now aim to converge to a 01 bit stringsolution

First we aim to compare with the results reported in[3 9 10] Due to poor results the authors in [10] donot recommend the use of ABC to solve binary-valuedproblems The other metaheuristics therein implemented arethe following

(i) angle modulated PSO (AMPSO) and angle modu-lated DE (AMDE) that incorporate a trigonometricfunction as a bit string generator into the classic PSOand DE algorithms respectively

(ii) binary DE and PSO based on the sigmoid logisticfunction and (10) denoted by binDE and binPSOrespectively

We noticed that the problems Foxholes Griewank Rosen-brock Schaffer and Step are not correctly described in[3 9 10] Table 2 shows both the averaged best functionvalues (obtained during the 30 runs) 119891avg with the StD inparentheses and the averaged number of function evalua-tions nfe obtained with the sigmoid logistic function (see in

(9)) and (10) while using the three implementations mCSmBS and pBC Results obtained for these ten functionsindicate that our proposal HBFA produces high qualitysolutions and outperforms the binary versions binPSO andbinDE as well as AMPSO and AMDE We also note thatmCS has the best ldquonferdquo values on 6 problems mBS is betteron 3 problems (one is a tie with mCS) and pBC on 2problems Thus the performance of mCS is the best whencompared with those of mBS and pBC The latter is theleast efficient of all in particular for the large dimensionalproblems

To analyze the statistical significance of the results weperform a Friedman test This is a nonparametric statisticaltest to determine significant differences in mean for oneindependent variable with two or more levelsmdashalso denotedas treatmentsmdashand a dependent variable (or matched groupstaken as the problems) The null hypothesis in this test is thatthe mean ranks assigned to the treatments under testing arethe same Since all three implementations are able to reach thesolutions within the 120578 error tolerance on 9 out of 10 problemsthe statistical analysis is based on the performance criterionldquonferdquo In this hypothesis testing we have three treatmentsand ten groups Friedmanrsquos chi-square has a value of 2737(with a 119875 value of 0255) For 2 degrees of freedom reference1205942 distribution the critical value for a significance level of5 is 599 Hence since 2737 le 599 the null hypothesisis not rejected and we conclude that there is no evidencethat the three mean ranks values have statistically significantdifferences

To further compare the sigmoid functions with therounding to integer strategy we include in Table 3 the resultsobtained by the ldquoerfrdquo function in (14) together with (10) andthe floor function in (15) Only the implementationsmCS andmBS are tested The table also shows the averaged numberof iterations nit The results illustrate that implementationmCS (Algorithm 2) works very well with strategies based on(14) together with (10) and (15) The success rate for all theproblems is 100 meaning that the algorithms stop becausethe119891 value at the position of the bestbrightest firefly is within

Advances in Operations Research 7

Table 1 Problems set

Ackley 119891 (119909) = minus20 exp(minus02radic 1

119899

119899

sum119894=1

1199092119894) minus exp(1

119899

119899

sum119894=1

cos (2120587119909119894)) + 20 + 119890

119899 = 30Ω = [minus30 30]30 119891lowast = 0 at 119909lowast = (0 0)

Foxholes119891(119909) =

1

0002 + sum25

119895=1(1 (119895 + (119909

1minus 1198861119895)6

+ (1199092minus 1198862119895)6

))

[119886119894119895] = [

minus32 minus16 0 16 32 minus32 minus16 sdot sdot sdot 16 32

minus32 minus32 minus32 minus32 minus32 minus16 minus16 sdot sdot sdot 32 32]

119899 = 2 Ω = [minus65536 65536]2 119891lowast asymp 13 at 119909lowast = (0 0)

Griewank119891 (119909) = 1 +

1

4000

119899

sum119894=1

1199092119894minus119899

prod119894=1

cos(119909119894

radic119894)

119899 = 30 Ω = [minus300 300]30 119891lowast = 0 at 119909lowast = (0 0)

Quartic119891(119909) =

119899

sum119894=1

1198941199094119894+ 119880[0 1]

119899 = 30 Ω = [minus128 128]30 119891lowast = 0 + noise at 119909lowast = (0 0)

Rastrigin119891(119909) = 10119899 +

119899

sum119894=1

(1199092119894minus 10 cos (2120587119909

119894))

119899 = 30 Ω = [minus512 512]30 119891lowast = 0 at 119909lowast = (0 0)

Rosenbrock2 119891(119909) = 100 (11990921minus 1199092)2

+ (1 minus 1199091)2

119899 = 2 Ω = [minus2048 2048]2 119891lowast = 0 at 119909lowast = (1 1)

Rosenbrock 119891(119909) =119899minus1

sum119894=1

100(1199092119894minus 119909119894+1)2 + (1 minus 119909

119894)2

119899 = 30 Ω = [minus2048 2048]30 119891lowast = 0 at 119909lowast = (1 1)

Schaffer 119891(119909) = 05 +(sin(radic1199092

1+ 11990922))2

minus 05

(1 + 0001(11990921+ 11990922))2

119899 = 2Ω = [minus100 100]2 119891lowast = 0 at 119909lowast = (0 0)

Spherical119891 (119909) =

119899

sum119894=1

1199092119894

119899 = 3 Ω = [minus512 512]3 119891lowast = 0 at 119909lowast = (0 0 0)

Step119891(119909) = 6119899 +

119899

sum119894=1

lfloor119909119894rfloor

119899 = 5 Ω = [minus512 512]5 119891lowast = 30 at 119909lowast = (0 0 0 0 0)

a tolerance 120578 of the optimal solution 119891lowast in all runs FurthermBS (Algorithm 3) works better when the discretization ofthe variables is carried out by (15) Overall mCS based on (14)produces the best results on 6 problems mCS based on (15)gives the best results on 7 problems (including 4 ties with theformer case) mBS based on (14) wins only on one problemand mBS based on (15) wins on 3 problems (all are ties withmCS based on (15))

Further when performing the Friedman test on thefour distributions of ldquonferdquo values the chi-square statisticalvalue is 13747 (and the 119875 value is 00033) From the 1205942

distribution table the critical value for a significance levelof 5 and 3 degrees of freedom is 781 Since 13747 gt 781the null hypothesis is rejected and we conclude that theobserved differences of the four distributions are statisticallysignificant

We now introduce in the statistical analysis the resultsreported in Tables 2 and 3 concerned with both implementa-tions mCS andmBS Six distributions of ldquonferdquo values are now

in comparison Friedmanrsquos chi-square value is 18175 (119875 value= 00027) The critical value of the chi-square distributionfor a significance level of 5 and 5 degrees of freedom is1107 Thus the null hypothesis of ldquono significant differenceson mean ranksrdquo is rejected and there is evidence that thesix distributions of ldquonferdquo values have statistically significantdifferences Multiple comparisons (two at a time) may becarried out to determine which mean ranks are significantlydifferent The estimates of the 95 confidence intervalsare shown in the graph of Figure 2 for each case undertesting Two compared distributions of ldquonferdquo are significantlydifferent if their intervals are disjoint and are not significantlydifferent if their intervals overlap Hence from the six caseswe conclude that the mean ranks produced by mCS basedon (15) are significantly different from those of mBS basedon (9) and mBS based on (14) For the remaining pairs ofcomparison there are no significant differences on the meanranks

8 Advances in Operations Research

Table 2 Comparison with AMPSO binPSO binDE and AMDE based on 119891avg and StD (shown in parentheses)

Prob mCS based on (9) mBS based on (9) pBC based on (9) AMPSO binPSO binDE AMDE119891avg nfe 119891avg nfe 119891avg nfe 119891avg 119891avg 119891avg 119891avg

Ackley 888119890 minus 16 80 888119890 minus 16 1156 888119890 minus 16 2168 19711989001 20111989001 17311989001 16411989001

(00011989000) (00011989000) (00011989000) (057119890 minus 01) (049119890 minus 01) (03111989001) (07611989000)

Foxholes 12711989001 61 12711989001 72 12711989001 63 053119890 minus 10 053119890 minus 10 12911989001 5011989002

(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (00011989000) (097119890 minus 14) (08611989000) (0011989000)

Griewank 00011989000 80 00011989000 1332 00011989000 2300 10611989002 67911989001 26311989002 20611989002

(00011989000) (00011989000) (00011989000) (04411989001) (09811989001) (01011989002) (03911989001)

Quartic 455119890 minus 01 2012 537119890 minus 01 1771 488119890 minus 01 2951 41511989001 20911989001 14911989000 35511989000

(301119890 minus 01) (303119890 minus 01) (271119890 minus 01) (01911989001) (01911989001) (06611989000) (08111989000)

Rastrigin 00011989000 80 00011989000 12827 00011989000 24067 22511989002 30811989002 21411989002 90511989001

(00011989000) (00011989000) (00011989000) (03511989002) (02811989001) (04511989002) (03111989002)

Rosenbrock2 00011989000 65 00011989000 57 00011989000 61 049119890 minus 04 014119890 minus 03 020119890 minus 05 055119890 minus 04

(00011989000) (00011989000) (00011989000) (011119890 minus 03) (088119890 minus 04) (015119890 minus 04) (017119890 minus 04)

Rosenbrock 00011989000 180 00011989000 21907 00011989000 2088 22011989003 22411989003 18111989003 91411989001

(00011989000) (00011989000) (00011989000) (08611989002) (07711989002) (01611989002) (04211989002)

Schaffer 00011989000 61 00011989000 8 00011989000 49 024119890 minus 01 073119890 minus 01 minus099511989000 minus1011989000

(00011989000) (00011989000) (00011989000) (042119890 minus 02) (011119890 minus 01) (027119890 minus 06) (0011989000)

Spherical 00011989000 12 00011989000 12 00011989000 117 030119890 minus 03 030119890 minus 03 015119890 minus 03 020119890 minus 04

(00011989000) (00011989000) (00011989000) (00011989000) (0011989000) (041119890 minus 04) (015119890 minus 04)

Step 30011989001 427 30011989001 427 30011989001 48 00011989000 017119890 minus 04 015119890 minus 01 02511989000

(00011989000) (00011989000) (00011989000) (00011989000) (015119890 minus 04) (0011989000) (060119890 minus 01)

0 1 2 3 4 5 6

mBS based on (15)

mCS based on (15)

mBS based on (14)

mCS based on (14)

mBS based on (9)

mCS based on (9)

mBS based on (9) and (14) have mean ranks significantly different from mCS based on (15)

Figure 2 Confidence intervals for mean ranks of nfe

For comparative purposes we include in Table 4 theresults obtained by using the proposed Levy (L) distributionin the randomization term as shown in (7) and those pro-duced by the Uniform (U) distribution using rand sim 119880[0 1]as shown in (3) The reported tests use implementation mCS(described in Algorithm 2) with the two heuristics for binaryvariables (i) the ldquoerfrdquo function in (14) together with (10) and(ii) the floor function in (15) It is shown that the performanceof HBFA with Uniform distribution is very sensitive to thedimension of the problem since the efficiency is good when119899 is small but gets worse when 119899 is largeThus we have shownthat the Levy distribution is a very good bid

We add to some problems with 119899 = 30 from Table 1mdashAckley Griewank Rastrigin Rosenbrock and Sphericalmdashthree other functions Schwefel 222 Schwefel 226 and SumofDifferent Power to compare our results with those reportedin [1] Schwefel 222 is unimodal and for Ω = [minus10 10]30the binary solution is (0 0) with 119891lowast = 0 Schwefel 226is multimodal and in Ω = [minus500 500]30 the binary solutionis (1 1 1) with 119891lowast = minus25244129544 Sum of DifferentPower is unimodal and in Ω = [minus1 1]30 the minimum is 0at (0 0) For the results of Table 5 we use HBFA basedon mCS with both ldquoerfrdquo function in (14) together with (10)and the floor function (15) The table reports on the average

Advances in Operations Research 9

Table 3 Comparison of mCS versus mBS and (14) versus (15) based on 119891avg nfe and nit

Prob mCS based on (14) mBS based on (14) mCS based on (15) mBS based on (15)119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 6787 16 888119890 minus 16 80 1 888119890 minus 16 827 11Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12911989001 4048 1002Griewank 00011989000 80 1 00011989000 7173 169 00011989000 80 1 00011989000 827 11Quartic 238119890 minus 01 813 103 466119890 minus 01 7947 189 948119890 minus 02 80 1 393119890 minus 01 80 1Rastrigin 00011989000 80 1 00011989000 7027 166 00011989000 80 1 00011989000 80 1Rosenbrock2 00011989000 64 06 00011989000 53 03 00011989000 63 06 233119890 minus 01 4708 1167Rosenbrock 00011989000 80 1 00011989000 1053 16 00011989000 80 1 29011989001 20040 500Schaffer 00011989000 68 07 00011989000 129 22 00011989000 51 03 708119890 minus 02 2051 503Spherical 00011989000 99 02 00011989000 227 18 00011989000 101 03 00011989000 115 04Step 30011989001 459 04 30011989001 629 1 30011989001 405 03 30011989001 405 03

Table 4 Comparison between Levy and Uniform distributions in the randomization term based on 119891avg nfe and nit (with StD inparentheses)

Prob mCS based on (14) + L mCS based on (14) + U mCS based on (15) + L mCS based on (15) + U119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 1096 264 888119890 minus 16 80 1 141e00 20040 500(00011989000) (00011989000) (00011989000) (126119890 minus 02)

Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12711989001 68 07(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (903119890 minus 15)

Griewank 00011989000 80 1 00011989000 2436 599 00011989000 80 1 127119890 minus 01 20040 500(00011989000) (00011989000) (00011989000) (276119890 minus 02)

Quartic 238119890 minus 01 813 103 69011989000 14692 3662 948119890 minus 02 80 1 510119890 minus 01 10581 2635(170119890 minus 01) (11611989001) (103119890 minus 01) (290119890 minus 01)

Rastrigin 00011989000 80 1 00011989000 1157 279 00011989000 80 1 100119890 minus 01 18104 4516(00011989000) (00011989000) (00011989000) (403119890 minus 01)

Rosenbrock2 00011989000 64 06 00011989000 368 82 00011989000 63 06 00011989000 59 05(00011989000) (00011989000) (00011989000) (00011989000)

Rosenbrock 00011989000 80 1 82211989001 14136 3524 00011989000 80 1 74211989001 17698 4412(00011989000) (10211989002) (00011989000) (84311989001)

Schaffer 00011989000 68 07 00011989000 185 36 00011989000 51 03 00011989000 56 04(00011989000) (00011989000) (00011989000) (00011989000)

Spherical 00011989000 99 02 00011989000 133 07 00011989000 101 03 00011989000 147 08(00011989000) (00011989000) (00011989000) (00011989000)

Step 30011989001 459 04 30011989001 469 05 30011989001 405 03 30011989001 523 06(00011989000) (00011989000) (00011989000) (00011989000)

Table 5 Comparison of HBFA (with mCS) with ABHS in [1] based on 119891avg nfe and SR ()

Prob mCS based on (14) mCS based on (15) ABHS in [1]119891avg nfe SR () 119891avg nfe SR () 119891avg nfe SR ()

Ackley 888119890 minus 16 80 100 888119890 minus 16 80 100 156119890 minus 01 62350 90

Griewank 00011989000 80 100 00011989000 80 100 330119890 minus 02 79758 38

Rastrigin 00011989000 80 100 00011989000 80 100 13211989001 90000 0

Rosenbrock 00011989000 80 100 00011989000 80 100 68011989002 90000 0

Schwefel 222 00011989000 80 100 00011989000 80 100 00011989000 59870 100

Schwefel 226 minus25211989001 80 100 minus24711989001 10867 87 minus119511989004 90000 0

Spherical 00011989000 80 100 00011989000 80 100 00011989000 62234 100

Sum of Different Power 00011989000 91 100 00011989000 168 100 00011989000 80371 100

10 Advances in Operations Research

Table 6 Results for varied dimensions (119899 = 50 100 200) considering119898 = 40

119891lowast 119899mCS based on (14) mCS based on (15)

119891avg StD nfe nit 119891avg StD nfe nit

Ackley00011989000 50 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 100 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 200 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

Griewank00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Quartic00011989000 + noise 50 224119890 minus 01 195119890 minus 01 827 11 143119890 minus 01 159119890 minus 01 80 1

00011989000 + noise 100 432119890 minus 01 273119890 minus 01 1467 27 173119890 minus 01 110119890 minus 01 80 1

00011989000 + noise 200 523119890 minus 01 294119890 minus 01 17387 425 196119890 minus 01 213119890 minus 01 813 103

Rosenbrock00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Spherical00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Step30011989002 50 30011989002 00011989000 80 1 30011989002 00011989000 80 1

60011989002 100 60011989002 00011989000 80 1 60011989002 00011989000 80 1

12011989003 200 12011989003 00011989000 80 1 12011989003 00011989000 80 1

function values average number of function evaluations andsuccess rate (SR) Here 50 independent runs were carriedout to compare with the results shown in [1] The maximumnumber of function evaluations therein used was 90000 Itis shown that our HBFA outperforms the proposed adaptivebinary harmony search (ABHS)

43 Effect of Problemrsquos Dimension on HBFA Performance Wenow consider six problems with varied dimensions from theprevious set to analyze the effect of problemrsquos dimension onthe HBFA performance We test three dimensions 119899 = 50119899 = 100 and 119899 = 200 The algorithmrsquos parameters areset as previously defined We remark that the size of thepopulation for all the tested problems and dimensions is 40points

Table 6 contains the results for comparison based onaveraged values of 119891 number of function evaluationsand number of iterations The ldquoStDrdquo of the 119891 values arealso displayed Since the implementation mCS shown inAlgorithm 2 performs better and shows more consistentresults than the other two we tested only mCS based on (14)and mCS based on (15)

Besides testing significant differences on the mean ranksproduced by the two treatments mCS based on (14) andmCSbased on (15) we also want to determine if the differences onmean ranks produced by problemrsquos dimensionmdash50 100 and200mdashare statistically significant at a significance level of 5Hence we aim to analyze the effects of two factors ldquoArdquo andldquoBrdquo ldquoArdquo is the HBFA implementation (with two levels) andldquoBrdquo is the problemrsquos dimension (with three levels) For thispurpose the results obtained for the six problems for each

combination of the levels of ldquoArdquo and ldquoBrdquo are considered asreplications When performing the Friedman test for factorldquoArdquo the chi-square statistical value is 1225 (119875 value = 02685)with 1 degree of freedom The critical value for a significancelevel of 5 and 1 degree of freedom in the 1205942 distributiontable is 384 and there is no evidence of statistically significantdifferences From the Friedman test for factor ldquoBrdquo we alsoconclude that there is no evidence of statistically significantdifferences since the chi-square statistical value is 0746 (119875value = 06886) with 2 degrees of freedom (The critical valueof the 1205942 distribution table for a significance level of 5 and2 degrees of freedom is 599) Hence we conclude that thedimension of the problem does not affect the algorithmrsquos per-formance Only with problem Quartic the efficiency of mCSbased on (14) getsworse as dimension increasesOverall bothtested strategies are rather effective when binary solutions arerequired on small as well as on large nonlinear optimizationproblems

44 Solving 0-1 Knapsack Problems Finally we aim to analyzethe behavior of our best tested strategies when solvingwell-known binary and linear optimization problems Forthis preliminary experiment we selected two small knap-sack problems The 0-1 knapsack problem (KP) can bedescribed as follows Let 119899 be the number of items fromwhich we have to select some of them to be carried in aknapsack Let 119908

119897and V

119897be the weight and the value of

item 119897 respectively and let 119882 be the knapsackrsquos capac-ity It is usually assumed that all weights and values arenonnegative The objective is to maximize the total value

Advances in Operations Research 11

of the knapsack under the constraint of the knapsackrsquoscapacity

max119909

119881 (119909) equiv119899

sum119897=1

V119897119909119897

st119899

sum119897=1

119908119897119909119897le 119882 119909

119897isin 0 1 119897 = 1 119899

(17)

If item 119897 is selected 119909119897= 1 otherwise 119909

119897= 0 Using a penalty

function this problem can be transformed into

min119909

minus119899

sum119897=1

V119897119909119897+ 120583max0

119899

sum119897=1

119908119897119909119897minus119882 (18)

where 120583 is the penalty parameter which was set to be 100 inthis experiment

Case 1 (an instance of a 0-1 KP with 4 items) Knapsackrsquoscapacity is 119882 = 6 and the vectors of values and weights areV = (40 15 20 10) and 119908 = (4 2 3 1) Based on the above-mentioned parameters the HBFA with mCS based on (14)was run 30 times and the averaged results were the followingWith a success rate of 100 items 1 and 2 are included in theknapsack and items 3 and 4 are excluded with a maximumvalue of 55 (StD = 00e00) On average the runs required08 iterations and 293 function evaluations With a successrate of 23 the heuristic based on the floor function thusmCS based on (15) reached 119891avg = 49 (StD = 40e00) afteran average of 61611 function evaluations and an average of3841 iterations

Case 2 (an instance of a 0-1 KP with 8 items) The maximumcapacity of the knapsack is set to 8 and the vectors ofvalues and weights are V = (83 14 54 79 72 52 48 62) and119908 = (3 2 3 2 1 2 2 3) The results are averaged over the 30runs After 87 iterations and 3867 function evaluations themaximum value produced by the strategy mCS based on (14)is 286 (StD = 00e00) with a success rate of 100 Items 14 5 and 6 are included in the knapsack and the others areexcluded The heuristic mCS based on (15) did not reach theoptimal solution All runs required 500 iterations and 20040function evaluations and the average function values were119891avg = 227 with StD = 314e01

5 Conclusions and Future Work

In this work we have implemented several heuristics tocompute a global optimal binary solution of bound con-strained nonlinear optimization problems which have beenincorporated into FA yielding the herein called HBFA Theproblems addressed in this study have bounded continu-ous search space Our FA proposal uses dynamic updatingschemes for two parameters 120574 from the attractiveness termand 120572 from the randomization term and considers the Levydistribution to create randomness in firefly movement Theperformance behavior of the proposed heuristics has beeninvestigated Three simple heuristics capable of transformingreal continuous variables into binary ones are implemented

A new sigmoid ldquoerfrdquo function is proposed In the context ofthe firefly algorithm three different implementations aimingto incorporate the heuristics for binary variables into FAare proposed (mCS mBS and pBC) Based on a set ofbenchmark problems a comparison is carried out with otherbinary dealing metaheuristics namely AMPSO binPSObinDE and AMDE The experimental results show that theimplementation denoted bymCSwhen combined with eitherthe new sigmoid ldquoerfrdquo function or the rounding schemebased on the floor function is quite efficient and superiorto the other methods in comparison The statistical analysiscarried out on the results shows evidence of statisticallysignificant differences on efficiency measured by the numberof function evaluations between the implementation mCSbased on the floor function approach and the mBS basedon both tested sigmoid functions schemes We have alsoinvestigated the effect of problemrsquos dimension on the perfor-mance of our algorithmUsing the Friedman statistical testweconclude that the differences on efficiency are not statisticallysignificant Another simple experiment has shown that theimplementation mCS with the sigmoid ldquoerfrdquo function iseffective in solving two small 0-1 KPThe performance of thissimple heuristic strategy will be further analyzed to solvelarge and multidimensional 0-1 KP Future developmentsconcerning the HBFA will consider its extension to dealwith integer variables in nonlinear optimization problemsDifferent heuristics to transform continuous real variablesinto integer variableswill be investigated Challengingmixed-integer nonconvex nonlinear problems will be solved

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors wish to thank two anonymous referees fortheir valuable suggestions to improve the paper This workhas been supported by FCT (Fundacao para a Ciencia eTecnologia Portugal) in the scope of the Projects PEst-OEMATUI00132014 and PEst-OEEEIUI03192014

References

[1] L Wang R Yang Y Xu Q Niu P M Pardalos and MFei ldquoAn improved adaptive binary harmony search algorithmrdquoInformation Sciences vol 232 pp 58ndash87 2013

[2] M A K Azad A M A C Rocha and E M G P FernandesldquoImproved binary artificial fish swarm algorithm for the 0-1multidimensional knapsack problemsrdquo Swarm and Evolution-ary Computation vol 14 pp 66ndash75 2014

[3] A P Engelbrecht andG Pampara ldquoBinary differential evolutionstrategiesrdquo in Proceedings of the IEEE Congress on EvolutionaryComputation (CEC rsquo07) pp 1942ndash1947 September 2007

[4] M H Kashan N Nahavandi and A H Kashan ldquoDisABC anew artificial bee colony algorithm for binary optimizationrdquoApplied Soft Computing Journal vol 12 no 1 pp 342ndash352 2012

12 Advances in Operations Research

[5] M H Kashan A H Kashan and N Nahavandi ldquoA noveldifferential evolution algorithm for binary optimizationrdquo Com-putational Optimization and Applications vol 55 no 2 pp 481ndash513 2013

[6] J Kennedy and R C Eberhart ldquoA discrete binary versionof the particle swarm algorithmrdquo in Proceedings of the IEEEInternational Conference on Systems Man and Cybernetics vol5 pp 4104ndash4108 Orlando Fla USA October 1997

[7] T Liu L Zhang and J Zhang ldquoStudy of binary artificialbee colony algorithm based on particle swarm optimizationrdquoJournal of Computational Information Systems vol 9 no 16 pp6459ndash6466 2013

[8] S Mirjalili and A Lewis ldquoS-shaped versus V-shaped transferfunctions for binary particle swarm optimizationrdquo Swarm andEvolutionary Computation vol 9 pp 1ndash14 2013

[9] G Pampara A P Engelbrecht and N Franken ldquoBinarydifferential evolutionrdquo in Proceedings of the IEEE Congress onEvolutionary Computation (CEC rsquo06) pp 1873ndash1879 VancouverCanada July 2006

[10] G Pampara and A P Engelbrecht ldquoBinary artificial bee colonyoptimizationrdquo in Proceedings of the IEEE Symposium on SwarmIntelligence (SIS rsquo11) pp 1ndash8 IEEE Perth April 2011

[11] S Burer and A N Letchford ldquoNon-convex mixed-integer non-linear programming a surveyrdquo Surveys in Operations Researchand Management Science vol 17 no 2 pp 97ndash106 2012

[12] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Proceedings of the Stochastic Algorithms Foundations andApplications (SAGA rsquo09) O Watanabe and T Zeugmann Edsvol 5792 of Lecture Notes in Computer Science pp 169ndash1782009

[13] X-S Yang ldquoFirefly algorithm stochastic test functions anddesign optimizationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[14] I Fister Jr X-S Yang and J Brest ldquoA comprehensive review offirefly algorithmsrdquo Swarm and Evolutionary Computation vol13 pp 34ndash46 2013

[15] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[16] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoA Gaussian firefly algorithmrdquo International Journal of MachineLearning and Computing vol 1 no 5 pp 448ndash453 2011

[17] L Guo G-G Wang H Wang and D Wang ldquoAn effectivehybrid firefly algorithmwith harmony search for global numer-ical optimizationrdquoTheScientificWorld Journal vol 2013 ArticleID 125625 9 pages 2013

[18] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoSome hybrid models to improve firefly algorithm perfor-mancerdquo International Journal of Artificial Intelligence vol 8 no12 pp 97ndash117 2012

[19] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 467631 12pages 2012

[20] X Lin Y Zhong and H Zhang ldquoAn enhanced firefly algorithmfor function optimisation problemsrdquo International Journal ofModelling Identification and Control vol 18 no 2 pp 166ndash1732013

[21] A Manju and M J Nigam ldquoFirefly algorithm with fireflieshaving quantum behaviorrdquo in Proceedings of the InternationalConference on Radar Communication and Computing (ICRCCrsquo12) pp 117ndash119 IEEE Tiruvannamalai India December 2012

[22] X-S Yang and X He ldquoFirefly algorithm recent advances andapplicationsrdquo International Journal of Swarm Intelligence vol 1no 1 pp 36ndash50 2013

[23] S Arora and S Singh ldquoThe firefly optimization algorithmconvergence analysis and parameter selectionrdquo InternationalJournal of Computer Applications vol 69 no 3 pp 48ndash52 2013

[24] X-S Yang S S S Hosseini and A H Gandomi ldquoFireflyalgorithm for solving non-convex economic dispatch problemswith valve loading effectrdquo Applied Soft Computing Journal vol12 no 3 pp 1180ndash1186 2012

[25] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using firefly algorithmrdquo Computers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[26] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering with Computers vol 29 no 2 pp175ndash184 2013

[27] A N Kumbharana and G M Pandey ldquoSolving travellingsalesman problemusing firefly algorithmrdquo International Journalfor Research in ScienceampAdvanced Technologies vol 2 no 2 pp53ndash57 2013

[28] M K Sayadi A Hafezalkotob and S G J Naini ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[29] X-S Yang ldquoFirefly algorithmrdquo inNature-InspiredMetaheuristicAlgorithms pp 81ndash96 Luniver Press University of CambridgeCambridge UK 2nd edition 2010

[30] A R Jordehi and J Jasni ldquoParameter selection in particle swarmoptimisation a surveyrdquo Journal of Experimental amp TheoreticalArtificial Intelligence vol 25 no 4 pp 527ndash542 2013

[31] M Mahdavi M Fesanghary and E Damangir ldquoAn improvedharmony search algorithm for solving optimization problemsrdquoAppliedMathematics and Computation vol 188 no 2 pp 1567ndash1579 2007

[32] M Padberg ldquoHarmony search algorithms for binary optimiza-tion problemsrdquo in Operations Research Proceedings 2011 pp343ndash348 Springer Berlin Germany 2012

[33] M A K Azad A M A C Rocha and E M G P FernandesldquoA simplified binary artificial fish swarm algorithm for unca-pacitated facility location problemsrdquo in Proceedings of WorldCongress on Engineering S I Ao L Gelman D W L HukinsA Hunter and A M Korsunsky Eds vol 1 pp 31ndash36 IAENGLondon UK 2013

[34] M Sevkli and A R Guner ldquoA continuous particle swarm opti-mization algorithm for uncapacitated facility location problemrdquoin Ant Colony Optimization and Swarm Intelligence M DorigoL M Gambardella M Birattari A Martinoli R Poli and TStutzle Eds vol 4150 of Lecture Notes in Computer Sciencespp 316ndash323 Springer 2006

[35] L Wang and C Singh ldquoUnit commitment considering genera-tor outages through a mixed-integer particle swarm optimiza-tion algorithmrdquoApplied SoftComputing Journal vol 9 no 3 pp947ndash953 2009

[36] MM Ali C Khompatraporn and Z B Zabinsky ldquoA numericalevaluation of several stochastic algorithms on selected con-tinuous global optimization test problemsrdquo Journal of GlobalOptimization vol 31 no 4 pp 635ndash672 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 2: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

2 Advances in Operations Research

with mixed-discrete variables by transforming the discreteproblem into a continuous one [11] The most used andsimple approach solves the continuous relaxed problem andthen discretizes the obtained solution by using a round-ing scheme This type of approach works well on sim-ple and small dimension academic and benchmark prob-lems but may be somehow limited on some real-worldapplications

Recently ametaheuristic optimization algorithm termedfirefly algorithm (FA) that mimics the social behavior offireflies based on the flashing and attraction characteristicsof fireflies has been developed [12 13] This is a swarm intel-ligence optimization algorithm that is capable of competingwith the most well-known algorithms like ant colony opti-mization particle swarm optimization artificial bee colonyartificial fish swarm and cuckoo-search

FA performance is controlled by three parameters therandomization parameter 120572 the attractiveness 120573 and theabsorption coefficient 120574 Authors have argued that its effi-ciency is due to its capability of subdividing the populationinto subgroups (since local attraction is stronger than long-distance attraction) and its ability to adapt the search toproblem landscape by controlling the parameter 120574 [14 15]Several variants of the firefly algorithm do already exist inthe literature Based on the settings of their parameters aclassification scheme has appeared Gaussian FA [16] hybridFA with harmony search [17] hybrid genetic algorithm withFA [18] self-adaptive step FA [15] and modified FA in [19]are just a few examples Further improvements have beenmade aiming to accelerate convergence (see eg [20ndash22]) Apractical convergence analysis of FA with different parametersets is presented in [23] FA has become popular and widelyused in recent years in many applications like economicdispatch problems [24] and mixed variable optimizationproblems [25]The extension of FA tomultiobjective continu-ous optimization has already been investigated [26] A recentreview of firefly algorithms is available in [14]

Based on the effectiveness of FA in continuous opti-mization it is predicted that it will perform well whensolving discrete optimization problems Discrete versions ofthe FA are available for solving discrete NP hard optimizationproblems [27 28]

The main purpose of this study is to incorporate someheuristics aiming to deal with binary variables in the fireflyalgorithm for solving nonlinear optimization problems withbinary variables The binary dealing methods that wereimplemented are adaptations of well-known heuristics fordefining 0 and 1 bit strings from real variables Furthermorea new sigmoid function aiming to constrain a real valuedvariable to the range [0 1] is also proposed Three differentimplementations to incorporate the heuristics for binaryvariables and adapt FA to binary optimization are proposedWe apply the proposed heuristic strategies to solve a set ofbenchmark nonlinear problems and show that the newlydeveloped HBFA is effective in binary nonlinear program-ming

The remaining part of the paper is organized as followsSection 2 reviews the standard FA and presents new dynamicupdates for some FA parameters and Section 3 describes

different heuristic strategies and reports on their implemen-tations to adapt FA to binary optimization All the heuristicapproaches are validated with tests on a set of well-knownbound constrained problemsThese results and a comparisonwith other methods in the literature are shown in Section 4Finally the conclusions and ideas for future work are listed inSection 5

2 Firefly Algorithm

Firefly algorithm is a bioinspired metaheuristic algorithmthat is able to compute a solution to an optimization problemIt is inspired by the flashing behavior of fireflies at nightAccording to [12 13 19] the three main rules used toconstruct the standard algorithm are the following

(i) all fireflies are unisex meaning that any firefly can beattracted to any other brighter one

(ii) the attractiveness of a firefly is determined by itsbrightness which is associated with the encodedobjective function

(iii) attractiveness is directly proportional to brightnessbut decreases with distance

Throughout this paper we let sdot represent the Euclideannorm of a vector We use the vector 119909 = (119909

1 1199092 119909

119899)119879

to represent the position of a firefly in the search space Theposition of the firefly 119895 will be represented by 119909119895 isin R119899 Weassume that the size of the population of fireflies is 119898 Inthe context of problem (1) firefly 119895 is brighter than firefly 119894

if 119891(119909119895) lt 119891(119909119894)

21 Standard FA First in the standard FA the positions ofthe fireflies are randomly generated in the search space Ω asfollows

119909119894119897= 119871119887119897+ rand (119880119887

119897minus 119871119887119897) for 119897 = 1 119899 (2)

where rand is a uniformly distributed random number in[0 1] hereafter represented by rand sim 119880[0 1] The move-ment of a firefly 119894 is attracted to another brighter firefly 119895 andis given by

119909119894 = 119909119894 + 120573 (119909119895 minus 119909119894) + 120572 (rand minus 05) 119878 (3)

where 120572 isin [0 1] is the randomization parameter rand sim119880[0 1] 119878 isin R119899 is a problem dependent vector of scalingparameters and

120573 = 1205730exp (minus12057410038171003817100381710038171003817119909

119894 minus 11990911989510038171003817100381710038171003817119901

) for 119901 ge 1 (4)

gives the attractiveness of a firefly which varies with the lightintensitybrightness seen by adjacent fireflies and the distancebetween themselves and 120573

0is the attraction parameter when

the distance is zero [12 13 22 29] Besides the presented ldquoexprdquofunction any monotonically decreasing function could beusedTheparameter 120574which characterizes the variation of theattractiveness is the light absorption coefficient and is crucial

Advances in Operations Research 3

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Evaluate 119891(119909119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and |119891(1199091) minus 119891lowast| gt 120578 do

forall 119909119894 such that 119894 = 2 119898 doforall 119909119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573Move firefly 119894 towards 119895 using (3)

Evaluate 119891(119909119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 1 Standard FA

to determine the speed of convergence of the algorithm Intheory 120574 could take any value in the set [0infin)When 120574 rarr 0the attractiveness is constant 120573 = 120573

0 meaning that a flashing

firefly can be seen anywhere in the search space This isan ideal case for a problem with a single (usually global)optimum since it can easily be reached On the other handwhen 120574 rarr infin the attractiveness is almost zero in the sightof other fireflies and each firefly moves in a random wayIn particular when 120573

0= 0 the algorithm behaves like a

random search method [13 22]The randomization term canbe extended to the normal distribution119873(0 1) or to any otherdistribution [15] Algorithm 1 presents the main steps of thestandard FA (on continuous space)

22 Dynamic Updates of 120572 and 120574 The relative value of theparameters 120572 and 120574 affects the performance of FA Theparameter 120572 controls the randomness or to some extent thediversity of solutions Parameter 120574 aims to scale the attractionpower of the algorithm Small values of 120574 with large values of120572 can increase the number of iterations required to convergeto an optimal solution Experience has shown that 120572 musttake large values at the beginning of the iterative process toenforce the algorithm to increase the diversity of solutionsHowever small 120572 values combined with small values of 120574in the final iterations increase the fine-tuning of solutionssince the effort is focused on exploitation Thus it is possibleto improve the quality of the solution by reducing the ran-domness Convergence can be improved by varying the ran-domization parameter 120572 so that it decreases gradually as theoptimum solution is approaching [22 24 26 29] In order toimprove convergence speed and solution accuracy dynamicupdates of the parameters 120572 and 120574 of FA which depend onthe iteration counter 119896 of the algorithm are implemented asfollows

Similarly to the factor which controls the amplifica-tion of differential variations in differential evolution (DE)metaheuristic [5] the inertial weight in particle swarmoptimization (PSO) [29 30] and the pitch adjusting rate inthe harmony search (HS) algorithm [31] we allow the value

of 120572 to decrease linearly with 119896 from an upper level 120572max to alower level 120572min

120572 (119896) = 120572max minus 119896120572max minus 120572min

119896max (5)

where 119896max is the maximum number of allowed iterationsTo increase the attractiveness with 119896 the parameter 120574 isdynamically updated by

120574 (119896) = 120574max exp(119896

119896maxln(

120574min120574max

)) (6)

where 120574min and 120574max are the minimum variation and maxi-mum variation of attractiveness respectively

23 Levy Dependent Randomization Term We remark thatour implementation of the randomization term in the pro-posed dynamic FA considers the Levy distribution Based onthe attractiveness 120573 in (4) the equation for the movementof firefly 119894 towards a brighter firefly 119895 can be written asfollows

119909119894 = 119909119894 + 119910119894 with 119910119894 = 120573 (119909119895 minus 119909119894) + 120572119871 (1199091) 120590119894119909 (7)

where 119871(1199091) is a random number from the Levy distributioncentered at 1199091 the position of the brightest firefly with anunitary standard deviation The vector 120590119894

119909represents the

variation around 1199091 (and based on real position 119909)

120590119894119909= (|1199091198941minus 11990911| |119909119894

119899minus 1199091119899|)119879

(8)

3 Dealing with Binary Variables

The standard FA is a real-coded algorithm and some mod-ifications are needed to enable it to deal with discreteoptimization problems This section describes the imple-mentation of some heuristics with FA for binary nonlinearoptimization problems In the context of the proposedHBFAthree different heuristics to transform a continuous real

4 Advances in Operations Research

variable into a binary one are presented Furthermore toextend FA to binary optimization different implementationsto incorporate the heuristic strategies into FA are describedWe will use the term ldquodiscretizationrdquo to define the processthat transforms a continuous real variable represented forexample by 119909 into a binary one represented by 119887

31 Sigmoid Logistic Function This discretization methodol-ogy is the most common in the literature when population-based stochastic algorithms are considered in binary opti-mization namely PSO [6 8 9] DE [3] HS [1 32] artificialfish swarm [33] and artificial bee colony [4 7 10]

When 119909119894 moves towards 119909119895 the likelihood is that thediscrete components of 119909119894 change from binary numbers toreal ones To transform a real number into a binary one thefollowing sigmoid logistic function constrains the real valueto the interval [0 1]

sig (119909119894119897) =

1

1 + exp (minus119909119894119897) (9)

where 119909119894119897 in the context of FA is the component 119897 of the

position vector 119909119894 (of firefly 119894) aftermovementmdashrecall (7) and(4) Equation (9) interprets the floating-point components ofa solution as a set of probabilities These are then used toassign appropriate binary values by using

119887119894119897=

1 if rand le sig (119909119894119897)

0 otherwise(10)

where sig(119909119894119897) gives the probability that the component itself

is 0 or 1 [28] and rand sim 119880[0 1] We note that during theiterative process the firefly positions 119909 were not allowed tomove outside the search space Ω

32 Proposed Sigmoid erf Function The error function isa special function with a shape that appears mainly inprobability and statistics contexts Denoted by ldquoerfrdquo themathematical function defined by the integral

erf (119909) = 2

radic120587int119909

0

exp (minus1199052) 119889119905 (11)

satisfies the following properties

erf (0) = 0 erf (minusinfin) = minus1 erf (+infin) = 1

erf (minus119909) = minus erf (119909)(12)

and it has a close relation with the normal distributionprobabilities When a series of measurements are describedby a normal distribution with mean 0 and standard deviation120590 the erf function evaluated at (119909120590radic2) for a positive119909 givesthe probability that the error of a single measurement lies inthe interval [minus119909 119909] The derivative of the erf function followsimmediately from its definition

119889

119889119905erf (119905) = 2

radic120587exp (minus1199052) for 119905 isin R (13)

x

Sigm

oid

func

tion

1

09

08

07

06

05

04

03

02

01

0minus5 minus4 minus3 minus2 minus1 0 1 2 3 4 5

1(1 + exp(minusx))05(1 + (x))erf

Figure 1 Sigmoid functions

The good properties of the erf function are thus used to definea new sigmoid function the sigmoid erf function

sig (119909119894119897) = 05 (1 + erf (119909119894

119897)) (14)

which is a bounded differentiable real function defined forall 119909 isin R and has a positive derivative at each point Acomparison of both functions (9) and (14) is depicted inFigure 1 Note that the slope at the origin of the sigmoidfunction in (14) is around 05641895 while that of function(9) is 025 thus yielding a faster growing from 0 to 1

33 Rounding to Integer Part The simplest discretizationprocedure of a continuous component of a point into 01 bituses the rounding to the integer part function known as floorfunction and is described in [34] Each continuous value119909119894119897isin R is transformed into a binary one 0 bit or 1 bit 119887119894

119897

for 119897 = 1 119899 in the following way

119887119894119897= lfloor

10038161003816100381610038161003816119909119894

119897mod 2

10038161003816100381610038161003816rfloor (15)

where lfloor119911rfloor represents the floor function of 119911 and gives thelargest integer not greater than 119911 The floating-point value119909119894119897is first divided by 2 and then the absolute value of the

remainder is floored The obtained integer number is the bitvalue of the component

34 Heuristics Implementation In this study three methodscapable of computing global solutions to binary optimizationproblems using FA are proposed

341 Movement on Continuous Space In this implemen-tation of the previously described heuristics denoted byldquomovement on continuous spacerdquo (mCS) the movementof each firefly is made on the continuous space and itsattractiveness term is updated considering the real positionvector The real position of firefly 119894 is discretized only after allmovements towards brighter fireflies have been carried outWe note that the fitness evaluation of each firefly for firefly

Advances in Operations Research 5

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119909119894 such that 119894 = 2 119898 doforall 119909119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573Move position 119909119894 of firefly 119894 towards 119909119895 using (7)

Discretize positions 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest119891)Set 119896 = 119896 + 1

Algorithm 2 HBFA with mCS

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119887119894 such that 119894 = 2 119898 doforall 119887119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573 based on distance 10038171003817100381710038171003817119887

119894 minus 11988711989510038171003817100381710038171003817119901

Move binary position 119887119894 of firefly 119894 towards 119887119895using 119909119894 = 119887119894 + 120573(119887119895 minus 119887119894) + 120572119871(1198871)120590119894

119887

Discretize position of firefly 119894 119909119894 rarr 119887119894Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 3 HBFA with mBS

ranking is always based on the binary position Algorithm 2presents the main steps of HBFA with mCS

342 Movement on Binary Space This implementationdenoted by ldquomovement on binary spacerdquo (mBS) moves thebinary position of each firefly towards the binary positionsof brighter fireflies that is each movement is made on thebinary space although the corresponding position may fail tobe 0 or 1 bit string andmust be discretized before the updatingof attractiveness Here fitness is also based on the binarypositions Algorithm 3 presents the main steps of HBFA withmBS

343 Probability for Binary Component For this implemen-tation named ldquoprobability for binary componentrdquo (pBC) weborrow the concept from the binary PSO [6 9 35] whereeach component of the velocity vector is directly used tocompute the probability that the corresponding componentof the particle position 119909119894

119897 is 0 or 1 Similarly in the FA

algorithm we do not interpret the vector 119910119894 in (7) as a step

size but rather as amean to compute the probability that eachcomponent of the position vector of firefly 119894 is 0 or 1Thus wedefine

119887119894119897=

1 if rand le sig (119910119894119897)

0 otherwise(16)

where sig() represents a sigmoid function Algorithm 4 is thepseudocode of HBFA with pBC

4 Numerical Experiments

In this section we present the computational results that wereobtained with HBFAmdashAlgorithms 2 3 and 4 using (9) (14)or (15)mdashaiming to investigate its performance when solvinga set of binary nonlinear optimization problems Two small0-1 knapsack problems are also used to test the algorithmsrsquobehavior on linear problems with 01 variables

The numerical experiments were carried out on a PCIntel Core 2 Duo Processor E7500 with 29GHz and 4Gbof memory The algorithms were coded in Matlab Version800783 (R2012b)

6 Advances in Operations Research

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119887119894 such that 119894 = 2 119898 doforall 119887119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573 based on distance 10038171003817100381710038171003817119887

119894 minus 11988711989510038171003817100381710038171003817119901

Compute 119910119894 using binary positions (see (7))Discretize 119910119894 and define 119887119894 using (16)

Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 4 HBFA with pBC

41 Experimental Setting Each experimentwas conducted 30times The size of the population is made to depend on theproblemrsquos dimension and is set to 119898 = min40 2119899 Someexperiments have been carried out to tune certain parametersof the algorithms In the proposed FA with dynamic 120572 and 120574they are set as follows 120573

0= 1 119901 = 1 120572max = 05 120572min =

001 120574max = 10 and 120574min = 01 In Algorithms 2 (mCS) 3(mBS) and 4 (pBC) iterations were limited to 119896max = 500and the tolerance for finding a good quality solution is 120578 =

10minus6 Results reported are averaged (over the 30 runs) of bestfunction values number of function evaluations and numberof iterations

42 Experimental Results First we use a set of ten bench-mark nonlinear functions with different dimensions andcharacteristics For example five functions are unimodal andthe remaining multimodal [3 9 10 36] They are displayedin Table 1 Although they are widely used in continuousoptimization we now aim to converge to a 01 bit stringsolution

First we aim to compare with the results reported in[3 9 10] Due to poor results the authors in [10] donot recommend the use of ABC to solve binary-valuedproblems The other metaheuristics therein implemented arethe following

(i) angle modulated PSO (AMPSO) and angle modu-lated DE (AMDE) that incorporate a trigonometricfunction as a bit string generator into the classic PSOand DE algorithms respectively

(ii) binary DE and PSO based on the sigmoid logisticfunction and (10) denoted by binDE and binPSOrespectively

We noticed that the problems Foxholes Griewank Rosen-brock Schaffer and Step are not correctly described in[3 9 10] Table 2 shows both the averaged best functionvalues (obtained during the 30 runs) 119891avg with the StD inparentheses and the averaged number of function evalua-tions nfe obtained with the sigmoid logistic function (see in

(9)) and (10) while using the three implementations mCSmBS and pBC Results obtained for these ten functionsindicate that our proposal HBFA produces high qualitysolutions and outperforms the binary versions binPSO andbinDE as well as AMPSO and AMDE We also note thatmCS has the best ldquonferdquo values on 6 problems mBS is betteron 3 problems (one is a tie with mCS) and pBC on 2problems Thus the performance of mCS is the best whencompared with those of mBS and pBC The latter is theleast efficient of all in particular for the large dimensionalproblems

To analyze the statistical significance of the results weperform a Friedman test This is a nonparametric statisticaltest to determine significant differences in mean for oneindependent variable with two or more levelsmdashalso denotedas treatmentsmdashand a dependent variable (or matched groupstaken as the problems) The null hypothesis in this test is thatthe mean ranks assigned to the treatments under testing arethe same Since all three implementations are able to reach thesolutions within the 120578 error tolerance on 9 out of 10 problemsthe statistical analysis is based on the performance criterionldquonferdquo In this hypothesis testing we have three treatmentsand ten groups Friedmanrsquos chi-square has a value of 2737(with a 119875 value of 0255) For 2 degrees of freedom reference1205942 distribution the critical value for a significance level of5 is 599 Hence since 2737 le 599 the null hypothesisis not rejected and we conclude that there is no evidencethat the three mean ranks values have statistically significantdifferences

To further compare the sigmoid functions with therounding to integer strategy we include in Table 3 the resultsobtained by the ldquoerfrdquo function in (14) together with (10) andthe floor function in (15) Only the implementationsmCS andmBS are tested The table also shows the averaged numberof iterations nit The results illustrate that implementationmCS (Algorithm 2) works very well with strategies based on(14) together with (10) and (15) The success rate for all theproblems is 100 meaning that the algorithms stop becausethe119891 value at the position of the bestbrightest firefly is within

Advances in Operations Research 7

Table 1 Problems set

Ackley 119891 (119909) = minus20 exp(minus02radic 1

119899

119899

sum119894=1

1199092119894) minus exp(1

119899

119899

sum119894=1

cos (2120587119909119894)) + 20 + 119890

119899 = 30Ω = [minus30 30]30 119891lowast = 0 at 119909lowast = (0 0)

Foxholes119891(119909) =

1

0002 + sum25

119895=1(1 (119895 + (119909

1minus 1198861119895)6

+ (1199092minus 1198862119895)6

))

[119886119894119895] = [

minus32 minus16 0 16 32 minus32 minus16 sdot sdot sdot 16 32

minus32 minus32 minus32 minus32 minus32 minus16 minus16 sdot sdot sdot 32 32]

119899 = 2 Ω = [minus65536 65536]2 119891lowast asymp 13 at 119909lowast = (0 0)

Griewank119891 (119909) = 1 +

1

4000

119899

sum119894=1

1199092119894minus119899

prod119894=1

cos(119909119894

radic119894)

119899 = 30 Ω = [minus300 300]30 119891lowast = 0 at 119909lowast = (0 0)

Quartic119891(119909) =

119899

sum119894=1

1198941199094119894+ 119880[0 1]

119899 = 30 Ω = [minus128 128]30 119891lowast = 0 + noise at 119909lowast = (0 0)

Rastrigin119891(119909) = 10119899 +

119899

sum119894=1

(1199092119894minus 10 cos (2120587119909

119894))

119899 = 30 Ω = [minus512 512]30 119891lowast = 0 at 119909lowast = (0 0)

Rosenbrock2 119891(119909) = 100 (11990921minus 1199092)2

+ (1 minus 1199091)2

119899 = 2 Ω = [minus2048 2048]2 119891lowast = 0 at 119909lowast = (1 1)

Rosenbrock 119891(119909) =119899minus1

sum119894=1

100(1199092119894minus 119909119894+1)2 + (1 minus 119909

119894)2

119899 = 30 Ω = [minus2048 2048]30 119891lowast = 0 at 119909lowast = (1 1)

Schaffer 119891(119909) = 05 +(sin(radic1199092

1+ 11990922))2

minus 05

(1 + 0001(11990921+ 11990922))2

119899 = 2Ω = [minus100 100]2 119891lowast = 0 at 119909lowast = (0 0)

Spherical119891 (119909) =

119899

sum119894=1

1199092119894

119899 = 3 Ω = [minus512 512]3 119891lowast = 0 at 119909lowast = (0 0 0)

Step119891(119909) = 6119899 +

119899

sum119894=1

lfloor119909119894rfloor

119899 = 5 Ω = [minus512 512]5 119891lowast = 30 at 119909lowast = (0 0 0 0 0)

a tolerance 120578 of the optimal solution 119891lowast in all runs FurthermBS (Algorithm 3) works better when the discretization ofthe variables is carried out by (15) Overall mCS based on (14)produces the best results on 6 problems mCS based on (15)gives the best results on 7 problems (including 4 ties with theformer case) mBS based on (14) wins only on one problemand mBS based on (15) wins on 3 problems (all are ties withmCS based on (15))

Further when performing the Friedman test on thefour distributions of ldquonferdquo values the chi-square statisticalvalue is 13747 (and the 119875 value is 00033) From the 1205942

distribution table the critical value for a significance levelof 5 and 3 degrees of freedom is 781 Since 13747 gt 781the null hypothesis is rejected and we conclude that theobserved differences of the four distributions are statisticallysignificant

We now introduce in the statistical analysis the resultsreported in Tables 2 and 3 concerned with both implementa-tions mCS andmBS Six distributions of ldquonferdquo values are now

in comparison Friedmanrsquos chi-square value is 18175 (119875 value= 00027) The critical value of the chi-square distributionfor a significance level of 5 and 5 degrees of freedom is1107 Thus the null hypothesis of ldquono significant differenceson mean ranksrdquo is rejected and there is evidence that thesix distributions of ldquonferdquo values have statistically significantdifferences Multiple comparisons (two at a time) may becarried out to determine which mean ranks are significantlydifferent The estimates of the 95 confidence intervalsare shown in the graph of Figure 2 for each case undertesting Two compared distributions of ldquonferdquo are significantlydifferent if their intervals are disjoint and are not significantlydifferent if their intervals overlap Hence from the six caseswe conclude that the mean ranks produced by mCS basedon (15) are significantly different from those of mBS basedon (9) and mBS based on (14) For the remaining pairs ofcomparison there are no significant differences on the meanranks

8 Advances in Operations Research

Table 2 Comparison with AMPSO binPSO binDE and AMDE based on 119891avg and StD (shown in parentheses)

Prob mCS based on (9) mBS based on (9) pBC based on (9) AMPSO binPSO binDE AMDE119891avg nfe 119891avg nfe 119891avg nfe 119891avg 119891avg 119891avg 119891avg

Ackley 888119890 minus 16 80 888119890 minus 16 1156 888119890 minus 16 2168 19711989001 20111989001 17311989001 16411989001

(00011989000) (00011989000) (00011989000) (057119890 minus 01) (049119890 minus 01) (03111989001) (07611989000)

Foxholes 12711989001 61 12711989001 72 12711989001 63 053119890 minus 10 053119890 minus 10 12911989001 5011989002

(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (00011989000) (097119890 minus 14) (08611989000) (0011989000)

Griewank 00011989000 80 00011989000 1332 00011989000 2300 10611989002 67911989001 26311989002 20611989002

(00011989000) (00011989000) (00011989000) (04411989001) (09811989001) (01011989002) (03911989001)

Quartic 455119890 minus 01 2012 537119890 minus 01 1771 488119890 minus 01 2951 41511989001 20911989001 14911989000 35511989000

(301119890 minus 01) (303119890 minus 01) (271119890 minus 01) (01911989001) (01911989001) (06611989000) (08111989000)

Rastrigin 00011989000 80 00011989000 12827 00011989000 24067 22511989002 30811989002 21411989002 90511989001

(00011989000) (00011989000) (00011989000) (03511989002) (02811989001) (04511989002) (03111989002)

Rosenbrock2 00011989000 65 00011989000 57 00011989000 61 049119890 minus 04 014119890 minus 03 020119890 minus 05 055119890 minus 04

(00011989000) (00011989000) (00011989000) (011119890 minus 03) (088119890 minus 04) (015119890 minus 04) (017119890 minus 04)

Rosenbrock 00011989000 180 00011989000 21907 00011989000 2088 22011989003 22411989003 18111989003 91411989001

(00011989000) (00011989000) (00011989000) (08611989002) (07711989002) (01611989002) (04211989002)

Schaffer 00011989000 61 00011989000 8 00011989000 49 024119890 minus 01 073119890 minus 01 minus099511989000 minus1011989000

(00011989000) (00011989000) (00011989000) (042119890 minus 02) (011119890 minus 01) (027119890 minus 06) (0011989000)

Spherical 00011989000 12 00011989000 12 00011989000 117 030119890 minus 03 030119890 minus 03 015119890 minus 03 020119890 minus 04

(00011989000) (00011989000) (00011989000) (00011989000) (0011989000) (041119890 minus 04) (015119890 minus 04)

Step 30011989001 427 30011989001 427 30011989001 48 00011989000 017119890 minus 04 015119890 minus 01 02511989000

(00011989000) (00011989000) (00011989000) (00011989000) (015119890 minus 04) (0011989000) (060119890 minus 01)

0 1 2 3 4 5 6

mBS based on (15)

mCS based on (15)

mBS based on (14)

mCS based on (14)

mBS based on (9)

mCS based on (9)

mBS based on (9) and (14) have mean ranks significantly different from mCS based on (15)

Figure 2 Confidence intervals for mean ranks of nfe

For comparative purposes we include in Table 4 theresults obtained by using the proposed Levy (L) distributionin the randomization term as shown in (7) and those pro-duced by the Uniform (U) distribution using rand sim 119880[0 1]as shown in (3) The reported tests use implementation mCS(described in Algorithm 2) with the two heuristics for binaryvariables (i) the ldquoerfrdquo function in (14) together with (10) and(ii) the floor function in (15) It is shown that the performanceof HBFA with Uniform distribution is very sensitive to thedimension of the problem since the efficiency is good when119899 is small but gets worse when 119899 is largeThus we have shownthat the Levy distribution is a very good bid

We add to some problems with 119899 = 30 from Table 1mdashAckley Griewank Rastrigin Rosenbrock and Sphericalmdashthree other functions Schwefel 222 Schwefel 226 and SumofDifferent Power to compare our results with those reportedin [1] Schwefel 222 is unimodal and for Ω = [minus10 10]30the binary solution is (0 0) with 119891lowast = 0 Schwefel 226is multimodal and in Ω = [minus500 500]30 the binary solutionis (1 1 1) with 119891lowast = minus25244129544 Sum of DifferentPower is unimodal and in Ω = [minus1 1]30 the minimum is 0at (0 0) For the results of Table 5 we use HBFA basedon mCS with both ldquoerfrdquo function in (14) together with (10)and the floor function (15) The table reports on the average

Advances in Operations Research 9

Table 3 Comparison of mCS versus mBS and (14) versus (15) based on 119891avg nfe and nit

Prob mCS based on (14) mBS based on (14) mCS based on (15) mBS based on (15)119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 6787 16 888119890 minus 16 80 1 888119890 minus 16 827 11Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12911989001 4048 1002Griewank 00011989000 80 1 00011989000 7173 169 00011989000 80 1 00011989000 827 11Quartic 238119890 minus 01 813 103 466119890 minus 01 7947 189 948119890 minus 02 80 1 393119890 minus 01 80 1Rastrigin 00011989000 80 1 00011989000 7027 166 00011989000 80 1 00011989000 80 1Rosenbrock2 00011989000 64 06 00011989000 53 03 00011989000 63 06 233119890 minus 01 4708 1167Rosenbrock 00011989000 80 1 00011989000 1053 16 00011989000 80 1 29011989001 20040 500Schaffer 00011989000 68 07 00011989000 129 22 00011989000 51 03 708119890 minus 02 2051 503Spherical 00011989000 99 02 00011989000 227 18 00011989000 101 03 00011989000 115 04Step 30011989001 459 04 30011989001 629 1 30011989001 405 03 30011989001 405 03

Table 4 Comparison between Levy and Uniform distributions in the randomization term based on 119891avg nfe and nit (with StD inparentheses)

Prob mCS based on (14) + L mCS based on (14) + U mCS based on (15) + L mCS based on (15) + U119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 1096 264 888119890 minus 16 80 1 141e00 20040 500(00011989000) (00011989000) (00011989000) (126119890 minus 02)

Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12711989001 68 07(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (903119890 minus 15)

Griewank 00011989000 80 1 00011989000 2436 599 00011989000 80 1 127119890 minus 01 20040 500(00011989000) (00011989000) (00011989000) (276119890 minus 02)

Quartic 238119890 minus 01 813 103 69011989000 14692 3662 948119890 minus 02 80 1 510119890 minus 01 10581 2635(170119890 minus 01) (11611989001) (103119890 minus 01) (290119890 minus 01)

Rastrigin 00011989000 80 1 00011989000 1157 279 00011989000 80 1 100119890 minus 01 18104 4516(00011989000) (00011989000) (00011989000) (403119890 minus 01)

Rosenbrock2 00011989000 64 06 00011989000 368 82 00011989000 63 06 00011989000 59 05(00011989000) (00011989000) (00011989000) (00011989000)

Rosenbrock 00011989000 80 1 82211989001 14136 3524 00011989000 80 1 74211989001 17698 4412(00011989000) (10211989002) (00011989000) (84311989001)

Schaffer 00011989000 68 07 00011989000 185 36 00011989000 51 03 00011989000 56 04(00011989000) (00011989000) (00011989000) (00011989000)

Spherical 00011989000 99 02 00011989000 133 07 00011989000 101 03 00011989000 147 08(00011989000) (00011989000) (00011989000) (00011989000)

Step 30011989001 459 04 30011989001 469 05 30011989001 405 03 30011989001 523 06(00011989000) (00011989000) (00011989000) (00011989000)

Table 5 Comparison of HBFA (with mCS) with ABHS in [1] based on 119891avg nfe and SR ()

Prob mCS based on (14) mCS based on (15) ABHS in [1]119891avg nfe SR () 119891avg nfe SR () 119891avg nfe SR ()

Ackley 888119890 minus 16 80 100 888119890 minus 16 80 100 156119890 minus 01 62350 90

Griewank 00011989000 80 100 00011989000 80 100 330119890 minus 02 79758 38

Rastrigin 00011989000 80 100 00011989000 80 100 13211989001 90000 0

Rosenbrock 00011989000 80 100 00011989000 80 100 68011989002 90000 0

Schwefel 222 00011989000 80 100 00011989000 80 100 00011989000 59870 100

Schwefel 226 minus25211989001 80 100 minus24711989001 10867 87 minus119511989004 90000 0

Spherical 00011989000 80 100 00011989000 80 100 00011989000 62234 100

Sum of Different Power 00011989000 91 100 00011989000 168 100 00011989000 80371 100

10 Advances in Operations Research

Table 6 Results for varied dimensions (119899 = 50 100 200) considering119898 = 40

119891lowast 119899mCS based on (14) mCS based on (15)

119891avg StD nfe nit 119891avg StD nfe nit

Ackley00011989000 50 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 100 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 200 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

Griewank00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Quartic00011989000 + noise 50 224119890 minus 01 195119890 minus 01 827 11 143119890 minus 01 159119890 minus 01 80 1

00011989000 + noise 100 432119890 minus 01 273119890 minus 01 1467 27 173119890 minus 01 110119890 minus 01 80 1

00011989000 + noise 200 523119890 minus 01 294119890 minus 01 17387 425 196119890 minus 01 213119890 minus 01 813 103

Rosenbrock00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Spherical00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Step30011989002 50 30011989002 00011989000 80 1 30011989002 00011989000 80 1

60011989002 100 60011989002 00011989000 80 1 60011989002 00011989000 80 1

12011989003 200 12011989003 00011989000 80 1 12011989003 00011989000 80 1

function values average number of function evaluations andsuccess rate (SR) Here 50 independent runs were carriedout to compare with the results shown in [1] The maximumnumber of function evaluations therein used was 90000 Itis shown that our HBFA outperforms the proposed adaptivebinary harmony search (ABHS)

43 Effect of Problemrsquos Dimension on HBFA Performance Wenow consider six problems with varied dimensions from theprevious set to analyze the effect of problemrsquos dimension onthe HBFA performance We test three dimensions 119899 = 50119899 = 100 and 119899 = 200 The algorithmrsquos parameters areset as previously defined We remark that the size of thepopulation for all the tested problems and dimensions is 40points

Table 6 contains the results for comparison based onaveraged values of 119891 number of function evaluationsand number of iterations The ldquoStDrdquo of the 119891 values arealso displayed Since the implementation mCS shown inAlgorithm 2 performs better and shows more consistentresults than the other two we tested only mCS based on (14)and mCS based on (15)

Besides testing significant differences on the mean ranksproduced by the two treatments mCS based on (14) andmCSbased on (15) we also want to determine if the differences onmean ranks produced by problemrsquos dimensionmdash50 100 and200mdashare statistically significant at a significance level of 5Hence we aim to analyze the effects of two factors ldquoArdquo andldquoBrdquo ldquoArdquo is the HBFA implementation (with two levels) andldquoBrdquo is the problemrsquos dimension (with three levels) For thispurpose the results obtained for the six problems for each

combination of the levels of ldquoArdquo and ldquoBrdquo are considered asreplications When performing the Friedman test for factorldquoArdquo the chi-square statistical value is 1225 (119875 value = 02685)with 1 degree of freedom The critical value for a significancelevel of 5 and 1 degree of freedom in the 1205942 distributiontable is 384 and there is no evidence of statistically significantdifferences From the Friedman test for factor ldquoBrdquo we alsoconclude that there is no evidence of statistically significantdifferences since the chi-square statistical value is 0746 (119875value = 06886) with 2 degrees of freedom (The critical valueof the 1205942 distribution table for a significance level of 5 and2 degrees of freedom is 599) Hence we conclude that thedimension of the problem does not affect the algorithmrsquos per-formance Only with problem Quartic the efficiency of mCSbased on (14) getsworse as dimension increasesOverall bothtested strategies are rather effective when binary solutions arerequired on small as well as on large nonlinear optimizationproblems

44 Solving 0-1 Knapsack Problems Finally we aim to analyzethe behavior of our best tested strategies when solvingwell-known binary and linear optimization problems Forthis preliminary experiment we selected two small knap-sack problems The 0-1 knapsack problem (KP) can bedescribed as follows Let 119899 be the number of items fromwhich we have to select some of them to be carried in aknapsack Let 119908

119897and V

119897be the weight and the value of

item 119897 respectively and let 119882 be the knapsackrsquos capac-ity It is usually assumed that all weights and values arenonnegative The objective is to maximize the total value

Advances in Operations Research 11

of the knapsack under the constraint of the knapsackrsquoscapacity

max119909

119881 (119909) equiv119899

sum119897=1

V119897119909119897

st119899

sum119897=1

119908119897119909119897le 119882 119909

119897isin 0 1 119897 = 1 119899

(17)

If item 119897 is selected 119909119897= 1 otherwise 119909

119897= 0 Using a penalty

function this problem can be transformed into

min119909

minus119899

sum119897=1

V119897119909119897+ 120583max0

119899

sum119897=1

119908119897119909119897minus119882 (18)

where 120583 is the penalty parameter which was set to be 100 inthis experiment

Case 1 (an instance of a 0-1 KP with 4 items) Knapsackrsquoscapacity is 119882 = 6 and the vectors of values and weights areV = (40 15 20 10) and 119908 = (4 2 3 1) Based on the above-mentioned parameters the HBFA with mCS based on (14)was run 30 times and the averaged results were the followingWith a success rate of 100 items 1 and 2 are included in theknapsack and items 3 and 4 are excluded with a maximumvalue of 55 (StD = 00e00) On average the runs required08 iterations and 293 function evaluations With a successrate of 23 the heuristic based on the floor function thusmCS based on (15) reached 119891avg = 49 (StD = 40e00) afteran average of 61611 function evaluations and an average of3841 iterations

Case 2 (an instance of a 0-1 KP with 8 items) The maximumcapacity of the knapsack is set to 8 and the vectors ofvalues and weights are V = (83 14 54 79 72 52 48 62) and119908 = (3 2 3 2 1 2 2 3) The results are averaged over the 30runs After 87 iterations and 3867 function evaluations themaximum value produced by the strategy mCS based on (14)is 286 (StD = 00e00) with a success rate of 100 Items 14 5 and 6 are included in the knapsack and the others areexcluded The heuristic mCS based on (15) did not reach theoptimal solution All runs required 500 iterations and 20040function evaluations and the average function values were119891avg = 227 with StD = 314e01

5 Conclusions and Future Work

In this work we have implemented several heuristics tocompute a global optimal binary solution of bound con-strained nonlinear optimization problems which have beenincorporated into FA yielding the herein called HBFA Theproblems addressed in this study have bounded continu-ous search space Our FA proposal uses dynamic updatingschemes for two parameters 120574 from the attractiveness termand 120572 from the randomization term and considers the Levydistribution to create randomness in firefly movement Theperformance behavior of the proposed heuristics has beeninvestigated Three simple heuristics capable of transformingreal continuous variables into binary ones are implemented

A new sigmoid ldquoerfrdquo function is proposed In the context ofthe firefly algorithm three different implementations aimingto incorporate the heuristics for binary variables into FAare proposed (mCS mBS and pBC) Based on a set ofbenchmark problems a comparison is carried out with otherbinary dealing metaheuristics namely AMPSO binPSObinDE and AMDE The experimental results show that theimplementation denoted bymCSwhen combined with eitherthe new sigmoid ldquoerfrdquo function or the rounding schemebased on the floor function is quite efficient and superiorto the other methods in comparison The statistical analysiscarried out on the results shows evidence of statisticallysignificant differences on efficiency measured by the numberof function evaluations between the implementation mCSbased on the floor function approach and the mBS basedon both tested sigmoid functions schemes We have alsoinvestigated the effect of problemrsquos dimension on the perfor-mance of our algorithmUsing the Friedman statistical testweconclude that the differences on efficiency are not statisticallysignificant Another simple experiment has shown that theimplementation mCS with the sigmoid ldquoerfrdquo function iseffective in solving two small 0-1 KPThe performance of thissimple heuristic strategy will be further analyzed to solvelarge and multidimensional 0-1 KP Future developmentsconcerning the HBFA will consider its extension to dealwith integer variables in nonlinear optimization problemsDifferent heuristics to transform continuous real variablesinto integer variableswill be investigated Challengingmixed-integer nonconvex nonlinear problems will be solved

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors wish to thank two anonymous referees fortheir valuable suggestions to improve the paper This workhas been supported by FCT (Fundacao para a Ciencia eTecnologia Portugal) in the scope of the Projects PEst-OEMATUI00132014 and PEst-OEEEIUI03192014

References

[1] L Wang R Yang Y Xu Q Niu P M Pardalos and MFei ldquoAn improved adaptive binary harmony search algorithmrdquoInformation Sciences vol 232 pp 58ndash87 2013

[2] M A K Azad A M A C Rocha and E M G P FernandesldquoImproved binary artificial fish swarm algorithm for the 0-1multidimensional knapsack problemsrdquo Swarm and Evolution-ary Computation vol 14 pp 66ndash75 2014

[3] A P Engelbrecht andG Pampara ldquoBinary differential evolutionstrategiesrdquo in Proceedings of the IEEE Congress on EvolutionaryComputation (CEC rsquo07) pp 1942ndash1947 September 2007

[4] M H Kashan N Nahavandi and A H Kashan ldquoDisABC anew artificial bee colony algorithm for binary optimizationrdquoApplied Soft Computing Journal vol 12 no 1 pp 342ndash352 2012

12 Advances in Operations Research

[5] M H Kashan A H Kashan and N Nahavandi ldquoA noveldifferential evolution algorithm for binary optimizationrdquo Com-putational Optimization and Applications vol 55 no 2 pp 481ndash513 2013

[6] J Kennedy and R C Eberhart ldquoA discrete binary versionof the particle swarm algorithmrdquo in Proceedings of the IEEEInternational Conference on Systems Man and Cybernetics vol5 pp 4104ndash4108 Orlando Fla USA October 1997

[7] T Liu L Zhang and J Zhang ldquoStudy of binary artificialbee colony algorithm based on particle swarm optimizationrdquoJournal of Computational Information Systems vol 9 no 16 pp6459ndash6466 2013

[8] S Mirjalili and A Lewis ldquoS-shaped versus V-shaped transferfunctions for binary particle swarm optimizationrdquo Swarm andEvolutionary Computation vol 9 pp 1ndash14 2013

[9] G Pampara A P Engelbrecht and N Franken ldquoBinarydifferential evolutionrdquo in Proceedings of the IEEE Congress onEvolutionary Computation (CEC rsquo06) pp 1873ndash1879 VancouverCanada July 2006

[10] G Pampara and A P Engelbrecht ldquoBinary artificial bee colonyoptimizationrdquo in Proceedings of the IEEE Symposium on SwarmIntelligence (SIS rsquo11) pp 1ndash8 IEEE Perth April 2011

[11] S Burer and A N Letchford ldquoNon-convex mixed-integer non-linear programming a surveyrdquo Surveys in Operations Researchand Management Science vol 17 no 2 pp 97ndash106 2012

[12] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Proceedings of the Stochastic Algorithms Foundations andApplications (SAGA rsquo09) O Watanabe and T Zeugmann Edsvol 5792 of Lecture Notes in Computer Science pp 169ndash1782009

[13] X-S Yang ldquoFirefly algorithm stochastic test functions anddesign optimizationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[14] I Fister Jr X-S Yang and J Brest ldquoA comprehensive review offirefly algorithmsrdquo Swarm and Evolutionary Computation vol13 pp 34ndash46 2013

[15] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[16] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoA Gaussian firefly algorithmrdquo International Journal of MachineLearning and Computing vol 1 no 5 pp 448ndash453 2011

[17] L Guo G-G Wang H Wang and D Wang ldquoAn effectivehybrid firefly algorithmwith harmony search for global numer-ical optimizationrdquoTheScientificWorld Journal vol 2013 ArticleID 125625 9 pages 2013

[18] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoSome hybrid models to improve firefly algorithm perfor-mancerdquo International Journal of Artificial Intelligence vol 8 no12 pp 97ndash117 2012

[19] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 467631 12pages 2012

[20] X Lin Y Zhong and H Zhang ldquoAn enhanced firefly algorithmfor function optimisation problemsrdquo International Journal ofModelling Identification and Control vol 18 no 2 pp 166ndash1732013

[21] A Manju and M J Nigam ldquoFirefly algorithm with fireflieshaving quantum behaviorrdquo in Proceedings of the InternationalConference on Radar Communication and Computing (ICRCCrsquo12) pp 117ndash119 IEEE Tiruvannamalai India December 2012

[22] X-S Yang and X He ldquoFirefly algorithm recent advances andapplicationsrdquo International Journal of Swarm Intelligence vol 1no 1 pp 36ndash50 2013

[23] S Arora and S Singh ldquoThe firefly optimization algorithmconvergence analysis and parameter selectionrdquo InternationalJournal of Computer Applications vol 69 no 3 pp 48ndash52 2013

[24] X-S Yang S S S Hosseini and A H Gandomi ldquoFireflyalgorithm for solving non-convex economic dispatch problemswith valve loading effectrdquo Applied Soft Computing Journal vol12 no 3 pp 1180ndash1186 2012

[25] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using firefly algorithmrdquo Computers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[26] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering with Computers vol 29 no 2 pp175ndash184 2013

[27] A N Kumbharana and G M Pandey ldquoSolving travellingsalesman problemusing firefly algorithmrdquo International Journalfor Research in ScienceampAdvanced Technologies vol 2 no 2 pp53ndash57 2013

[28] M K Sayadi A Hafezalkotob and S G J Naini ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[29] X-S Yang ldquoFirefly algorithmrdquo inNature-InspiredMetaheuristicAlgorithms pp 81ndash96 Luniver Press University of CambridgeCambridge UK 2nd edition 2010

[30] A R Jordehi and J Jasni ldquoParameter selection in particle swarmoptimisation a surveyrdquo Journal of Experimental amp TheoreticalArtificial Intelligence vol 25 no 4 pp 527ndash542 2013

[31] M Mahdavi M Fesanghary and E Damangir ldquoAn improvedharmony search algorithm for solving optimization problemsrdquoAppliedMathematics and Computation vol 188 no 2 pp 1567ndash1579 2007

[32] M Padberg ldquoHarmony search algorithms for binary optimiza-tion problemsrdquo in Operations Research Proceedings 2011 pp343ndash348 Springer Berlin Germany 2012

[33] M A K Azad A M A C Rocha and E M G P FernandesldquoA simplified binary artificial fish swarm algorithm for unca-pacitated facility location problemsrdquo in Proceedings of WorldCongress on Engineering S I Ao L Gelman D W L HukinsA Hunter and A M Korsunsky Eds vol 1 pp 31ndash36 IAENGLondon UK 2013

[34] M Sevkli and A R Guner ldquoA continuous particle swarm opti-mization algorithm for uncapacitated facility location problemrdquoin Ant Colony Optimization and Swarm Intelligence M DorigoL M Gambardella M Birattari A Martinoli R Poli and TStutzle Eds vol 4150 of Lecture Notes in Computer Sciencespp 316ndash323 Springer 2006

[35] L Wang and C Singh ldquoUnit commitment considering genera-tor outages through a mixed-integer particle swarm optimiza-tion algorithmrdquoApplied SoftComputing Journal vol 9 no 3 pp947ndash953 2009

[36] MM Ali C Khompatraporn and Z B Zabinsky ldquoA numericalevaluation of several stochastic algorithms on selected con-tinuous global optimization test problemsrdquo Journal of GlobalOptimization vol 31 no 4 pp 635ndash672 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 3: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

Advances in Operations Research 3

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Evaluate 119891(119909119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and |119891(1199091) minus 119891lowast| gt 120578 do

forall 119909119894 such that 119894 = 2 119898 doforall 119909119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573Move firefly 119894 towards 119895 using (3)

Evaluate 119891(119909119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 1 Standard FA

to determine the speed of convergence of the algorithm Intheory 120574 could take any value in the set [0infin)When 120574 rarr 0the attractiveness is constant 120573 = 120573

0 meaning that a flashing

firefly can be seen anywhere in the search space This isan ideal case for a problem with a single (usually global)optimum since it can easily be reached On the other handwhen 120574 rarr infin the attractiveness is almost zero in the sightof other fireflies and each firefly moves in a random wayIn particular when 120573

0= 0 the algorithm behaves like a

random search method [13 22]The randomization term canbe extended to the normal distribution119873(0 1) or to any otherdistribution [15] Algorithm 1 presents the main steps of thestandard FA (on continuous space)

22 Dynamic Updates of 120572 and 120574 The relative value of theparameters 120572 and 120574 affects the performance of FA Theparameter 120572 controls the randomness or to some extent thediversity of solutions Parameter 120574 aims to scale the attractionpower of the algorithm Small values of 120574 with large values of120572 can increase the number of iterations required to convergeto an optimal solution Experience has shown that 120572 musttake large values at the beginning of the iterative process toenforce the algorithm to increase the diversity of solutionsHowever small 120572 values combined with small values of 120574in the final iterations increase the fine-tuning of solutionssince the effort is focused on exploitation Thus it is possibleto improve the quality of the solution by reducing the ran-domness Convergence can be improved by varying the ran-domization parameter 120572 so that it decreases gradually as theoptimum solution is approaching [22 24 26 29] In order toimprove convergence speed and solution accuracy dynamicupdates of the parameters 120572 and 120574 of FA which depend onthe iteration counter 119896 of the algorithm are implemented asfollows

Similarly to the factor which controls the amplifica-tion of differential variations in differential evolution (DE)metaheuristic [5] the inertial weight in particle swarmoptimization (PSO) [29 30] and the pitch adjusting rate inthe harmony search (HS) algorithm [31] we allow the value

of 120572 to decrease linearly with 119896 from an upper level 120572max to alower level 120572min

120572 (119896) = 120572max minus 119896120572max minus 120572min

119896max (5)

where 119896max is the maximum number of allowed iterationsTo increase the attractiveness with 119896 the parameter 120574 isdynamically updated by

120574 (119896) = 120574max exp(119896

119896maxln(

120574min120574max

)) (6)

where 120574min and 120574max are the minimum variation and maxi-mum variation of attractiveness respectively

23 Levy Dependent Randomization Term We remark thatour implementation of the randomization term in the pro-posed dynamic FA considers the Levy distribution Based onthe attractiveness 120573 in (4) the equation for the movementof firefly 119894 towards a brighter firefly 119895 can be written asfollows

119909119894 = 119909119894 + 119910119894 with 119910119894 = 120573 (119909119895 minus 119909119894) + 120572119871 (1199091) 120590119894119909 (7)

where 119871(1199091) is a random number from the Levy distributioncentered at 1199091 the position of the brightest firefly with anunitary standard deviation The vector 120590119894

119909represents the

variation around 1199091 (and based on real position 119909)

120590119894119909= (|1199091198941minus 11990911| |119909119894

119899minus 1199091119899|)119879

(8)

3 Dealing with Binary Variables

The standard FA is a real-coded algorithm and some mod-ifications are needed to enable it to deal with discreteoptimization problems This section describes the imple-mentation of some heuristics with FA for binary nonlinearoptimization problems In the context of the proposedHBFAthree different heuristics to transform a continuous real

4 Advances in Operations Research

variable into a binary one are presented Furthermore toextend FA to binary optimization different implementationsto incorporate the heuristic strategies into FA are describedWe will use the term ldquodiscretizationrdquo to define the processthat transforms a continuous real variable represented forexample by 119909 into a binary one represented by 119887

31 Sigmoid Logistic Function This discretization methodol-ogy is the most common in the literature when population-based stochastic algorithms are considered in binary opti-mization namely PSO [6 8 9] DE [3] HS [1 32] artificialfish swarm [33] and artificial bee colony [4 7 10]

When 119909119894 moves towards 119909119895 the likelihood is that thediscrete components of 119909119894 change from binary numbers toreal ones To transform a real number into a binary one thefollowing sigmoid logistic function constrains the real valueto the interval [0 1]

sig (119909119894119897) =

1

1 + exp (minus119909119894119897) (9)

where 119909119894119897 in the context of FA is the component 119897 of the

position vector 119909119894 (of firefly 119894) aftermovementmdashrecall (7) and(4) Equation (9) interprets the floating-point components ofa solution as a set of probabilities These are then used toassign appropriate binary values by using

119887119894119897=

1 if rand le sig (119909119894119897)

0 otherwise(10)

where sig(119909119894119897) gives the probability that the component itself

is 0 or 1 [28] and rand sim 119880[0 1] We note that during theiterative process the firefly positions 119909 were not allowed tomove outside the search space Ω

32 Proposed Sigmoid erf Function The error function isa special function with a shape that appears mainly inprobability and statistics contexts Denoted by ldquoerfrdquo themathematical function defined by the integral

erf (119909) = 2

radic120587int119909

0

exp (minus1199052) 119889119905 (11)

satisfies the following properties

erf (0) = 0 erf (minusinfin) = minus1 erf (+infin) = 1

erf (minus119909) = minus erf (119909)(12)

and it has a close relation with the normal distributionprobabilities When a series of measurements are describedby a normal distribution with mean 0 and standard deviation120590 the erf function evaluated at (119909120590radic2) for a positive119909 givesthe probability that the error of a single measurement lies inthe interval [minus119909 119909] The derivative of the erf function followsimmediately from its definition

119889

119889119905erf (119905) = 2

radic120587exp (minus1199052) for 119905 isin R (13)

x

Sigm

oid

func

tion

1

09

08

07

06

05

04

03

02

01

0minus5 minus4 minus3 minus2 minus1 0 1 2 3 4 5

1(1 + exp(minusx))05(1 + (x))erf

Figure 1 Sigmoid functions

The good properties of the erf function are thus used to definea new sigmoid function the sigmoid erf function

sig (119909119894119897) = 05 (1 + erf (119909119894

119897)) (14)

which is a bounded differentiable real function defined forall 119909 isin R and has a positive derivative at each point Acomparison of both functions (9) and (14) is depicted inFigure 1 Note that the slope at the origin of the sigmoidfunction in (14) is around 05641895 while that of function(9) is 025 thus yielding a faster growing from 0 to 1

33 Rounding to Integer Part The simplest discretizationprocedure of a continuous component of a point into 01 bituses the rounding to the integer part function known as floorfunction and is described in [34] Each continuous value119909119894119897isin R is transformed into a binary one 0 bit or 1 bit 119887119894

119897

for 119897 = 1 119899 in the following way

119887119894119897= lfloor

10038161003816100381610038161003816119909119894

119897mod 2

10038161003816100381610038161003816rfloor (15)

where lfloor119911rfloor represents the floor function of 119911 and gives thelargest integer not greater than 119911 The floating-point value119909119894119897is first divided by 2 and then the absolute value of the

remainder is floored The obtained integer number is the bitvalue of the component

34 Heuristics Implementation In this study three methodscapable of computing global solutions to binary optimizationproblems using FA are proposed

341 Movement on Continuous Space In this implemen-tation of the previously described heuristics denoted byldquomovement on continuous spacerdquo (mCS) the movementof each firefly is made on the continuous space and itsattractiveness term is updated considering the real positionvector The real position of firefly 119894 is discretized only after allmovements towards brighter fireflies have been carried outWe note that the fitness evaluation of each firefly for firefly

Advances in Operations Research 5

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119909119894 such that 119894 = 2 119898 doforall 119909119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573Move position 119909119894 of firefly 119894 towards 119909119895 using (7)

Discretize positions 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest119891)Set 119896 = 119896 + 1

Algorithm 2 HBFA with mCS

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119887119894 such that 119894 = 2 119898 doforall 119887119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573 based on distance 10038171003817100381710038171003817119887

119894 minus 11988711989510038171003817100381710038171003817119901

Move binary position 119887119894 of firefly 119894 towards 119887119895using 119909119894 = 119887119894 + 120573(119887119895 minus 119887119894) + 120572119871(1198871)120590119894

119887

Discretize position of firefly 119894 119909119894 rarr 119887119894Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 3 HBFA with mBS

ranking is always based on the binary position Algorithm 2presents the main steps of HBFA with mCS

342 Movement on Binary Space This implementationdenoted by ldquomovement on binary spacerdquo (mBS) moves thebinary position of each firefly towards the binary positionsof brighter fireflies that is each movement is made on thebinary space although the corresponding position may fail tobe 0 or 1 bit string andmust be discretized before the updatingof attractiveness Here fitness is also based on the binarypositions Algorithm 3 presents the main steps of HBFA withmBS

343 Probability for Binary Component For this implemen-tation named ldquoprobability for binary componentrdquo (pBC) weborrow the concept from the binary PSO [6 9 35] whereeach component of the velocity vector is directly used tocompute the probability that the corresponding componentof the particle position 119909119894

119897 is 0 or 1 Similarly in the FA

algorithm we do not interpret the vector 119910119894 in (7) as a step

size but rather as amean to compute the probability that eachcomponent of the position vector of firefly 119894 is 0 or 1Thus wedefine

119887119894119897=

1 if rand le sig (119910119894119897)

0 otherwise(16)

where sig() represents a sigmoid function Algorithm 4 is thepseudocode of HBFA with pBC

4 Numerical Experiments

In this section we present the computational results that wereobtained with HBFAmdashAlgorithms 2 3 and 4 using (9) (14)or (15)mdashaiming to investigate its performance when solvinga set of binary nonlinear optimization problems Two small0-1 knapsack problems are also used to test the algorithmsrsquobehavior on linear problems with 01 variables

The numerical experiments were carried out on a PCIntel Core 2 Duo Processor E7500 with 29GHz and 4Gbof memory The algorithms were coded in Matlab Version800783 (R2012b)

6 Advances in Operations Research

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119887119894 such that 119894 = 2 119898 doforall 119887119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573 based on distance 10038171003817100381710038171003817119887

119894 minus 11988711989510038171003817100381710038171003817119901

Compute 119910119894 using binary positions (see (7))Discretize 119910119894 and define 119887119894 using (16)

Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 4 HBFA with pBC

41 Experimental Setting Each experimentwas conducted 30times The size of the population is made to depend on theproblemrsquos dimension and is set to 119898 = min40 2119899 Someexperiments have been carried out to tune certain parametersof the algorithms In the proposed FA with dynamic 120572 and 120574they are set as follows 120573

0= 1 119901 = 1 120572max = 05 120572min =

001 120574max = 10 and 120574min = 01 In Algorithms 2 (mCS) 3(mBS) and 4 (pBC) iterations were limited to 119896max = 500and the tolerance for finding a good quality solution is 120578 =

10minus6 Results reported are averaged (over the 30 runs) of bestfunction values number of function evaluations and numberof iterations

42 Experimental Results First we use a set of ten bench-mark nonlinear functions with different dimensions andcharacteristics For example five functions are unimodal andthe remaining multimodal [3 9 10 36] They are displayedin Table 1 Although they are widely used in continuousoptimization we now aim to converge to a 01 bit stringsolution

First we aim to compare with the results reported in[3 9 10] Due to poor results the authors in [10] donot recommend the use of ABC to solve binary-valuedproblems The other metaheuristics therein implemented arethe following

(i) angle modulated PSO (AMPSO) and angle modu-lated DE (AMDE) that incorporate a trigonometricfunction as a bit string generator into the classic PSOand DE algorithms respectively

(ii) binary DE and PSO based on the sigmoid logisticfunction and (10) denoted by binDE and binPSOrespectively

We noticed that the problems Foxholes Griewank Rosen-brock Schaffer and Step are not correctly described in[3 9 10] Table 2 shows both the averaged best functionvalues (obtained during the 30 runs) 119891avg with the StD inparentheses and the averaged number of function evalua-tions nfe obtained with the sigmoid logistic function (see in

(9)) and (10) while using the three implementations mCSmBS and pBC Results obtained for these ten functionsindicate that our proposal HBFA produces high qualitysolutions and outperforms the binary versions binPSO andbinDE as well as AMPSO and AMDE We also note thatmCS has the best ldquonferdquo values on 6 problems mBS is betteron 3 problems (one is a tie with mCS) and pBC on 2problems Thus the performance of mCS is the best whencompared with those of mBS and pBC The latter is theleast efficient of all in particular for the large dimensionalproblems

To analyze the statistical significance of the results weperform a Friedman test This is a nonparametric statisticaltest to determine significant differences in mean for oneindependent variable with two or more levelsmdashalso denotedas treatmentsmdashand a dependent variable (or matched groupstaken as the problems) The null hypothesis in this test is thatthe mean ranks assigned to the treatments under testing arethe same Since all three implementations are able to reach thesolutions within the 120578 error tolerance on 9 out of 10 problemsthe statistical analysis is based on the performance criterionldquonferdquo In this hypothesis testing we have three treatmentsand ten groups Friedmanrsquos chi-square has a value of 2737(with a 119875 value of 0255) For 2 degrees of freedom reference1205942 distribution the critical value for a significance level of5 is 599 Hence since 2737 le 599 the null hypothesisis not rejected and we conclude that there is no evidencethat the three mean ranks values have statistically significantdifferences

To further compare the sigmoid functions with therounding to integer strategy we include in Table 3 the resultsobtained by the ldquoerfrdquo function in (14) together with (10) andthe floor function in (15) Only the implementationsmCS andmBS are tested The table also shows the averaged numberof iterations nit The results illustrate that implementationmCS (Algorithm 2) works very well with strategies based on(14) together with (10) and (15) The success rate for all theproblems is 100 meaning that the algorithms stop becausethe119891 value at the position of the bestbrightest firefly is within

Advances in Operations Research 7

Table 1 Problems set

Ackley 119891 (119909) = minus20 exp(minus02radic 1

119899

119899

sum119894=1

1199092119894) minus exp(1

119899

119899

sum119894=1

cos (2120587119909119894)) + 20 + 119890

119899 = 30Ω = [minus30 30]30 119891lowast = 0 at 119909lowast = (0 0)

Foxholes119891(119909) =

1

0002 + sum25

119895=1(1 (119895 + (119909

1minus 1198861119895)6

+ (1199092minus 1198862119895)6

))

[119886119894119895] = [

minus32 minus16 0 16 32 minus32 minus16 sdot sdot sdot 16 32

minus32 minus32 minus32 minus32 minus32 minus16 minus16 sdot sdot sdot 32 32]

119899 = 2 Ω = [minus65536 65536]2 119891lowast asymp 13 at 119909lowast = (0 0)

Griewank119891 (119909) = 1 +

1

4000

119899

sum119894=1

1199092119894minus119899

prod119894=1

cos(119909119894

radic119894)

119899 = 30 Ω = [minus300 300]30 119891lowast = 0 at 119909lowast = (0 0)

Quartic119891(119909) =

119899

sum119894=1

1198941199094119894+ 119880[0 1]

119899 = 30 Ω = [minus128 128]30 119891lowast = 0 + noise at 119909lowast = (0 0)

Rastrigin119891(119909) = 10119899 +

119899

sum119894=1

(1199092119894minus 10 cos (2120587119909

119894))

119899 = 30 Ω = [minus512 512]30 119891lowast = 0 at 119909lowast = (0 0)

Rosenbrock2 119891(119909) = 100 (11990921minus 1199092)2

+ (1 minus 1199091)2

119899 = 2 Ω = [minus2048 2048]2 119891lowast = 0 at 119909lowast = (1 1)

Rosenbrock 119891(119909) =119899minus1

sum119894=1

100(1199092119894minus 119909119894+1)2 + (1 minus 119909

119894)2

119899 = 30 Ω = [minus2048 2048]30 119891lowast = 0 at 119909lowast = (1 1)

Schaffer 119891(119909) = 05 +(sin(radic1199092

1+ 11990922))2

minus 05

(1 + 0001(11990921+ 11990922))2

119899 = 2Ω = [minus100 100]2 119891lowast = 0 at 119909lowast = (0 0)

Spherical119891 (119909) =

119899

sum119894=1

1199092119894

119899 = 3 Ω = [minus512 512]3 119891lowast = 0 at 119909lowast = (0 0 0)

Step119891(119909) = 6119899 +

119899

sum119894=1

lfloor119909119894rfloor

119899 = 5 Ω = [minus512 512]5 119891lowast = 30 at 119909lowast = (0 0 0 0 0)

a tolerance 120578 of the optimal solution 119891lowast in all runs FurthermBS (Algorithm 3) works better when the discretization ofthe variables is carried out by (15) Overall mCS based on (14)produces the best results on 6 problems mCS based on (15)gives the best results on 7 problems (including 4 ties with theformer case) mBS based on (14) wins only on one problemand mBS based on (15) wins on 3 problems (all are ties withmCS based on (15))

Further when performing the Friedman test on thefour distributions of ldquonferdquo values the chi-square statisticalvalue is 13747 (and the 119875 value is 00033) From the 1205942

distribution table the critical value for a significance levelof 5 and 3 degrees of freedom is 781 Since 13747 gt 781the null hypothesis is rejected and we conclude that theobserved differences of the four distributions are statisticallysignificant

We now introduce in the statistical analysis the resultsreported in Tables 2 and 3 concerned with both implementa-tions mCS andmBS Six distributions of ldquonferdquo values are now

in comparison Friedmanrsquos chi-square value is 18175 (119875 value= 00027) The critical value of the chi-square distributionfor a significance level of 5 and 5 degrees of freedom is1107 Thus the null hypothesis of ldquono significant differenceson mean ranksrdquo is rejected and there is evidence that thesix distributions of ldquonferdquo values have statistically significantdifferences Multiple comparisons (two at a time) may becarried out to determine which mean ranks are significantlydifferent The estimates of the 95 confidence intervalsare shown in the graph of Figure 2 for each case undertesting Two compared distributions of ldquonferdquo are significantlydifferent if their intervals are disjoint and are not significantlydifferent if their intervals overlap Hence from the six caseswe conclude that the mean ranks produced by mCS basedon (15) are significantly different from those of mBS basedon (9) and mBS based on (14) For the remaining pairs ofcomparison there are no significant differences on the meanranks

8 Advances in Operations Research

Table 2 Comparison with AMPSO binPSO binDE and AMDE based on 119891avg and StD (shown in parentheses)

Prob mCS based on (9) mBS based on (9) pBC based on (9) AMPSO binPSO binDE AMDE119891avg nfe 119891avg nfe 119891avg nfe 119891avg 119891avg 119891avg 119891avg

Ackley 888119890 minus 16 80 888119890 minus 16 1156 888119890 minus 16 2168 19711989001 20111989001 17311989001 16411989001

(00011989000) (00011989000) (00011989000) (057119890 minus 01) (049119890 minus 01) (03111989001) (07611989000)

Foxholes 12711989001 61 12711989001 72 12711989001 63 053119890 minus 10 053119890 minus 10 12911989001 5011989002

(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (00011989000) (097119890 minus 14) (08611989000) (0011989000)

Griewank 00011989000 80 00011989000 1332 00011989000 2300 10611989002 67911989001 26311989002 20611989002

(00011989000) (00011989000) (00011989000) (04411989001) (09811989001) (01011989002) (03911989001)

Quartic 455119890 minus 01 2012 537119890 minus 01 1771 488119890 minus 01 2951 41511989001 20911989001 14911989000 35511989000

(301119890 minus 01) (303119890 minus 01) (271119890 minus 01) (01911989001) (01911989001) (06611989000) (08111989000)

Rastrigin 00011989000 80 00011989000 12827 00011989000 24067 22511989002 30811989002 21411989002 90511989001

(00011989000) (00011989000) (00011989000) (03511989002) (02811989001) (04511989002) (03111989002)

Rosenbrock2 00011989000 65 00011989000 57 00011989000 61 049119890 minus 04 014119890 minus 03 020119890 minus 05 055119890 minus 04

(00011989000) (00011989000) (00011989000) (011119890 minus 03) (088119890 minus 04) (015119890 minus 04) (017119890 minus 04)

Rosenbrock 00011989000 180 00011989000 21907 00011989000 2088 22011989003 22411989003 18111989003 91411989001

(00011989000) (00011989000) (00011989000) (08611989002) (07711989002) (01611989002) (04211989002)

Schaffer 00011989000 61 00011989000 8 00011989000 49 024119890 minus 01 073119890 minus 01 minus099511989000 minus1011989000

(00011989000) (00011989000) (00011989000) (042119890 minus 02) (011119890 minus 01) (027119890 minus 06) (0011989000)

Spherical 00011989000 12 00011989000 12 00011989000 117 030119890 minus 03 030119890 minus 03 015119890 minus 03 020119890 minus 04

(00011989000) (00011989000) (00011989000) (00011989000) (0011989000) (041119890 minus 04) (015119890 minus 04)

Step 30011989001 427 30011989001 427 30011989001 48 00011989000 017119890 minus 04 015119890 minus 01 02511989000

(00011989000) (00011989000) (00011989000) (00011989000) (015119890 minus 04) (0011989000) (060119890 minus 01)

0 1 2 3 4 5 6

mBS based on (15)

mCS based on (15)

mBS based on (14)

mCS based on (14)

mBS based on (9)

mCS based on (9)

mBS based on (9) and (14) have mean ranks significantly different from mCS based on (15)

Figure 2 Confidence intervals for mean ranks of nfe

For comparative purposes we include in Table 4 theresults obtained by using the proposed Levy (L) distributionin the randomization term as shown in (7) and those pro-duced by the Uniform (U) distribution using rand sim 119880[0 1]as shown in (3) The reported tests use implementation mCS(described in Algorithm 2) with the two heuristics for binaryvariables (i) the ldquoerfrdquo function in (14) together with (10) and(ii) the floor function in (15) It is shown that the performanceof HBFA with Uniform distribution is very sensitive to thedimension of the problem since the efficiency is good when119899 is small but gets worse when 119899 is largeThus we have shownthat the Levy distribution is a very good bid

We add to some problems with 119899 = 30 from Table 1mdashAckley Griewank Rastrigin Rosenbrock and Sphericalmdashthree other functions Schwefel 222 Schwefel 226 and SumofDifferent Power to compare our results with those reportedin [1] Schwefel 222 is unimodal and for Ω = [minus10 10]30the binary solution is (0 0) with 119891lowast = 0 Schwefel 226is multimodal and in Ω = [minus500 500]30 the binary solutionis (1 1 1) with 119891lowast = minus25244129544 Sum of DifferentPower is unimodal and in Ω = [minus1 1]30 the minimum is 0at (0 0) For the results of Table 5 we use HBFA basedon mCS with both ldquoerfrdquo function in (14) together with (10)and the floor function (15) The table reports on the average

Advances in Operations Research 9

Table 3 Comparison of mCS versus mBS and (14) versus (15) based on 119891avg nfe and nit

Prob mCS based on (14) mBS based on (14) mCS based on (15) mBS based on (15)119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 6787 16 888119890 minus 16 80 1 888119890 minus 16 827 11Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12911989001 4048 1002Griewank 00011989000 80 1 00011989000 7173 169 00011989000 80 1 00011989000 827 11Quartic 238119890 minus 01 813 103 466119890 minus 01 7947 189 948119890 minus 02 80 1 393119890 minus 01 80 1Rastrigin 00011989000 80 1 00011989000 7027 166 00011989000 80 1 00011989000 80 1Rosenbrock2 00011989000 64 06 00011989000 53 03 00011989000 63 06 233119890 minus 01 4708 1167Rosenbrock 00011989000 80 1 00011989000 1053 16 00011989000 80 1 29011989001 20040 500Schaffer 00011989000 68 07 00011989000 129 22 00011989000 51 03 708119890 minus 02 2051 503Spherical 00011989000 99 02 00011989000 227 18 00011989000 101 03 00011989000 115 04Step 30011989001 459 04 30011989001 629 1 30011989001 405 03 30011989001 405 03

Table 4 Comparison between Levy and Uniform distributions in the randomization term based on 119891avg nfe and nit (with StD inparentheses)

Prob mCS based on (14) + L mCS based on (14) + U mCS based on (15) + L mCS based on (15) + U119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 1096 264 888119890 minus 16 80 1 141e00 20040 500(00011989000) (00011989000) (00011989000) (126119890 minus 02)

Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12711989001 68 07(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (903119890 minus 15)

Griewank 00011989000 80 1 00011989000 2436 599 00011989000 80 1 127119890 minus 01 20040 500(00011989000) (00011989000) (00011989000) (276119890 minus 02)

Quartic 238119890 minus 01 813 103 69011989000 14692 3662 948119890 minus 02 80 1 510119890 minus 01 10581 2635(170119890 minus 01) (11611989001) (103119890 minus 01) (290119890 minus 01)

Rastrigin 00011989000 80 1 00011989000 1157 279 00011989000 80 1 100119890 minus 01 18104 4516(00011989000) (00011989000) (00011989000) (403119890 minus 01)

Rosenbrock2 00011989000 64 06 00011989000 368 82 00011989000 63 06 00011989000 59 05(00011989000) (00011989000) (00011989000) (00011989000)

Rosenbrock 00011989000 80 1 82211989001 14136 3524 00011989000 80 1 74211989001 17698 4412(00011989000) (10211989002) (00011989000) (84311989001)

Schaffer 00011989000 68 07 00011989000 185 36 00011989000 51 03 00011989000 56 04(00011989000) (00011989000) (00011989000) (00011989000)

Spherical 00011989000 99 02 00011989000 133 07 00011989000 101 03 00011989000 147 08(00011989000) (00011989000) (00011989000) (00011989000)

Step 30011989001 459 04 30011989001 469 05 30011989001 405 03 30011989001 523 06(00011989000) (00011989000) (00011989000) (00011989000)

Table 5 Comparison of HBFA (with mCS) with ABHS in [1] based on 119891avg nfe and SR ()

Prob mCS based on (14) mCS based on (15) ABHS in [1]119891avg nfe SR () 119891avg nfe SR () 119891avg nfe SR ()

Ackley 888119890 minus 16 80 100 888119890 minus 16 80 100 156119890 minus 01 62350 90

Griewank 00011989000 80 100 00011989000 80 100 330119890 minus 02 79758 38

Rastrigin 00011989000 80 100 00011989000 80 100 13211989001 90000 0

Rosenbrock 00011989000 80 100 00011989000 80 100 68011989002 90000 0

Schwefel 222 00011989000 80 100 00011989000 80 100 00011989000 59870 100

Schwefel 226 minus25211989001 80 100 minus24711989001 10867 87 minus119511989004 90000 0

Spherical 00011989000 80 100 00011989000 80 100 00011989000 62234 100

Sum of Different Power 00011989000 91 100 00011989000 168 100 00011989000 80371 100

10 Advances in Operations Research

Table 6 Results for varied dimensions (119899 = 50 100 200) considering119898 = 40

119891lowast 119899mCS based on (14) mCS based on (15)

119891avg StD nfe nit 119891avg StD nfe nit

Ackley00011989000 50 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 100 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 200 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

Griewank00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Quartic00011989000 + noise 50 224119890 minus 01 195119890 minus 01 827 11 143119890 minus 01 159119890 minus 01 80 1

00011989000 + noise 100 432119890 minus 01 273119890 minus 01 1467 27 173119890 minus 01 110119890 minus 01 80 1

00011989000 + noise 200 523119890 minus 01 294119890 minus 01 17387 425 196119890 minus 01 213119890 minus 01 813 103

Rosenbrock00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Spherical00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Step30011989002 50 30011989002 00011989000 80 1 30011989002 00011989000 80 1

60011989002 100 60011989002 00011989000 80 1 60011989002 00011989000 80 1

12011989003 200 12011989003 00011989000 80 1 12011989003 00011989000 80 1

function values average number of function evaluations andsuccess rate (SR) Here 50 independent runs were carriedout to compare with the results shown in [1] The maximumnumber of function evaluations therein used was 90000 Itis shown that our HBFA outperforms the proposed adaptivebinary harmony search (ABHS)

43 Effect of Problemrsquos Dimension on HBFA Performance Wenow consider six problems with varied dimensions from theprevious set to analyze the effect of problemrsquos dimension onthe HBFA performance We test three dimensions 119899 = 50119899 = 100 and 119899 = 200 The algorithmrsquos parameters areset as previously defined We remark that the size of thepopulation for all the tested problems and dimensions is 40points

Table 6 contains the results for comparison based onaveraged values of 119891 number of function evaluationsand number of iterations The ldquoStDrdquo of the 119891 values arealso displayed Since the implementation mCS shown inAlgorithm 2 performs better and shows more consistentresults than the other two we tested only mCS based on (14)and mCS based on (15)

Besides testing significant differences on the mean ranksproduced by the two treatments mCS based on (14) andmCSbased on (15) we also want to determine if the differences onmean ranks produced by problemrsquos dimensionmdash50 100 and200mdashare statistically significant at a significance level of 5Hence we aim to analyze the effects of two factors ldquoArdquo andldquoBrdquo ldquoArdquo is the HBFA implementation (with two levels) andldquoBrdquo is the problemrsquos dimension (with three levels) For thispurpose the results obtained for the six problems for each

combination of the levels of ldquoArdquo and ldquoBrdquo are considered asreplications When performing the Friedman test for factorldquoArdquo the chi-square statistical value is 1225 (119875 value = 02685)with 1 degree of freedom The critical value for a significancelevel of 5 and 1 degree of freedom in the 1205942 distributiontable is 384 and there is no evidence of statistically significantdifferences From the Friedman test for factor ldquoBrdquo we alsoconclude that there is no evidence of statistically significantdifferences since the chi-square statistical value is 0746 (119875value = 06886) with 2 degrees of freedom (The critical valueof the 1205942 distribution table for a significance level of 5 and2 degrees of freedom is 599) Hence we conclude that thedimension of the problem does not affect the algorithmrsquos per-formance Only with problem Quartic the efficiency of mCSbased on (14) getsworse as dimension increasesOverall bothtested strategies are rather effective when binary solutions arerequired on small as well as on large nonlinear optimizationproblems

44 Solving 0-1 Knapsack Problems Finally we aim to analyzethe behavior of our best tested strategies when solvingwell-known binary and linear optimization problems Forthis preliminary experiment we selected two small knap-sack problems The 0-1 knapsack problem (KP) can bedescribed as follows Let 119899 be the number of items fromwhich we have to select some of them to be carried in aknapsack Let 119908

119897and V

119897be the weight and the value of

item 119897 respectively and let 119882 be the knapsackrsquos capac-ity It is usually assumed that all weights and values arenonnegative The objective is to maximize the total value

Advances in Operations Research 11

of the knapsack under the constraint of the knapsackrsquoscapacity

max119909

119881 (119909) equiv119899

sum119897=1

V119897119909119897

st119899

sum119897=1

119908119897119909119897le 119882 119909

119897isin 0 1 119897 = 1 119899

(17)

If item 119897 is selected 119909119897= 1 otherwise 119909

119897= 0 Using a penalty

function this problem can be transformed into

min119909

minus119899

sum119897=1

V119897119909119897+ 120583max0

119899

sum119897=1

119908119897119909119897minus119882 (18)

where 120583 is the penalty parameter which was set to be 100 inthis experiment

Case 1 (an instance of a 0-1 KP with 4 items) Knapsackrsquoscapacity is 119882 = 6 and the vectors of values and weights areV = (40 15 20 10) and 119908 = (4 2 3 1) Based on the above-mentioned parameters the HBFA with mCS based on (14)was run 30 times and the averaged results were the followingWith a success rate of 100 items 1 and 2 are included in theknapsack and items 3 and 4 are excluded with a maximumvalue of 55 (StD = 00e00) On average the runs required08 iterations and 293 function evaluations With a successrate of 23 the heuristic based on the floor function thusmCS based on (15) reached 119891avg = 49 (StD = 40e00) afteran average of 61611 function evaluations and an average of3841 iterations

Case 2 (an instance of a 0-1 KP with 8 items) The maximumcapacity of the knapsack is set to 8 and the vectors ofvalues and weights are V = (83 14 54 79 72 52 48 62) and119908 = (3 2 3 2 1 2 2 3) The results are averaged over the 30runs After 87 iterations and 3867 function evaluations themaximum value produced by the strategy mCS based on (14)is 286 (StD = 00e00) with a success rate of 100 Items 14 5 and 6 are included in the knapsack and the others areexcluded The heuristic mCS based on (15) did not reach theoptimal solution All runs required 500 iterations and 20040function evaluations and the average function values were119891avg = 227 with StD = 314e01

5 Conclusions and Future Work

In this work we have implemented several heuristics tocompute a global optimal binary solution of bound con-strained nonlinear optimization problems which have beenincorporated into FA yielding the herein called HBFA Theproblems addressed in this study have bounded continu-ous search space Our FA proposal uses dynamic updatingschemes for two parameters 120574 from the attractiveness termand 120572 from the randomization term and considers the Levydistribution to create randomness in firefly movement Theperformance behavior of the proposed heuristics has beeninvestigated Three simple heuristics capable of transformingreal continuous variables into binary ones are implemented

A new sigmoid ldquoerfrdquo function is proposed In the context ofthe firefly algorithm three different implementations aimingto incorporate the heuristics for binary variables into FAare proposed (mCS mBS and pBC) Based on a set ofbenchmark problems a comparison is carried out with otherbinary dealing metaheuristics namely AMPSO binPSObinDE and AMDE The experimental results show that theimplementation denoted bymCSwhen combined with eitherthe new sigmoid ldquoerfrdquo function or the rounding schemebased on the floor function is quite efficient and superiorto the other methods in comparison The statistical analysiscarried out on the results shows evidence of statisticallysignificant differences on efficiency measured by the numberof function evaluations between the implementation mCSbased on the floor function approach and the mBS basedon both tested sigmoid functions schemes We have alsoinvestigated the effect of problemrsquos dimension on the perfor-mance of our algorithmUsing the Friedman statistical testweconclude that the differences on efficiency are not statisticallysignificant Another simple experiment has shown that theimplementation mCS with the sigmoid ldquoerfrdquo function iseffective in solving two small 0-1 KPThe performance of thissimple heuristic strategy will be further analyzed to solvelarge and multidimensional 0-1 KP Future developmentsconcerning the HBFA will consider its extension to dealwith integer variables in nonlinear optimization problemsDifferent heuristics to transform continuous real variablesinto integer variableswill be investigated Challengingmixed-integer nonconvex nonlinear problems will be solved

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors wish to thank two anonymous referees fortheir valuable suggestions to improve the paper This workhas been supported by FCT (Fundacao para a Ciencia eTecnologia Portugal) in the scope of the Projects PEst-OEMATUI00132014 and PEst-OEEEIUI03192014

References

[1] L Wang R Yang Y Xu Q Niu P M Pardalos and MFei ldquoAn improved adaptive binary harmony search algorithmrdquoInformation Sciences vol 232 pp 58ndash87 2013

[2] M A K Azad A M A C Rocha and E M G P FernandesldquoImproved binary artificial fish swarm algorithm for the 0-1multidimensional knapsack problemsrdquo Swarm and Evolution-ary Computation vol 14 pp 66ndash75 2014

[3] A P Engelbrecht andG Pampara ldquoBinary differential evolutionstrategiesrdquo in Proceedings of the IEEE Congress on EvolutionaryComputation (CEC rsquo07) pp 1942ndash1947 September 2007

[4] M H Kashan N Nahavandi and A H Kashan ldquoDisABC anew artificial bee colony algorithm for binary optimizationrdquoApplied Soft Computing Journal vol 12 no 1 pp 342ndash352 2012

12 Advances in Operations Research

[5] M H Kashan A H Kashan and N Nahavandi ldquoA noveldifferential evolution algorithm for binary optimizationrdquo Com-putational Optimization and Applications vol 55 no 2 pp 481ndash513 2013

[6] J Kennedy and R C Eberhart ldquoA discrete binary versionof the particle swarm algorithmrdquo in Proceedings of the IEEEInternational Conference on Systems Man and Cybernetics vol5 pp 4104ndash4108 Orlando Fla USA October 1997

[7] T Liu L Zhang and J Zhang ldquoStudy of binary artificialbee colony algorithm based on particle swarm optimizationrdquoJournal of Computational Information Systems vol 9 no 16 pp6459ndash6466 2013

[8] S Mirjalili and A Lewis ldquoS-shaped versus V-shaped transferfunctions for binary particle swarm optimizationrdquo Swarm andEvolutionary Computation vol 9 pp 1ndash14 2013

[9] G Pampara A P Engelbrecht and N Franken ldquoBinarydifferential evolutionrdquo in Proceedings of the IEEE Congress onEvolutionary Computation (CEC rsquo06) pp 1873ndash1879 VancouverCanada July 2006

[10] G Pampara and A P Engelbrecht ldquoBinary artificial bee colonyoptimizationrdquo in Proceedings of the IEEE Symposium on SwarmIntelligence (SIS rsquo11) pp 1ndash8 IEEE Perth April 2011

[11] S Burer and A N Letchford ldquoNon-convex mixed-integer non-linear programming a surveyrdquo Surveys in Operations Researchand Management Science vol 17 no 2 pp 97ndash106 2012

[12] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Proceedings of the Stochastic Algorithms Foundations andApplications (SAGA rsquo09) O Watanabe and T Zeugmann Edsvol 5792 of Lecture Notes in Computer Science pp 169ndash1782009

[13] X-S Yang ldquoFirefly algorithm stochastic test functions anddesign optimizationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[14] I Fister Jr X-S Yang and J Brest ldquoA comprehensive review offirefly algorithmsrdquo Swarm and Evolutionary Computation vol13 pp 34ndash46 2013

[15] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[16] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoA Gaussian firefly algorithmrdquo International Journal of MachineLearning and Computing vol 1 no 5 pp 448ndash453 2011

[17] L Guo G-G Wang H Wang and D Wang ldquoAn effectivehybrid firefly algorithmwith harmony search for global numer-ical optimizationrdquoTheScientificWorld Journal vol 2013 ArticleID 125625 9 pages 2013

[18] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoSome hybrid models to improve firefly algorithm perfor-mancerdquo International Journal of Artificial Intelligence vol 8 no12 pp 97ndash117 2012

[19] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 467631 12pages 2012

[20] X Lin Y Zhong and H Zhang ldquoAn enhanced firefly algorithmfor function optimisation problemsrdquo International Journal ofModelling Identification and Control vol 18 no 2 pp 166ndash1732013

[21] A Manju and M J Nigam ldquoFirefly algorithm with fireflieshaving quantum behaviorrdquo in Proceedings of the InternationalConference on Radar Communication and Computing (ICRCCrsquo12) pp 117ndash119 IEEE Tiruvannamalai India December 2012

[22] X-S Yang and X He ldquoFirefly algorithm recent advances andapplicationsrdquo International Journal of Swarm Intelligence vol 1no 1 pp 36ndash50 2013

[23] S Arora and S Singh ldquoThe firefly optimization algorithmconvergence analysis and parameter selectionrdquo InternationalJournal of Computer Applications vol 69 no 3 pp 48ndash52 2013

[24] X-S Yang S S S Hosseini and A H Gandomi ldquoFireflyalgorithm for solving non-convex economic dispatch problemswith valve loading effectrdquo Applied Soft Computing Journal vol12 no 3 pp 1180ndash1186 2012

[25] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using firefly algorithmrdquo Computers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[26] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering with Computers vol 29 no 2 pp175ndash184 2013

[27] A N Kumbharana and G M Pandey ldquoSolving travellingsalesman problemusing firefly algorithmrdquo International Journalfor Research in ScienceampAdvanced Technologies vol 2 no 2 pp53ndash57 2013

[28] M K Sayadi A Hafezalkotob and S G J Naini ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[29] X-S Yang ldquoFirefly algorithmrdquo inNature-InspiredMetaheuristicAlgorithms pp 81ndash96 Luniver Press University of CambridgeCambridge UK 2nd edition 2010

[30] A R Jordehi and J Jasni ldquoParameter selection in particle swarmoptimisation a surveyrdquo Journal of Experimental amp TheoreticalArtificial Intelligence vol 25 no 4 pp 527ndash542 2013

[31] M Mahdavi M Fesanghary and E Damangir ldquoAn improvedharmony search algorithm for solving optimization problemsrdquoAppliedMathematics and Computation vol 188 no 2 pp 1567ndash1579 2007

[32] M Padberg ldquoHarmony search algorithms for binary optimiza-tion problemsrdquo in Operations Research Proceedings 2011 pp343ndash348 Springer Berlin Germany 2012

[33] M A K Azad A M A C Rocha and E M G P FernandesldquoA simplified binary artificial fish swarm algorithm for unca-pacitated facility location problemsrdquo in Proceedings of WorldCongress on Engineering S I Ao L Gelman D W L HukinsA Hunter and A M Korsunsky Eds vol 1 pp 31ndash36 IAENGLondon UK 2013

[34] M Sevkli and A R Guner ldquoA continuous particle swarm opti-mization algorithm for uncapacitated facility location problemrdquoin Ant Colony Optimization and Swarm Intelligence M DorigoL M Gambardella M Birattari A Martinoli R Poli and TStutzle Eds vol 4150 of Lecture Notes in Computer Sciencespp 316ndash323 Springer 2006

[35] L Wang and C Singh ldquoUnit commitment considering genera-tor outages through a mixed-integer particle swarm optimiza-tion algorithmrdquoApplied SoftComputing Journal vol 9 no 3 pp947ndash953 2009

[36] MM Ali C Khompatraporn and Z B Zabinsky ldquoA numericalevaluation of several stochastic algorithms on selected con-tinuous global optimization test problemsrdquo Journal of GlobalOptimization vol 31 no 4 pp 635ndash672 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 4: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

4 Advances in Operations Research

variable into a binary one are presented Furthermore toextend FA to binary optimization different implementationsto incorporate the heuristic strategies into FA are describedWe will use the term ldquodiscretizationrdquo to define the processthat transforms a continuous real variable represented forexample by 119909 into a binary one represented by 119887

31 Sigmoid Logistic Function This discretization methodol-ogy is the most common in the literature when population-based stochastic algorithms are considered in binary opti-mization namely PSO [6 8 9] DE [3] HS [1 32] artificialfish swarm [33] and artificial bee colony [4 7 10]

When 119909119894 moves towards 119909119895 the likelihood is that thediscrete components of 119909119894 change from binary numbers toreal ones To transform a real number into a binary one thefollowing sigmoid logistic function constrains the real valueto the interval [0 1]

sig (119909119894119897) =

1

1 + exp (minus119909119894119897) (9)

where 119909119894119897 in the context of FA is the component 119897 of the

position vector 119909119894 (of firefly 119894) aftermovementmdashrecall (7) and(4) Equation (9) interprets the floating-point components ofa solution as a set of probabilities These are then used toassign appropriate binary values by using

119887119894119897=

1 if rand le sig (119909119894119897)

0 otherwise(10)

where sig(119909119894119897) gives the probability that the component itself

is 0 or 1 [28] and rand sim 119880[0 1] We note that during theiterative process the firefly positions 119909 were not allowed tomove outside the search space Ω

32 Proposed Sigmoid erf Function The error function isa special function with a shape that appears mainly inprobability and statistics contexts Denoted by ldquoerfrdquo themathematical function defined by the integral

erf (119909) = 2

radic120587int119909

0

exp (minus1199052) 119889119905 (11)

satisfies the following properties

erf (0) = 0 erf (minusinfin) = minus1 erf (+infin) = 1

erf (minus119909) = minus erf (119909)(12)

and it has a close relation with the normal distributionprobabilities When a series of measurements are describedby a normal distribution with mean 0 and standard deviation120590 the erf function evaluated at (119909120590radic2) for a positive119909 givesthe probability that the error of a single measurement lies inthe interval [minus119909 119909] The derivative of the erf function followsimmediately from its definition

119889

119889119905erf (119905) = 2

radic120587exp (minus1199052) for 119905 isin R (13)

x

Sigm

oid

func

tion

1

09

08

07

06

05

04

03

02

01

0minus5 minus4 minus3 minus2 minus1 0 1 2 3 4 5

1(1 + exp(minusx))05(1 + (x))erf

Figure 1 Sigmoid functions

The good properties of the erf function are thus used to definea new sigmoid function the sigmoid erf function

sig (119909119894119897) = 05 (1 + erf (119909119894

119897)) (14)

which is a bounded differentiable real function defined forall 119909 isin R and has a positive derivative at each point Acomparison of both functions (9) and (14) is depicted inFigure 1 Note that the slope at the origin of the sigmoidfunction in (14) is around 05641895 while that of function(9) is 025 thus yielding a faster growing from 0 to 1

33 Rounding to Integer Part The simplest discretizationprocedure of a continuous component of a point into 01 bituses the rounding to the integer part function known as floorfunction and is described in [34] Each continuous value119909119894119897isin R is transformed into a binary one 0 bit or 1 bit 119887119894

119897

for 119897 = 1 119899 in the following way

119887119894119897= lfloor

10038161003816100381610038161003816119909119894

119897mod 2

10038161003816100381610038161003816rfloor (15)

where lfloor119911rfloor represents the floor function of 119911 and gives thelargest integer not greater than 119911 The floating-point value119909119894119897is first divided by 2 and then the absolute value of the

remainder is floored The obtained integer number is the bitvalue of the component

34 Heuristics Implementation In this study three methodscapable of computing global solutions to binary optimizationproblems using FA are proposed

341 Movement on Continuous Space In this implemen-tation of the previously described heuristics denoted byldquomovement on continuous spacerdquo (mCS) the movementof each firefly is made on the continuous space and itsattractiveness term is updated considering the real positionvector The real position of firefly 119894 is discretized only after allmovements towards brighter fireflies have been carried outWe note that the fitness evaluation of each firefly for firefly

Advances in Operations Research 5

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119909119894 such that 119894 = 2 119898 doforall 119909119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573Move position 119909119894 of firefly 119894 towards 119909119895 using (7)

Discretize positions 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest119891)Set 119896 = 119896 + 1

Algorithm 2 HBFA with mCS

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119887119894 such that 119894 = 2 119898 doforall 119887119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573 based on distance 10038171003817100381710038171003817119887

119894 minus 11988711989510038171003817100381710038171003817119901

Move binary position 119887119894 of firefly 119894 towards 119887119895using 119909119894 = 119887119894 + 120573(119887119895 minus 119887119894) + 120572119871(1198871)120590119894

119887

Discretize position of firefly 119894 119909119894 rarr 119887119894Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 3 HBFA with mBS

ranking is always based on the binary position Algorithm 2presents the main steps of HBFA with mCS

342 Movement on Binary Space This implementationdenoted by ldquomovement on binary spacerdquo (mBS) moves thebinary position of each firefly towards the binary positionsof brighter fireflies that is each movement is made on thebinary space although the corresponding position may fail tobe 0 or 1 bit string andmust be discretized before the updatingof attractiveness Here fitness is also based on the binarypositions Algorithm 3 presents the main steps of HBFA withmBS

343 Probability for Binary Component For this implemen-tation named ldquoprobability for binary componentrdquo (pBC) weborrow the concept from the binary PSO [6 9 35] whereeach component of the velocity vector is directly used tocompute the probability that the corresponding componentof the particle position 119909119894

119897 is 0 or 1 Similarly in the FA

algorithm we do not interpret the vector 119910119894 in (7) as a step

size but rather as amean to compute the probability that eachcomponent of the position vector of firefly 119894 is 0 or 1Thus wedefine

119887119894119897=

1 if rand le sig (119910119894119897)

0 otherwise(16)

where sig() represents a sigmoid function Algorithm 4 is thepseudocode of HBFA with pBC

4 Numerical Experiments

In this section we present the computational results that wereobtained with HBFAmdashAlgorithms 2 3 and 4 using (9) (14)or (15)mdashaiming to investigate its performance when solvinga set of binary nonlinear optimization problems Two small0-1 knapsack problems are also used to test the algorithmsrsquobehavior on linear problems with 01 variables

The numerical experiments were carried out on a PCIntel Core 2 Duo Processor E7500 with 29GHz and 4Gbof memory The algorithms were coded in Matlab Version800783 (R2012b)

6 Advances in Operations Research

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119887119894 such that 119894 = 2 119898 doforall 119887119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573 based on distance 10038171003817100381710038171003817119887

119894 minus 11988711989510038171003817100381710038171003817119901

Compute 119910119894 using binary positions (see (7))Discretize 119910119894 and define 119887119894 using (16)

Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 4 HBFA with pBC

41 Experimental Setting Each experimentwas conducted 30times The size of the population is made to depend on theproblemrsquos dimension and is set to 119898 = min40 2119899 Someexperiments have been carried out to tune certain parametersof the algorithms In the proposed FA with dynamic 120572 and 120574they are set as follows 120573

0= 1 119901 = 1 120572max = 05 120572min =

001 120574max = 10 and 120574min = 01 In Algorithms 2 (mCS) 3(mBS) and 4 (pBC) iterations were limited to 119896max = 500and the tolerance for finding a good quality solution is 120578 =

10minus6 Results reported are averaged (over the 30 runs) of bestfunction values number of function evaluations and numberof iterations

42 Experimental Results First we use a set of ten bench-mark nonlinear functions with different dimensions andcharacteristics For example five functions are unimodal andthe remaining multimodal [3 9 10 36] They are displayedin Table 1 Although they are widely used in continuousoptimization we now aim to converge to a 01 bit stringsolution

First we aim to compare with the results reported in[3 9 10] Due to poor results the authors in [10] donot recommend the use of ABC to solve binary-valuedproblems The other metaheuristics therein implemented arethe following

(i) angle modulated PSO (AMPSO) and angle modu-lated DE (AMDE) that incorporate a trigonometricfunction as a bit string generator into the classic PSOand DE algorithms respectively

(ii) binary DE and PSO based on the sigmoid logisticfunction and (10) denoted by binDE and binPSOrespectively

We noticed that the problems Foxholes Griewank Rosen-brock Schaffer and Step are not correctly described in[3 9 10] Table 2 shows both the averaged best functionvalues (obtained during the 30 runs) 119891avg with the StD inparentheses and the averaged number of function evalua-tions nfe obtained with the sigmoid logistic function (see in

(9)) and (10) while using the three implementations mCSmBS and pBC Results obtained for these ten functionsindicate that our proposal HBFA produces high qualitysolutions and outperforms the binary versions binPSO andbinDE as well as AMPSO and AMDE We also note thatmCS has the best ldquonferdquo values on 6 problems mBS is betteron 3 problems (one is a tie with mCS) and pBC on 2problems Thus the performance of mCS is the best whencompared with those of mBS and pBC The latter is theleast efficient of all in particular for the large dimensionalproblems

To analyze the statistical significance of the results weperform a Friedman test This is a nonparametric statisticaltest to determine significant differences in mean for oneindependent variable with two or more levelsmdashalso denotedas treatmentsmdashand a dependent variable (or matched groupstaken as the problems) The null hypothesis in this test is thatthe mean ranks assigned to the treatments under testing arethe same Since all three implementations are able to reach thesolutions within the 120578 error tolerance on 9 out of 10 problemsthe statistical analysis is based on the performance criterionldquonferdquo In this hypothesis testing we have three treatmentsand ten groups Friedmanrsquos chi-square has a value of 2737(with a 119875 value of 0255) For 2 degrees of freedom reference1205942 distribution the critical value for a significance level of5 is 599 Hence since 2737 le 599 the null hypothesisis not rejected and we conclude that there is no evidencethat the three mean ranks values have statistically significantdifferences

To further compare the sigmoid functions with therounding to integer strategy we include in Table 3 the resultsobtained by the ldquoerfrdquo function in (14) together with (10) andthe floor function in (15) Only the implementationsmCS andmBS are tested The table also shows the averaged numberof iterations nit The results illustrate that implementationmCS (Algorithm 2) works very well with strategies based on(14) together with (10) and (15) The success rate for all theproblems is 100 meaning that the algorithms stop becausethe119891 value at the position of the bestbrightest firefly is within

Advances in Operations Research 7

Table 1 Problems set

Ackley 119891 (119909) = minus20 exp(minus02radic 1

119899

119899

sum119894=1

1199092119894) minus exp(1

119899

119899

sum119894=1

cos (2120587119909119894)) + 20 + 119890

119899 = 30Ω = [minus30 30]30 119891lowast = 0 at 119909lowast = (0 0)

Foxholes119891(119909) =

1

0002 + sum25

119895=1(1 (119895 + (119909

1minus 1198861119895)6

+ (1199092minus 1198862119895)6

))

[119886119894119895] = [

minus32 minus16 0 16 32 minus32 minus16 sdot sdot sdot 16 32

minus32 minus32 minus32 minus32 minus32 minus16 minus16 sdot sdot sdot 32 32]

119899 = 2 Ω = [minus65536 65536]2 119891lowast asymp 13 at 119909lowast = (0 0)

Griewank119891 (119909) = 1 +

1

4000

119899

sum119894=1

1199092119894minus119899

prod119894=1

cos(119909119894

radic119894)

119899 = 30 Ω = [minus300 300]30 119891lowast = 0 at 119909lowast = (0 0)

Quartic119891(119909) =

119899

sum119894=1

1198941199094119894+ 119880[0 1]

119899 = 30 Ω = [minus128 128]30 119891lowast = 0 + noise at 119909lowast = (0 0)

Rastrigin119891(119909) = 10119899 +

119899

sum119894=1

(1199092119894minus 10 cos (2120587119909

119894))

119899 = 30 Ω = [minus512 512]30 119891lowast = 0 at 119909lowast = (0 0)

Rosenbrock2 119891(119909) = 100 (11990921minus 1199092)2

+ (1 minus 1199091)2

119899 = 2 Ω = [minus2048 2048]2 119891lowast = 0 at 119909lowast = (1 1)

Rosenbrock 119891(119909) =119899minus1

sum119894=1

100(1199092119894minus 119909119894+1)2 + (1 minus 119909

119894)2

119899 = 30 Ω = [minus2048 2048]30 119891lowast = 0 at 119909lowast = (1 1)

Schaffer 119891(119909) = 05 +(sin(radic1199092

1+ 11990922))2

minus 05

(1 + 0001(11990921+ 11990922))2

119899 = 2Ω = [minus100 100]2 119891lowast = 0 at 119909lowast = (0 0)

Spherical119891 (119909) =

119899

sum119894=1

1199092119894

119899 = 3 Ω = [minus512 512]3 119891lowast = 0 at 119909lowast = (0 0 0)

Step119891(119909) = 6119899 +

119899

sum119894=1

lfloor119909119894rfloor

119899 = 5 Ω = [minus512 512]5 119891lowast = 30 at 119909lowast = (0 0 0 0 0)

a tolerance 120578 of the optimal solution 119891lowast in all runs FurthermBS (Algorithm 3) works better when the discretization ofthe variables is carried out by (15) Overall mCS based on (14)produces the best results on 6 problems mCS based on (15)gives the best results on 7 problems (including 4 ties with theformer case) mBS based on (14) wins only on one problemand mBS based on (15) wins on 3 problems (all are ties withmCS based on (15))

Further when performing the Friedman test on thefour distributions of ldquonferdquo values the chi-square statisticalvalue is 13747 (and the 119875 value is 00033) From the 1205942

distribution table the critical value for a significance levelof 5 and 3 degrees of freedom is 781 Since 13747 gt 781the null hypothesis is rejected and we conclude that theobserved differences of the four distributions are statisticallysignificant

We now introduce in the statistical analysis the resultsreported in Tables 2 and 3 concerned with both implementa-tions mCS andmBS Six distributions of ldquonferdquo values are now

in comparison Friedmanrsquos chi-square value is 18175 (119875 value= 00027) The critical value of the chi-square distributionfor a significance level of 5 and 5 degrees of freedom is1107 Thus the null hypothesis of ldquono significant differenceson mean ranksrdquo is rejected and there is evidence that thesix distributions of ldquonferdquo values have statistically significantdifferences Multiple comparisons (two at a time) may becarried out to determine which mean ranks are significantlydifferent The estimates of the 95 confidence intervalsare shown in the graph of Figure 2 for each case undertesting Two compared distributions of ldquonferdquo are significantlydifferent if their intervals are disjoint and are not significantlydifferent if their intervals overlap Hence from the six caseswe conclude that the mean ranks produced by mCS basedon (15) are significantly different from those of mBS basedon (9) and mBS based on (14) For the remaining pairs ofcomparison there are no significant differences on the meanranks

8 Advances in Operations Research

Table 2 Comparison with AMPSO binPSO binDE and AMDE based on 119891avg and StD (shown in parentheses)

Prob mCS based on (9) mBS based on (9) pBC based on (9) AMPSO binPSO binDE AMDE119891avg nfe 119891avg nfe 119891avg nfe 119891avg 119891avg 119891avg 119891avg

Ackley 888119890 minus 16 80 888119890 minus 16 1156 888119890 minus 16 2168 19711989001 20111989001 17311989001 16411989001

(00011989000) (00011989000) (00011989000) (057119890 minus 01) (049119890 minus 01) (03111989001) (07611989000)

Foxholes 12711989001 61 12711989001 72 12711989001 63 053119890 minus 10 053119890 minus 10 12911989001 5011989002

(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (00011989000) (097119890 minus 14) (08611989000) (0011989000)

Griewank 00011989000 80 00011989000 1332 00011989000 2300 10611989002 67911989001 26311989002 20611989002

(00011989000) (00011989000) (00011989000) (04411989001) (09811989001) (01011989002) (03911989001)

Quartic 455119890 minus 01 2012 537119890 minus 01 1771 488119890 minus 01 2951 41511989001 20911989001 14911989000 35511989000

(301119890 minus 01) (303119890 minus 01) (271119890 minus 01) (01911989001) (01911989001) (06611989000) (08111989000)

Rastrigin 00011989000 80 00011989000 12827 00011989000 24067 22511989002 30811989002 21411989002 90511989001

(00011989000) (00011989000) (00011989000) (03511989002) (02811989001) (04511989002) (03111989002)

Rosenbrock2 00011989000 65 00011989000 57 00011989000 61 049119890 minus 04 014119890 minus 03 020119890 minus 05 055119890 minus 04

(00011989000) (00011989000) (00011989000) (011119890 minus 03) (088119890 minus 04) (015119890 minus 04) (017119890 minus 04)

Rosenbrock 00011989000 180 00011989000 21907 00011989000 2088 22011989003 22411989003 18111989003 91411989001

(00011989000) (00011989000) (00011989000) (08611989002) (07711989002) (01611989002) (04211989002)

Schaffer 00011989000 61 00011989000 8 00011989000 49 024119890 minus 01 073119890 minus 01 minus099511989000 minus1011989000

(00011989000) (00011989000) (00011989000) (042119890 minus 02) (011119890 minus 01) (027119890 minus 06) (0011989000)

Spherical 00011989000 12 00011989000 12 00011989000 117 030119890 minus 03 030119890 minus 03 015119890 minus 03 020119890 minus 04

(00011989000) (00011989000) (00011989000) (00011989000) (0011989000) (041119890 minus 04) (015119890 minus 04)

Step 30011989001 427 30011989001 427 30011989001 48 00011989000 017119890 minus 04 015119890 minus 01 02511989000

(00011989000) (00011989000) (00011989000) (00011989000) (015119890 minus 04) (0011989000) (060119890 minus 01)

0 1 2 3 4 5 6

mBS based on (15)

mCS based on (15)

mBS based on (14)

mCS based on (14)

mBS based on (9)

mCS based on (9)

mBS based on (9) and (14) have mean ranks significantly different from mCS based on (15)

Figure 2 Confidence intervals for mean ranks of nfe

For comparative purposes we include in Table 4 theresults obtained by using the proposed Levy (L) distributionin the randomization term as shown in (7) and those pro-duced by the Uniform (U) distribution using rand sim 119880[0 1]as shown in (3) The reported tests use implementation mCS(described in Algorithm 2) with the two heuristics for binaryvariables (i) the ldquoerfrdquo function in (14) together with (10) and(ii) the floor function in (15) It is shown that the performanceof HBFA with Uniform distribution is very sensitive to thedimension of the problem since the efficiency is good when119899 is small but gets worse when 119899 is largeThus we have shownthat the Levy distribution is a very good bid

We add to some problems with 119899 = 30 from Table 1mdashAckley Griewank Rastrigin Rosenbrock and Sphericalmdashthree other functions Schwefel 222 Schwefel 226 and SumofDifferent Power to compare our results with those reportedin [1] Schwefel 222 is unimodal and for Ω = [minus10 10]30the binary solution is (0 0) with 119891lowast = 0 Schwefel 226is multimodal and in Ω = [minus500 500]30 the binary solutionis (1 1 1) with 119891lowast = minus25244129544 Sum of DifferentPower is unimodal and in Ω = [minus1 1]30 the minimum is 0at (0 0) For the results of Table 5 we use HBFA basedon mCS with both ldquoerfrdquo function in (14) together with (10)and the floor function (15) The table reports on the average

Advances in Operations Research 9

Table 3 Comparison of mCS versus mBS and (14) versus (15) based on 119891avg nfe and nit

Prob mCS based on (14) mBS based on (14) mCS based on (15) mBS based on (15)119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 6787 16 888119890 minus 16 80 1 888119890 minus 16 827 11Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12911989001 4048 1002Griewank 00011989000 80 1 00011989000 7173 169 00011989000 80 1 00011989000 827 11Quartic 238119890 minus 01 813 103 466119890 minus 01 7947 189 948119890 minus 02 80 1 393119890 minus 01 80 1Rastrigin 00011989000 80 1 00011989000 7027 166 00011989000 80 1 00011989000 80 1Rosenbrock2 00011989000 64 06 00011989000 53 03 00011989000 63 06 233119890 minus 01 4708 1167Rosenbrock 00011989000 80 1 00011989000 1053 16 00011989000 80 1 29011989001 20040 500Schaffer 00011989000 68 07 00011989000 129 22 00011989000 51 03 708119890 minus 02 2051 503Spherical 00011989000 99 02 00011989000 227 18 00011989000 101 03 00011989000 115 04Step 30011989001 459 04 30011989001 629 1 30011989001 405 03 30011989001 405 03

Table 4 Comparison between Levy and Uniform distributions in the randomization term based on 119891avg nfe and nit (with StD inparentheses)

Prob mCS based on (14) + L mCS based on (14) + U mCS based on (15) + L mCS based on (15) + U119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 1096 264 888119890 minus 16 80 1 141e00 20040 500(00011989000) (00011989000) (00011989000) (126119890 minus 02)

Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12711989001 68 07(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (903119890 minus 15)

Griewank 00011989000 80 1 00011989000 2436 599 00011989000 80 1 127119890 minus 01 20040 500(00011989000) (00011989000) (00011989000) (276119890 minus 02)

Quartic 238119890 minus 01 813 103 69011989000 14692 3662 948119890 minus 02 80 1 510119890 minus 01 10581 2635(170119890 minus 01) (11611989001) (103119890 minus 01) (290119890 minus 01)

Rastrigin 00011989000 80 1 00011989000 1157 279 00011989000 80 1 100119890 minus 01 18104 4516(00011989000) (00011989000) (00011989000) (403119890 minus 01)

Rosenbrock2 00011989000 64 06 00011989000 368 82 00011989000 63 06 00011989000 59 05(00011989000) (00011989000) (00011989000) (00011989000)

Rosenbrock 00011989000 80 1 82211989001 14136 3524 00011989000 80 1 74211989001 17698 4412(00011989000) (10211989002) (00011989000) (84311989001)

Schaffer 00011989000 68 07 00011989000 185 36 00011989000 51 03 00011989000 56 04(00011989000) (00011989000) (00011989000) (00011989000)

Spherical 00011989000 99 02 00011989000 133 07 00011989000 101 03 00011989000 147 08(00011989000) (00011989000) (00011989000) (00011989000)

Step 30011989001 459 04 30011989001 469 05 30011989001 405 03 30011989001 523 06(00011989000) (00011989000) (00011989000) (00011989000)

Table 5 Comparison of HBFA (with mCS) with ABHS in [1] based on 119891avg nfe and SR ()

Prob mCS based on (14) mCS based on (15) ABHS in [1]119891avg nfe SR () 119891avg nfe SR () 119891avg nfe SR ()

Ackley 888119890 minus 16 80 100 888119890 minus 16 80 100 156119890 minus 01 62350 90

Griewank 00011989000 80 100 00011989000 80 100 330119890 minus 02 79758 38

Rastrigin 00011989000 80 100 00011989000 80 100 13211989001 90000 0

Rosenbrock 00011989000 80 100 00011989000 80 100 68011989002 90000 0

Schwefel 222 00011989000 80 100 00011989000 80 100 00011989000 59870 100

Schwefel 226 minus25211989001 80 100 minus24711989001 10867 87 minus119511989004 90000 0

Spherical 00011989000 80 100 00011989000 80 100 00011989000 62234 100

Sum of Different Power 00011989000 91 100 00011989000 168 100 00011989000 80371 100

10 Advances in Operations Research

Table 6 Results for varied dimensions (119899 = 50 100 200) considering119898 = 40

119891lowast 119899mCS based on (14) mCS based on (15)

119891avg StD nfe nit 119891avg StD nfe nit

Ackley00011989000 50 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 100 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 200 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

Griewank00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Quartic00011989000 + noise 50 224119890 minus 01 195119890 minus 01 827 11 143119890 minus 01 159119890 minus 01 80 1

00011989000 + noise 100 432119890 minus 01 273119890 minus 01 1467 27 173119890 minus 01 110119890 minus 01 80 1

00011989000 + noise 200 523119890 minus 01 294119890 minus 01 17387 425 196119890 minus 01 213119890 minus 01 813 103

Rosenbrock00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Spherical00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Step30011989002 50 30011989002 00011989000 80 1 30011989002 00011989000 80 1

60011989002 100 60011989002 00011989000 80 1 60011989002 00011989000 80 1

12011989003 200 12011989003 00011989000 80 1 12011989003 00011989000 80 1

function values average number of function evaluations andsuccess rate (SR) Here 50 independent runs were carriedout to compare with the results shown in [1] The maximumnumber of function evaluations therein used was 90000 Itis shown that our HBFA outperforms the proposed adaptivebinary harmony search (ABHS)

43 Effect of Problemrsquos Dimension on HBFA Performance Wenow consider six problems with varied dimensions from theprevious set to analyze the effect of problemrsquos dimension onthe HBFA performance We test three dimensions 119899 = 50119899 = 100 and 119899 = 200 The algorithmrsquos parameters areset as previously defined We remark that the size of thepopulation for all the tested problems and dimensions is 40points

Table 6 contains the results for comparison based onaveraged values of 119891 number of function evaluationsand number of iterations The ldquoStDrdquo of the 119891 values arealso displayed Since the implementation mCS shown inAlgorithm 2 performs better and shows more consistentresults than the other two we tested only mCS based on (14)and mCS based on (15)

Besides testing significant differences on the mean ranksproduced by the two treatments mCS based on (14) andmCSbased on (15) we also want to determine if the differences onmean ranks produced by problemrsquos dimensionmdash50 100 and200mdashare statistically significant at a significance level of 5Hence we aim to analyze the effects of two factors ldquoArdquo andldquoBrdquo ldquoArdquo is the HBFA implementation (with two levels) andldquoBrdquo is the problemrsquos dimension (with three levels) For thispurpose the results obtained for the six problems for each

combination of the levels of ldquoArdquo and ldquoBrdquo are considered asreplications When performing the Friedman test for factorldquoArdquo the chi-square statistical value is 1225 (119875 value = 02685)with 1 degree of freedom The critical value for a significancelevel of 5 and 1 degree of freedom in the 1205942 distributiontable is 384 and there is no evidence of statistically significantdifferences From the Friedman test for factor ldquoBrdquo we alsoconclude that there is no evidence of statistically significantdifferences since the chi-square statistical value is 0746 (119875value = 06886) with 2 degrees of freedom (The critical valueof the 1205942 distribution table for a significance level of 5 and2 degrees of freedom is 599) Hence we conclude that thedimension of the problem does not affect the algorithmrsquos per-formance Only with problem Quartic the efficiency of mCSbased on (14) getsworse as dimension increasesOverall bothtested strategies are rather effective when binary solutions arerequired on small as well as on large nonlinear optimizationproblems

44 Solving 0-1 Knapsack Problems Finally we aim to analyzethe behavior of our best tested strategies when solvingwell-known binary and linear optimization problems Forthis preliminary experiment we selected two small knap-sack problems The 0-1 knapsack problem (KP) can bedescribed as follows Let 119899 be the number of items fromwhich we have to select some of them to be carried in aknapsack Let 119908

119897and V

119897be the weight and the value of

item 119897 respectively and let 119882 be the knapsackrsquos capac-ity It is usually assumed that all weights and values arenonnegative The objective is to maximize the total value

Advances in Operations Research 11

of the knapsack under the constraint of the knapsackrsquoscapacity

max119909

119881 (119909) equiv119899

sum119897=1

V119897119909119897

st119899

sum119897=1

119908119897119909119897le 119882 119909

119897isin 0 1 119897 = 1 119899

(17)

If item 119897 is selected 119909119897= 1 otherwise 119909

119897= 0 Using a penalty

function this problem can be transformed into

min119909

minus119899

sum119897=1

V119897119909119897+ 120583max0

119899

sum119897=1

119908119897119909119897minus119882 (18)

where 120583 is the penalty parameter which was set to be 100 inthis experiment

Case 1 (an instance of a 0-1 KP with 4 items) Knapsackrsquoscapacity is 119882 = 6 and the vectors of values and weights areV = (40 15 20 10) and 119908 = (4 2 3 1) Based on the above-mentioned parameters the HBFA with mCS based on (14)was run 30 times and the averaged results were the followingWith a success rate of 100 items 1 and 2 are included in theknapsack and items 3 and 4 are excluded with a maximumvalue of 55 (StD = 00e00) On average the runs required08 iterations and 293 function evaluations With a successrate of 23 the heuristic based on the floor function thusmCS based on (15) reached 119891avg = 49 (StD = 40e00) afteran average of 61611 function evaluations and an average of3841 iterations

Case 2 (an instance of a 0-1 KP with 8 items) The maximumcapacity of the knapsack is set to 8 and the vectors ofvalues and weights are V = (83 14 54 79 72 52 48 62) and119908 = (3 2 3 2 1 2 2 3) The results are averaged over the 30runs After 87 iterations and 3867 function evaluations themaximum value produced by the strategy mCS based on (14)is 286 (StD = 00e00) with a success rate of 100 Items 14 5 and 6 are included in the knapsack and the others areexcluded The heuristic mCS based on (15) did not reach theoptimal solution All runs required 500 iterations and 20040function evaluations and the average function values were119891avg = 227 with StD = 314e01

5 Conclusions and Future Work

In this work we have implemented several heuristics tocompute a global optimal binary solution of bound con-strained nonlinear optimization problems which have beenincorporated into FA yielding the herein called HBFA Theproblems addressed in this study have bounded continu-ous search space Our FA proposal uses dynamic updatingschemes for two parameters 120574 from the attractiveness termand 120572 from the randomization term and considers the Levydistribution to create randomness in firefly movement Theperformance behavior of the proposed heuristics has beeninvestigated Three simple heuristics capable of transformingreal continuous variables into binary ones are implemented

A new sigmoid ldquoerfrdquo function is proposed In the context ofthe firefly algorithm three different implementations aimingto incorporate the heuristics for binary variables into FAare proposed (mCS mBS and pBC) Based on a set ofbenchmark problems a comparison is carried out with otherbinary dealing metaheuristics namely AMPSO binPSObinDE and AMDE The experimental results show that theimplementation denoted bymCSwhen combined with eitherthe new sigmoid ldquoerfrdquo function or the rounding schemebased on the floor function is quite efficient and superiorto the other methods in comparison The statistical analysiscarried out on the results shows evidence of statisticallysignificant differences on efficiency measured by the numberof function evaluations between the implementation mCSbased on the floor function approach and the mBS basedon both tested sigmoid functions schemes We have alsoinvestigated the effect of problemrsquos dimension on the perfor-mance of our algorithmUsing the Friedman statistical testweconclude that the differences on efficiency are not statisticallysignificant Another simple experiment has shown that theimplementation mCS with the sigmoid ldquoerfrdquo function iseffective in solving two small 0-1 KPThe performance of thissimple heuristic strategy will be further analyzed to solvelarge and multidimensional 0-1 KP Future developmentsconcerning the HBFA will consider its extension to dealwith integer variables in nonlinear optimization problemsDifferent heuristics to transform continuous real variablesinto integer variableswill be investigated Challengingmixed-integer nonconvex nonlinear problems will be solved

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors wish to thank two anonymous referees fortheir valuable suggestions to improve the paper This workhas been supported by FCT (Fundacao para a Ciencia eTecnologia Portugal) in the scope of the Projects PEst-OEMATUI00132014 and PEst-OEEEIUI03192014

References

[1] L Wang R Yang Y Xu Q Niu P M Pardalos and MFei ldquoAn improved adaptive binary harmony search algorithmrdquoInformation Sciences vol 232 pp 58ndash87 2013

[2] M A K Azad A M A C Rocha and E M G P FernandesldquoImproved binary artificial fish swarm algorithm for the 0-1multidimensional knapsack problemsrdquo Swarm and Evolution-ary Computation vol 14 pp 66ndash75 2014

[3] A P Engelbrecht andG Pampara ldquoBinary differential evolutionstrategiesrdquo in Proceedings of the IEEE Congress on EvolutionaryComputation (CEC rsquo07) pp 1942ndash1947 September 2007

[4] M H Kashan N Nahavandi and A H Kashan ldquoDisABC anew artificial bee colony algorithm for binary optimizationrdquoApplied Soft Computing Journal vol 12 no 1 pp 342ndash352 2012

12 Advances in Operations Research

[5] M H Kashan A H Kashan and N Nahavandi ldquoA noveldifferential evolution algorithm for binary optimizationrdquo Com-putational Optimization and Applications vol 55 no 2 pp 481ndash513 2013

[6] J Kennedy and R C Eberhart ldquoA discrete binary versionof the particle swarm algorithmrdquo in Proceedings of the IEEEInternational Conference on Systems Man and Cybernetics vol5 pp 4104ndash4108 Orlando Fla USA October 1997

[7] T Liu L Zhang and J Zhang ldquoStudy of binary artificialbee colony algorithm based on particle swarm optimizationrdquoJournal of Computational Information Systems vol 9 no 16 pp6459ndash6466 2013

[8] S Mirjalili and A Lewis ldquoS-shaped versus V-shaped transferfunctions for binary particle swarm optimizationrdquo Swarm andEvolutionary Computation vol 9 pp 1ndash14 2013

[9] G Pampara A P Engelbrecht and N Franken ldquoBinarydifferential evolutionrdquo in Proceedings of the IEEE Congress onEvolutionary Computation (CEC rsquo06) pp 1873ndash1879 VancouverCanada July 2006

[10] G Pampara and A P Engelbrecht ldquoBinary artificial bee colonyoptimizationrdquo in Proceedings of the IEEE Symposium on SwarmIntelligence (SIS rsquo11) pp 1ndash8 IEEE Perth April 2011

[11] S Burer and A N Letchford ldquoNon-convex mixed-integer non-linear programming a surveyrdquo Surveys in Operations Researchand Management Science vol 17 no 2 pp 97ndash106 2012

[12] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Proceedings of the Stochastic Algorithms Foundations andApplications (SAGA rsquo09) O Watanabe and T Zeugmann Edsvol 5792 of Lecture Notes in Computer Science pp 169ndash1782009

[13] X-S Yang ldquoFirefly algorithm stochastic test functions anddesign optimizationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[14] I Fister Jr X-S Yang and J Brest ldquoA comprehensive review offirefly algorithmsrdquo Swarm and Evolutionary Computation vol13 pp 34ndash46 2013

[15] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[16] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoA Gaussian firefly algorithmrdquo International Journal of MachineLearning and Computing vol 1 no 5 pp 448ndash453 2011

[17] L Guo G-G Wang H Wang and D Wang ldquoAn effectivehybrid firefly algorithmwith harmony search for global numer-ical optimizationrdquoTheScientificWorld Journal vol 2013 ArticleID 125625 9 pages 2013

[18] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoSome hybrid models to improve firefly algorithm perfor-mancerdquo International Journal of Artificial Intelligence vol 8 no12 pp 97ndash117 2012

[19] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 467631 12pages 2012

[20] X Lin Y Zhong and H Zhang ldquoAn enhanced firefly algorithmfor function optimisation problemsrdquo International Journal ofModelling Identification and Control vol 18 no 2 pp 166ndash1732013

[21] A Manju and M J Nigam ldquoFirefly algorithm with fireflieshaving quantum behaviorrdquo in Proceedings of the InternationalConference on Radar Communication and Computing (ICRCCrsquo12) pp 117ndash119 IEEE Tiruvannamalai India December 2012

[22] X-S Yang and X He ldquoFirefly algorithm recent advances andapplicationsrdquo International Journal of Swarm Intelligence vol 1no 1 pp 36ndash50 2013

[23] S Arora and S Singh ldquoThe firefly optimization algorithmconvergence analysis and parameter selectionrdquo InternationalJournal of Computer Applications vol 69 no 3 pp 48ndash52 2013

[24] X-S Yang S S S Hosseini and A H Gandomi ldquoFireflyalgorithm for solving non-convex economic dispatch problemswith valve loading effectrdquo Applied Soft Computing Journal vol12 no 3 pp 1180ndash1186 2012

[25] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using firefly algorithmrdquo Computers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[26] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering with Computers vol 29 no 2 pp175ndash184 2013

[27] A N Kumbharana and G M Pandey ldquoSolving travellingsalesman problemusing firefly algorithmrdquo International Journalfor Research in ScienceampAdvanced Technologies vol 2 no 2 pp53ndash57 2013

[28] M K Sayadi A Hafezalkotob and S G J Naini ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[29] X-S Yang ldquoFirefly algorithmrdquo inNature-InspiredMetaheuristicAlgorithms pp 81ndash96 Luniver Press University of CambridgeCambridge UK 2nd edition 2010

[30] A R Jordehi and J Jasni ldquoParameter selection in particle swarmoptimisation a surveyrdquo Journal of Experimental amp TheoreticalArtificial Intelligence vol 25 no 4 pp 527ndash542 2013

[31] M Mahdavi M Fesanghary and E Damangir ldquoAn improvedharmony search algorithm for solving optimization problemsrdquoAppliedMathematics and Computation vol 188 no 2 pp 1567ndash1579 2007

[32] M Padberg ldquoHarmony search algorithms for binary optimiza-tion problemsrdquo in Operations Research Proceedings 2011 pp343ndash348 Springer Berlin Germany 2012

[33] M A K Azad A M A C Rocha and E M G P FernandesldquoA simplified binary artificial fish swarm algorithm for unca-pacitated facility location problemsrdquo in Proceedings of WorldCongress on Engineering S I Ao L Gelman D W L HukinsA Hunter and A M Korsunsky Eds vol 1 pp 31ndash36 IAENGLondon UK 2013

[34] M Sevkli and A R Guner ldquoA continuous particle swarm opti-mization algorithm for uncapacitated facility location problemrdquoin Ant Colony Optimization and Swarm Intelligence M DorigoL M Gambardella M Birattari A Martinoli R Poli and TStutzle Eds vol 4150 of Lecture Notes in Computer Sciencespp 316ndash323 Springer 2006

[35] L Wang and C Singh ldquoUnit commitment considering genera-tor outages through a mixed-integer particle swarm optimiza-tion algorithmrdquoApplied SoftComputing Journal vol 9 no 3 pp947ndash953 2009

[36] MM Ali C Khompatraporn and Z B Zabinsky ldquoA numericalevaluation of several stochastic algorithms on selected con-tinuous global optimization test problemsrdquo Journal of GlobalOptimization vol 31 no 4 pp 635ndash672 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 5: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

Advances in Operations Research 5

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119909119894 such that 119894 = 2 119898 doforall 119909119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573Move position 119909119894 of firefly 119894 towards 119909119895 using (7)

Discretize positions 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest119891)Set 119896 = 119896 + 1

Algorithm 2 HBFA with mCS

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119887119894 such that 119894 = 2 119898 doforall 119887119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573 based on distance 10038171003817100381710038171003817119887

119894 minus 11988711989510038171003817100381710038171003817119901

Move binary position 119887119894 of firefly 119894 towards 119887119895using 119909119894 = 119887119894 + 120573(119887119895 minus 119887119894) + 120572119871(1198871)120590119894

119887

Discretize position of firefly 119894 119909119894 rarr 119887119894Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 3 HBFA with mBS

ranking is always based on the binary position Algorithm 2presents the main steps of HBFA with mCS

342 Movement on Binary Space This implementationdenoted by ldquomovement on binary spacerdquo (mBS) moves thebinary position of each firefly towards the binary positionsof brighter fireflies that is each movement is made on thebinary space although the corresponding position may fail tobe 0 or 1 bit string andmust be discretized before the updatingof attractiveness Here fitness is also based on the binarypositions Algorithm 3 presents the main steps of HBFA withmBS

343 Probability for Binary Component For this implemen-tation named ldquoprobability for binary componentrdquo (pBC) weborrow the concept from the binary PSO [6 9 35] whereeach component of the velocity vector is directly used tocompute the probability that the corresponding componentof the particle position 119909119894

119897 is 0 or 1 Similarly in the FA

algorithm we do not interpret the vector 119910119894 in (7) as a step

size but rather as amean to compute the probability that eachcomponent of the position vector of firefly 119894 is 0 or 1Thus wedefine

119887119894119897=

1 if rand le sig (119910119894119897)

0 otherwise(16)

where sig() represents a sigmoid function Algorithm 4 is thepseudocode of HBFA with pBC

4 Numerical Experiments

In this section we present the computational results that wereobtained with HBFAmdashAlgorithms 2 3 and 4 using (9) (14)or (15)mdashaiming to investigate its performance when solvinga set of binary nonlinear optimization problems Two small0-1 knapsack problems are also used to test the algorithmsrsquobehavior on linear problems with 01 variables

The numerical experiments were carried out on a PCIntel Core 2 Duo Processor E7500 with 29GHz and 4Gbof memory The algorithms were coded in Matlab Version800783 (R2012b)

6 Advances in Operations Research

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119887119894 such that 119894 = 2 119898 doforall 119887119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573 based on distance 10038171003817100381710038171003817119887

119894 minus 11988711989510038171003817100381710038171003817119901

Compute 119910119894 using binary positions (see (7))Discretize 119910119894 and define 119887119894 using (16)

Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 4 HBFA with pBC

41 Experimental Setting Each experimentwas conducted 30times The size of the population is made to depend on theproblemrsquos dimension and is set to 119898 = min40 2119899 Someexperiments have been carried out to tune certain parametersof the algorithms In the proposed FA with dynamic 120572 and 120574they are set as follows 120573

0= 1 119901 = 1 120572max = 05 120572min =

001 120574max = 10 and 120574min = 01 In Algorithms 2 (mCS) 3(mBS) and 4 (pBC) iterations were limited to 119896max = 500and the tolerance for finding a good quality solution is 120578 =

10minus6 Results reported are averaged (over the 30 runs) of bestfunction values number of function evaluations and numberof iterations

42 Experimental Results First we use a set of ten bench-mark nonlinear functions with different dimensions andcharacteristics For example five functions are unimodal andthe remaining multimodal [3 9 10 36] They are displayedin Table 1 Although they are widely used in continuousoptimization we now aim to converge to a 01 bit stringsolution

First we aim to compare with the results reported in[3 9 10] Due to poor results the authors in [10] donot recommend the use of ABC to solve binary-valuedproblems The other metaheuristics therein implemented arethe following

(i) angle modulated PSO (AMPSO) and angle modu-lated DE (AMDE) that incorporate a trigonometricfunction as a bit string generator into the classic PSOand DE algorithms respectively

(ii) binary DE and PSO based on the sigmoid logisticfunction and (10) denoted by binDE and binPSOrespectively

We noticed that the problems Foxholes Griewank Rosen-brock Schaffer and Step are not correctly described in[3 9 10] Table 2 shows both the averaged best functionvalues (obtained during the 30 runs) 119891avg with the StD inparentheses and the averaged number of function evalua-tions nfe obtained with the sigmoid logistic function (see in

(9)) and (10) while using the three implementations mCSmBS and pBC Results obtained for these ten functionsindicate that our proposal HBFA produces high qualitysolutions and outperforms the binary versions binPSO andbinDE as well as AMPSO and AMDE We also note thatmCS has the best ldquonferdquo values on 6 problems mBS is betteron 3 problems (one is a tie with mCS) and pBC on 2problems Thus the performance of mCS is the best whencompared with those of mBS and pBC The latter is theleast efficient of all in particular for the large dimensionalproblems

To analyze the statistical significance of the results weperform a Friedman test This is a nonparametric statisticaltest to determine significant differences in mean for oneindependent variable with two or more levelsmdashalso denotedas treatmentsmdashand a dependent variable (or matched groupstaken as the problems) The null hypothesis in this test is thatthe mean ranks assigned to the treatments under testing arethe same Since all three implementations are able to reach thesolutions within the 120578 error tolerance on 9 out of 10 problemsthe statistical analysis is based on the performance criterionldquonferdquo In this hypothesis testing we have three treatmentsand ten groups Friedmanrsquos chi-square has a value of 2737(with a 119875 value of 0255) For 2 degrees of freedom reference1205942 distribution the critical value for a significance level of5 is 599 Hence since 2737 le 599 the null hypothesisis not rejected and we conclude that there is no evidencethat the three mean ranks values have statistically significantdifferences

To further compare the sigmoid functions with therounding to integer strategy we include in Table 3 the resultsobtained by the ldquoerfrdquo function in (14) together with (10) andthe floor function in (15) Only the implementationsmCS andmBS are tested The table also shows the averaged numberof iterations nit The results illustrate that implementationmCS (Algorithm 2) works very well with strategies based on(14) together with (10) and (15) The success rate for all theproblems is 100 meaning that the algorithms stop becausethe119891 value at the position of the bestbrightest firefly is within

Advances in Operations Research 7

Table 1 Problems set

Ackley 119891 (119909) = minus20 exp(minus02radic 1

119899

119899

sum119894=1

1199092119894) minus exp(1

119899

119899

sum119894=1

cos (2120587119909119894)) + 20 + 119890

119899 = 30Ω = [minus30 30]30 119891lowast = 0 at 119909lowast = (0 0)

Foxholes119891(119909) =

1

0002 + sum25

119895=1(1 (119895 + (119909

1minus 1198861119895)6

+ (1199092minus 1198862119895)6

))

[119886119894119895] = [

minus32 minus16 0 16 32 minus32 minus16 sdot sdot sdot 16 32

minus32 minus32 minus32 minus32 minus32 minus16 minus16 sdot sdot sdot 32 32]

119899 = 2 Ω = [minus65536 65536]2 119891lowast asymp 13 at 119909lowast = (0 0)

Griewank119891 (119909) = 1 +

1

4000

119899

sum119894=1

1199092119894minus119899

prod119894=1

cos(119909119894

radic119894)

119899 = 30 Ω = [minus300 300]30 119891lowast = 0 at 119909lowast = (0 0)

Quartic119891(119909) =

119899

sum119894=1

1198941199094119894+ 119880[0 1]

119899 = 30 Ω = [minus128 128]30 119891lowast = 0 + noise at 119909lowast = (0 0)

Rastrigin119891(119909) = 10119899 +

119899

sum119894=1

(1199092119894minus 10 cos (2120587119909

119894))

119899 = 30 Ω = [minus512 512]30 119891lowast = 0 at 119909lowast = (0 0)

Rosenbrock2 119891(119909) = 100 (11990921minus 1199092)2

+ (1 minus 1199091)2

119899 = 2 Ω = [minus2048 2048]2 119891lowast = 0 at 119909lowast = (1 1)

Rosenbrock 119891(119909) =119899minus1

sum119894=1

100(1199092119894minus 119909119894+1)2 + (1 minus 119909

119894)2

119899 = 30 Ω = [minus2048 2048]30 119891lowast = 0 at 119909lowast = (1 1)

Schaffer 119891(119909) = 05 +(sin(radic1199092

1+ 11990922))2

minus 05

(1 + 0001(11990921+ 11990922))2

119899 = 2Ω = [minus100 100]2 119891lowast = 0 at 119909lowast = (0 0)

Spherical119891 (119909) =

119899

sum119894=1

1199092119894

119899 = 3 Ω = [minus512 512]3 119891lowast = 0 at 119909lowast = (0 0 0)

Step119891(119909) = 6119899 +

119899

sum119894=1

lfloor119909119894rfloor

119899 = 5 Ω = [minus512 512]5 119891lowast = 30 at 119909lowast = (0 0 0 0 0)

a tolerance 120578 of the optimal solution 119891lowast in all runs FurthermBS (Algorithm 3) works better when the discretization ofthe variables is carried out by (15) Overall mCS based on (14)produces the best results on 6 problems mCS based on (15)gives the best results on 7 problems (including 4 ties with theformer case) mBS based on (14) wins only on one problemand mBS based on (15) wins on 3 problems (all are ties withmCS based on (15))

Further when performing the Friedman test on thefour distributions of ldquonferdquo values the chi-square statisticalvalue is 13747 (and the 119875 value is 00033) From the 1205942

distribution table the critical value for a significance levelof 5 and 3 degrees of freedom is 781 Since 13747 gt 781the null hypothesis is rejected and we conclude that theobserved differences of the four distributions are statisticallysignificant

We now introduce in the statistical analysis the resultsreported in Tables 2 and 3 concerned with both implementa-tions mCS andmBS Six distributions of ldquonferdquo values are now

in comparison Friedmanrsquos chi-square value is 18175 (119875 value= 00027) The critical value of the chi-square distributionfor a significance level of 5 and 5 degrees of freedom is1107 Thus the null hypothesis of ldquono significant differenceson mean ranksrdquo is rejected and there is evidence that thesix distributions of ldquonferdquo values have statistically significantdifferences Multiple comparisons (two at a time) may becarried out to determine which mean ranks are significantlydifferent The estimates of the 95 confidence intervalsare shown in the graph of Figure 2 for each case undertesting Two compared distributions of ldquonferdquo are significantlydifferent if their intervals are disjoint and are not significantlydifferent if their intervals overlap Hence from the six caseswe conclude that the mean ranks produced by mCS basedon (15) are significantly different from those of mBS basedon (9) and mBS based on (14) For the remaining pairs ofcomparison there are no significant differences on the meanranks

8 Advances in Operations Research

Table 2 Comparison with AMPSO binPSO binDE and AMDE based on 119891avg and StD (shown in parentheses)

Prob mCS based on (9) mBS based on (9) pBC based on (9) AMPSO binPSO binDE AMDE119891avg nfe 119891avg nfe 119891avg nfe 119891avg 119891avg 119891avg 119891avg

Ackley 888119890 minus 16 80 888119890 minus 16 1156 888119890 minus 16 2168 19711989001 20111989001 17311989001 16411989001

(00011989000) (00011989000) (00011989000) (057119890 minus 01) (049119890 minus 01) (03111989001) (07611989000)

Foxholes 12711989001 61 12711989001 72 12711989001 63 053119890 minus 10 053119890 minus 10 12911989001 5011989002

(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (00011989000) (097119890 minus 14) (08611989000) (0011989000)

Griewank 00011989000 80 00011989000 1332 00011989000 2300 10611989002 67911989001 26311989002 20611989002

(00011989000) (00011989000) (00011989000) (04411989001) (09811989001) (01011989002) (03911989001)

Quartic 455119890 minus 01 2012 537119890 minus 01 1771 488119890 minus 01 2951 41511989001 20911989001 14911989000 35511989000

(301119890 minus 01) (303119890 minus 01) (271119890 minus 01) (01911989001) (01911989001) (06611989000) (08111989000)

Rastrigin 00011989000 80 00011989000 12827 00011989000 24067 22511989002 30811989002 21411989002 90511989001

(00011989000) (00011989000) (00011989000) (03511989002) (02811989001) (04511989002) (03111989002)

Rosenbrock2 00011989000 65 00011989000 57 00011989000 61 049119890 minus 04 014119890 minus 03 020119890 minus 05 055119890 minus 04

(00011989000) (00011989000) (00011989000) (011119890 minus 03) (088119890 minus 04) (015119890 minus 04) (017119890 minus 04)

Rosenbrock 00011989000 180 00011989000 21907 00011989000 2088 22011989003 22411989003 18111989003 91411989001

(00011989000) (00011989000) (00011989000) (08611989002) (07711989002) (01611989002) (04211989002)

Schaffer 00011989000 61 00011989000 8 00011989000 49 024119890 minus 01 073119890 minus 01 minus099511989000 minus1011989000

(00011989000) (00011989000) (00011989000) (042119890 minus 02) (011119890 minus 01) (027119890 minus 06) (0011989000)

Spherical 00011989000 12 00011989000 12 00011989000 117 030119890 minus 03 030119890 minus 03 015119890 minus 03 020119890 minus 04

(00011989000) (00011989000) (00011989000) (00011989000) (0011989000) (041119890 minus 04) (015119890 minus 04)

Step 30011989001 427 30011989001 427 30011989001 48 00011989000 017119890 minus 04 015119890 minus 01 02511989000

(00011989000) (00011989000) (00011989000) (00011989000) (015119890 minus 04) (0011989000) (060119890 minus 01)

0 1 2 3 4 5 6

mBS based on (15)

mCS based on (15)

mBS based on (14)

mCS based on (14)

mBS based on (9)

mCS based on (9)

mBS based on (9) and (14) have mean ranks significantly different from mCS based on (15)

Figure 2 Confidence intervals for mean ranks of nfe

For comparative purposes we include in Table 4 theresults obtained by using the proposed Levy (L) distributionin the randomization term as shown in (7) and those pro-duced by the Uniform (U) distribution using rand sim 119880[0 1]as shown in (3) The reported tests use implementation mCS(described in Algorithm 2) with the two heuristics for binaryvariables (i) the ldquoerfrdquo function in (14) together with (10) and(ii) the floor function in (15) It is shown that the performanceof HBFA with Uniform distribution is very sensitive to thedimension of the problem since the efficiency is good when119899 is small but gets worse when 119899 is largeThus we have shownthat the Levy distribution is a very good bid

We add to some problems with 119899 = 30 from Table 1mdashAckley Griewank Rastrigin Rosenbrock and Sphericalmdashthree other functions Schwefel 222 Schwefel 226 and SumofDifferent Power to compare our results with those reportedin [1] Schwefel 222 is unimodal and for Ω = [minus10 10]30the binary solution is (0 0) with 119891lowast = 0 Schwefel 226is multimodal and in Ω = [minus500 500]30 the binary solutionis (1 1 1) with 119891lowast = minus25244129544 Sum of DifferentPower is unimodal and in Ω = [minus1 1]30 the minimum is 0at (0 0) For the results of Table 5 we use HBFA basedon mCS with both ldquoerfrdquo function in (14) together with (10)and the floor function (15) The table reports on the average

Advances in Operations Research 9

Table 3 Comparison of mCS versus mBS and (14) versus (15) based on 119891avg nfe and nit

Prob mCS based on (14) mBS based on (14) mCS based on (15) mBS based on (15)119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 6787 16 888119890 minus 16 80 1 888119890 minus 16 827 11Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12911989001 4048 1002Griewank 00011989000 80 1 00011989000 7173 169 00011989000 80 1 00011989000 827 11Quartic 238119890 minus 01 813 103 466119890 minus 01 7947 189 948119890 minus 02 80 1 393119890 minus 01 80 1Rastrigin 00011989000 80 1 00011989000 7027 166 00011989000 80 1 00011989000 80 1Rosenbrock2 00011989000 64 06 00011989000 53 03 00011989000 63 06 233119890 minus 01 4708 1167Rosenbrock 00011989000 80 1 00011989000 1053 16 00011989000 80 1 29011989001 20040 500Schaffer 00011989000 68 07 00011989000 129 22 00011989000 51 03 708119890 minus 02 2051 503Spherical 00011989000 99 02 00011989000 227 18 00011989000 101 03 00011989000 115 04Step 30011989001 459 04 30011989001 629 1 30011989001 405 03 30011989001 405 03

Table 4 Comparison between Levy and Uniform distributions in the randomization term based on 119891avg nfe and nit (with StD inparentheses)

Prob mCS based on (14) + L mCS based on (14) + U mCS based on (15) + L mCS based on (15) + U119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 1096 264 888119890 minus 16 80 1 141e00 20040 500(00011989000) (00011989000) (00011989000) (126119890 minus 02)

Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12711989001 68 07(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (903119890 minus 15)

Griewank 00011989000 80 1 00011989000 2436 599 00011989000 80 1 127119890 minus 01 20040 500(00011989000) (00011989000) (00011989000) (276119890 minus 02)

Quartic 238119890 minus 01 813 103 69011989000 14692 3662 948119890 minus 02 80 1 510119890 minus 01 10581 2635(170119890 minus 01) (11611989001) (103119890 minus 01) (290119890 minus 01)

Rastrigin 00011989000 80 1 00011989000 1157 279 00011989000 80 1 100119890 minus 01 18104 4516(00011989000) (00011989000) (00011989000) (403119890 minus 01)

Rosenbrock2 00011989000 64 06 00011989000 368 82 00011989000 63 06 00011989000 59 05(00011989000) (00011989000) (00011989000) (00011989000)

Rosenbrock 00011989000 80 1 82211989001 14136 3524 00011989000 80 1 74211989001 17698 4412(00011989000) (10211989002) (00011989000) (84311989001)

Schaffer 00011989000 68 07 00011989000 185 36 00011989000 51 03 00011989000 56 04(00011989000) (00011989000) (00011989000) (00011989000)

Spherical 00011989000 99 02 00011989000 133 07 00011989000 101 03 00011989000 147 08(00011989000) (00011989000) (00011989000) (00011989000)

Step 30011989001 459 04 30011989001 469 05 30011989001 405 03 30011989001 523 06(00011989000) (00011989000) (00011989000) (00011989000)

Table 5 Comparison of HBFA (with mCS) with ABHS in [1] based on 119891avg nfe and SR ()

Prob mCS based on (14) mCS based on (15) ABHS in [1]119891avg nfe SR () 119891avg nfe SR () 119891avg nfe SR ()

Ackley 888119890 minus 16 80 100 888119890 minus 16 80 100 156119890 minus 01 62350 90

Griewank 00011989000 80 100 00011989000 80 100 330119890 minus 02 79758 38

Rastrigin 00011989000 80 100 00011989000 80 100 13211989001 90000 0

Rosenbrock 00011989000 80 100 00011989000 80 100 68011989002 90000 0

Schwefel 222 00011989000 80 100 00011989000 80 100 00011989000 59870 100

Schwefel 226 minus25211989001 80 100 minus24711989001 10867 87 minus119511989004 90000 0

Spherical 00011989000 80 100 00011989000 80 100 00011989000 62234 100

Sum of Different Power 00011989000 91 100 00011989000 168 100 00011989000 80371 100

10 Advances in Operations Research

Table 6 Results for varied dimensions (119899 = 50 100 200) considering119898 = 40

119891lowast 119899mCS based on (14) mCS based on (15)

119891avg StD nfe nit 119891avg StD nfe nit

Ackley00011989000 50 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 100 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 200 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

Griewank00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Quartic00011989000 + noise 50 224119890 minus 01 195119890 minus 01 827 11 143119890 minus 01 159119890 minus 01 80 1

00011989000 + noise 100 432119890 minus 01 273119890 minus 01 1467 27 173119890 minus 01 110119890 minus 01 80 1

00011989000 + noise 200 523119890 minus 01 294119890 minus 01 17387 425 196119890 minus 01 213119890 minus 01 813 103

Rosenbrock00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Spherical00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Step30011989002 50 30011989002 00011989000 80 1 30011989002 00011989000 80 1

60011989002 100 60011989002 00011989000 80 1 60011989002 00011989000 80 1

12011989003 200 12011989003 00011989000 80 1 12011989003 00011989000 80 1

function values average number of function evaluations andsuccess rate (SR) Here 50 independent runs were carriedout to compare with the results shown in [1] The maximumnumber of function evaluations therein used was 90000 Itis shown that our HBFA outperforms the proposed adaptivebinary harmony search (ABHS)

43 Effect of Problemrsquos Dimension on HBFA Performance Wenow consider six problems with varied dimensions from theprevious set to analyze the effect of problemrsquos dimension onthe HBFA performance We test three dimensions 119899 = 50119899 = 100 and 119899 = 200 The algorithmrsquos parameters areset as previously defined We remark that the size of thepopulation for all the tested problems and dimensions is 40points

Table 6 contains the results for comparison based onaveraged values of 119891 number of function evaluationsand number of iterations The ldquoStDrdquo of the 119891 values arealso displayed Since the implementation mCS shown inAlgorithm 2 performs better and shows more consistentresults than the other two we tested only mCS based on (14)and mCS based on (15)

Besides testing significant differences on the mean ranksproduced by the two treatments mCS based on (14) andmCSbased on (15) we also want to determine if the differences onmean ranks produced by problemrsquos dimensionmdash50 100 and200mdashare statistically significant at a significance level of 5Hence we aim to analyze the effects of two factors ldquoArdquo andldquoBrdquo ldquoArdquo is the HBFA implementation (with two levels) andldquoBrdquo is the problemrsquos dimension (with three levels) For thispurpose the results obtained for the six problems for each

combination of the levels of ldquoArdquo and ldquoBrdquo are considered asreplications When performing the Friedman test for factorldquoArdquo the chi-square statistical value is 1225 (119875 value = 02685)with 1 degree of freedom The critical value for a significancelevel of 5 and 1 degree of freedom in the 1205942 distributiontable is 384 and there is no evidence of statistically significantdifferences From the Friedman test for factor ldquoBrdquo we alsoconclude that there is no evidence of statistically significantdifferences since the chi-square statistical value is 0746 (119875value = 06886) with 2 degrees of freedom (The critical valueof the 1205942 distribution table for a significance level of 5 and2 degrees of freedom is 599) Hence we conclude that thedimension of the problem does not affect the algorithmrsquos per-formance Only with problem Quartic the efficiency of mCSbased on (14) getsworse as dimension increasesOverall bothtested strategies are rather effective when binary solutions arerequired on small as well as on large nonlinear optimizationproblems

44 Solving 0-1 Knapsack Problems Finally we aim to analyzethe behavior of our best tested strategies when solvingwell-known binary and linear optimization problems Forthis preliminary experiment we selected two small knap-sack problems The 0-1 knapsack problem (KP) can bedescribed as follows Let 119899 be the number of items fromwhich we have to select some of them to be carried in aknapsack Let 119908

119897and V

119897be the weight and the value of

item 119897 respectively and let 119882 be the knapsackrsquos capac-ity It is usually assumed that all weights and values arenonnegative The objective is to maximize the total value

Advances in Operations Research 11

of the knapsack under the constraint of the knapsackrsquoscapacity

max119909

119881 (119909) equiv119899

sum119897=1

V119897119909119897

st119899

sum119897=1

119908119897119909119897le 119882 119909

119897isin 0 1 119897 = 1 119899

(17)

If item 119897 is selected 119909119897= 1 otherwise 119909

119897= 0 Using a penalty

function this problem can be transformed into

min119909

minus119899

sum119897=1

V119897119909119897+ 120583max0

119899

sum119897=1

119908119897119909119897minus119882 (18)

where 120583 is the penalty parameter which was set to be 100 inthis experiment

Case 1 (an instance of a 0-1 KP with 4 items) Knapsackrsquoscapacity is 119882 = 6 and the vectors of values and weights areV = (40 15 20 10) and 119908 = (4 2 3 1) Based on the above-mentioned parameters the HBFA with mCS based on (14)was run 30 times and the averaged results were the followingWith a success rate of 100 items 1 and 2 are included in theknapsack and items 3 and 4 are excluded with a maximumvalue of 55 (StD = 00e00) On average the runs required08 iterations and 293 function evaluations With a successrate of 23 the heuristic based on the floor function thusmCS based on (15) reached 119891avg = 49 (StD = 40e00) afteran average of 61611 function evaluations and an average of3841 iterations

Case 2 (an instance of a 0-1 KP with 8 items) The maximumcapacity of the knapsack is set to 8 and the vectors ofvalues and weights are V = (83 14 54 79 72 52 48 62) and119908 = (3 2 3 2 1 2 2 3) The results are averaged over the 30runs After 87 iterations and 3867 function evaluations themaximum value produced by the strategy mCS based on (14)is 286 (StD = 00e00) with a success rate of 100 Items 14 5 and 6 are included in the knapsack and the others areexcluded The heuristic mCS based on (15) did not reach theoptimal solution All runs required 500 iterations and 20040function evaluations and the average function values were119891avg = 227 with StD = 314e01

5 Conclusions and Future Work

In this work we have implemented several heuristics tocompute a global optimal binary solution of bound con-strained nonlinear optimization problems which have beenincorporated into FA yielding the herein called HBFA Theproblems addressed in this study have bounded continu-ous search space Our FA proposal uses dynamic updatingschemes for two parameters 120574 from the attractiveness termand 120572 from the randomization term and considers the Levydistribution to create randomness in firefly movement Theperformance behavior of the proposed heuristics has beeninvestigated Three simple heuristics capable of transformingreal continuous variables into binary ones are implemented

A new sigmoid ldquoerfrdquo function is proposed In the context ofthe firefly algorithm three different implementations aimingto incorporate the heuristics for binary variables into FAare proposed (mCS mBS and pBC) Based on a set ofbenchmark problems a comparison is carried out with otherbinary dealing metaheuristics namely AMPSO binPSObinDE and AMDE The experimental results show that theimplementation denoted bymCSwhen combined with eitherthe new sigmoid ldquoerfrdquo function or the rounding schemebased on the floor function is quite efficient and superiorto the other methods in comparison The statistical analysiscarried out on the results shows evidence of statisticallysignificant differences on efficiency measured by the numberof function evaluations between the implementation mCSbased on the floor function approach and the mBS basedon both tested sigmoid functions schemes We have alsoinvestigated the effect of problemrsquos dimension on the perfor-mance of our algorithmUsing the Friedman statistical testweconclude that the differences on efficiency are not statisticallysignificant Another simple experiment has shown that theimplementation mCS with the sigmoid ldquoerfrdquo function iseffective in solving two small 0-1 KPThe performance of thissimple heuristic strategy will be further analyzed to solvelarge and multidimensional 0-1 KP Future developmentsconcerning the HBFA will consider its extension to dealwith integer variables in nonlinear optimization problemsDifferent heuristics to transform continuous real variablesinto integer variableswill be investigated Challengingmixed-integer nonconvex nonlinear problems will be solved

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors wish to thank two anonymous referees fortheir valuable suggestions to improve the paper This workhas been supported by FCT (Fundacao para a Ciencia eTecnologia Portugal) in the scope of the Projects PEst-OEMATUI00132014 and PEst-OEEEIUI03192014

References

[1] L Wang R Yang Y Xu Q Niu P M Pardalos and MFei ldquoAn improved adaptive binary harmony search algorithmrdquoInformation Sciences vol 232 pp 58ndash87 2013

[2] M A K Azad A M A C Rocha and E M G P FernandesldquoImproved binary artificial fish swarm algorithm for the 0-1multidimensional knapsack problemsrdquo Swarm and Evolution-ary Computation vol 14 pp 66ndash75 2014

[3] A P Engelbrecht andG Pampara ldquoBinary differential evolutionstrategiesrdquo in Proceedings of the IEEE Congress on EvolutionaryComputation (CEC rsquo07) pp 1942ndash1947 September 2007

[4] M H Kashan N Nahavandi and A H Kashan ldquoDisABC anew artificial bee colony algorithm for binary optimizationrdquoApplied Soft Computing Journal vol 12 no 1 pp 342ndash352 2012

12 Advances in Operations Research

[5] M H Kashan A H Kashan and N Nahavandi ldquoA noveldifferential evolution algorithm for binary optimizationrdquo Com-putational Optimization and Applications vol 55 no 2 pp 481ndash513 2013

[6] J Kennedy and R C Eberhart ldquoA discrete binary versionof the particle swarm algorithmrdquo in Proceedings of the IEEEInternational Conference on Systems Man and Cybernetics vol5 pp 4104ndash4108 Orlando Fla USA October 1997

[7] T Liu L Zhang and J Zhang ldquoStudy of binary artificialbee colony algorithm based on particle swarm optimizationrdquoJournal of Computational Information Systems vol 9 no 16 pp6459ndash6466 2013

[8] S Mirjalili and A Lewis ldquoS-shaped versus V-shaped transferfunctions for binary particle swarm optimizationrdquo Swarm andEvolutionary Computation vol 9 pp 1ndash14 2013

[9] G Pampara A P Engelbrecht and N Franken ldquoBinarydifferential evolutionrdquo in Proceedings of the IEEE Congress onEvolutionary Computation (CEC rsquo06) pp 1873ndash1879 VancouverCanada July 2006

[10] G Pampara and A P Engelbrecht ldquoBinary artificial bee colonyoptimizationrdquo in Proceedings of the IEEE Symposium on SwarmIntelligence (SIS rsquo11) pp 1ndash8 IEEE Perth April 2011

[11] S Burer and A N Letchford ldquoNon-convex mixed-integer non-linear programming a surveyrdquo Surveys in Operations Researchand Management Science vol 17 no 2 pp 97ndash106 2012

[12] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Proceedings of the Stochastic Algorithms Foundations andApplications (SAGA rsquo09) O Watanabe and T Zeugmann Edsvol 5792 of Lecture Notes in Computer Science pp 169ndash1782009

[13] X-S Yang ldquoFirefly algorithm stochastic test functions anddesign optimizationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[14] I Fister Jr X-S Yang and J Brest ldquoA comprehensive review offirefly algorithmsrdquo Swarm and Evolutionary Computation vol13 pp 34ndash46 2013

[15] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[16] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoA Gaussian firefly algorithmrdquo International Journal of MachineLearning and Computing vol 1 no 5 pp 448ndash453 2011

[17] L Guo G-G Wang H Wang and D Wang ldquoAn effectivehybrid firefly algorithmwith harmony search for global numer-ical optimizationrdquoTheScientificWorld Journal vol 2013 ArticleID 125625 9 pages 2013

[18] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoSome hybrid models to improve firefly algorithm perfor-mancerdquo International Journal of Artificial Intelligence vol 8 no12 pp 97ndash117 2012

[19] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 467631 12pages 2012

[20] X Lin Y Zhong and H Zhang ldquoAn enhanced firefly algorithmfor function optimisation problemsrdquo International Journal ofModelling Identification and Control vol 18 no 2 pp 166ndash1732013

[21] A Manju and M J Nigam ldquoFirefly algorithm with fireflieshaving quantum behaviorrdquo in Proceedings of the InternationalConference on Radar Communication and Computing (ICRCCrsquo12) pp 117ndash119 IEEE Tiruvannamalai India December 2012

[22] X-S Yang and X He ldquoFirefly algorithm recent advances andapplicationsrdquo International Journal of Swarm Intelligence vol 1no 1 pp 36ndash50 2013

[23] S Arora and S Singh ldquoThe firefly optimization algorithmconvergence analysis and parameter selectionrdquo InternationalJournal of Computer Applications vol 69 no 3 pp 48ndash52 2013

[24] X-S Yang S S S Hosseini and A H Gandomi ldquoFireflyalgorithm for solving non-convex economic dispatch problemswith valve loading effectrdquo Applied Soft Computing Journal vol12 no 3 pp 1180ndash1186 2012

[25] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using firefly algorithmrdquo Computers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[26] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering with Computers vol 29 no 2 pp175ndash184 2013

[27] A N Kumbharana and G M Pandey ldquoSolving travellingsalesman problemusing firefly algorithmrdquo International Journalfor Research in ScienceampAdvanced Technologies vol 2 no 2 pp53ndash57 2013

[28] M K Sayadi A Hafezalkotob and S G J Naini ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[29] X-S Yang ldquoFirefly algorithmrdquo inNature-InspiredMetaheuristicAlgorithms pp 81ndash96 Luniver Press University of CambridgeCambridge UK 2nd edition 2010

[30] A R Jordehi and J Jasni ldquoParameter selection in particle swarmoptimisation a surveyrdquo Journal of Experimental amp TheoreticalArtificial Intelligence vol 25 no 4 pp 527ndash542 2013

[31] M Mahdavi M Fesanghary and E Damangir ldquoAn improvedharmony search algorithm for solving optimization problemsrdquoAppliedMathematics and Computation vol 188 no 2 pp 1567ndash1579 2007

[32] M Padberg ldquoHarmony search algorithms for binary optimiza-tion problemsrdquo in Operations Research Proceedings 2011 pp343ndash348 Springer Berlin Germany 2012

[33] M A K Azad A M A C Rocha and E M G P FernandesldquoA simplified binary artificial fish swarm algorithm for unca-pacitated facility location problemsrdquo in Proceedings of WorldCongress on Engineering S I Ao L Gelman D W L HukinsA Hunter and A M Korsunsky Eds vol 1 pp 31ndash36 IAENGLondon UK 2013

[34] M Sevkli and A R Guner ldquoA continuous particle swarm opti-mization algorithm for uncapacitated facility location problemrdquoin Ant Colony Optimization and Swarm Intelligence M DorigoL M Gambardella M Birattari A Martinoli R Poli and TStutzle Eds vol 4150 of Lecture Notes in Computer Sciencespp 316ndash323 Springer 2006

[35] L Wang and C Singh ldquoUnit commitment considering genera-tor outages through a mixed-integer particle swarm optimiza-tion algorithmrdquoApplied SoftComputing Journal vol 9 no 3 pp947ndash953 2009

[36] MM Ali C Khompatraporn and Z B Zabinsky ldquoA numericalevaluation of several stochastic algorithms on selected con-tinuous global optimization test problemsrdquo Journal of GlobalOptimization vol 31 no 4 pp 635ndash672 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 6: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

6 Advances in Operations Research

Data 119896max 119891lowast 120578

Set 119896 = 0Randomly generate 119909119894 isin Ω 119894 = 1 119898Discretize position of firefly 119894 119909119894 rarr 119887119894 119894 = 1 119898Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)while 119896 le 119896max and 1003816100381610038161003816119891(119887

1) minus 119891lowast1003816100381610038161003816 gt 120578 do

forall 119887119894 such that 119894 = 2 119898 doforall 119887119895 such that 119895 = 1 119894 minus 1 do

Compute randomization termCompute attractiveness 120573 based on distance 10038171003817100381710038171003817119887

119894 minus 11988711989510038171003817100381710038171003817119901

Compute 119910119894 using binary positions (see (7))Discretize 119910119894 and define 119887119894 using (16)

Compute 119891(119887119894) 119894 = 1 119898 rank fireflies (from lowest to largest 119891)Set 119896 = 119896 + 1

Algorithm 4 HBFA with pBC

41 Experimental Setting Each experimentwas conducted 30times The size of the population is made to depend on theproblemrsquos dimension and is set to 119898 = min40 2119899 Someexperiments have been carried out to tune certain parametersof the algorithms In the proposed FA with dynamic 120572 and 120574they are set as follows 120573

0= 1 119901 = 1 120572max = 05 120572min =

001 120574max = 10 and 120574min = 01 In Algorithms 2 (mCS) 3(mBS) and 4 (pBC) iterations were limited to 119896max = 500and the tolerance for finding a good quality solution is 120578 =

10minus6 Results reported are averaged (over the 30 runs) of bestfunction values number of function evaluations and numberof iterations

42 Experimental Results First we use a set of ten bench-mark nonlinear functions with different dimensions andcharacteristics For example five functions are unimodal andthe remaining multimodal [3 9 10 36] They are displayedin Table 1 Although they are widely used in continuousoptimization we now aim to converge to a 01 bit stringsolution

First we aim to compare with the results reported in[3 9 10] Due to poor results the authors in [10] donot recommend the use of ABC to solve binary-valuedproblems The other metaheuristics therein implemented arethe following

(i) angle modulated PSO (AMPSO) and angle modu-lated DE (AMDE) that incorporate a trigonometricfunction as a bit string generator into the classic PSOand DE algorithms respectively

(ii) binary DE and PSO based on the sigmoid logisticfunction and (10) denoted by binDE and binPSOrespectively

We noticed that the problems Foxholes Griewank Rosen-brock Schaffer and Step are not correctly described in[3 9 10] Table 2 shows both the averaged best functionvalues (obtained during the 30 runs) 119891avg with the StD inparentheses and the averaged number of function evalua-tions nfe obtained with the sigmoid logistic function (see in

(9)) and (10) while using the three implementations mCSmBS and pBC Results obtained for these ten functionsindicate that our proposal HBFA produces high qualitysolutions and outperforms the binary versions binPSO andbinDE as well as AMPSO and AMDE We also note thatmCS has the best ldquonferdquo values on 6 problems mBS is betteron 3 problems (one is a tie with mCS) and pBC on 2problems Thus the performance of mCS is the best whencompared with those of mBS and pBC The latter is theleast efficient of all in particular for the large dimensionalproblems

To analyze the statistical significance of the results weperform a Friedman test This is a nonparametric statisticaltest to determine significant differences in mean for oneindependent variable with two or more levelsmdashalso denotedas treatmentsmdashand a dependent variable (or matched groupstaken as the problems) The null hypothesis in this test is thatthe mean ranks assigned to the treatments under testing arethe same Since all three implementations are able to reach thesolutions within the 120578 error tolerance on 9 out of 10 problemsthe statistical analysis is based on the performance criterionldquonferdquo In this hypothesis testing we have three treatmentsand ten groups Friedmanrsquos chi-square has a value of 2737(with a 119875 value of 0255) For 2 degrees of freedom reference1205942 distribution the critical value for a significance level of5 is 599 Hence since 2737 le 599 the null hypothesisis not rejected and we conclude that there is no evidencethat the three mean ranks values have statistically significantdifferences

To further compare the sigmoid functions with therounding to integer strategy we include in Table 3 the resultsobtained by the ldquoerfrdquo function in (14) together with (10) andthe floor function in (15) Only the implementationsmCS andmBS are tested The table also shows the averaged numberof iterations nit The results illustrate that implementationmCS (Algorithm 2) works very well with strategies based on(14) together with (10) and (15) The success rate for all theproblems is 100 meaning that the algorithms stop becausethe119891 value at the position of the bestbrightest firefly is within

Advances in Operations Research 7

Table 1 Problems set

Ackley 119891 (119909) = minus20 exp(minus02radic 1

119899

119899

sum119894=1

1199092119894) minus exp(1

119899

119899

sum119894=1

cos (2120587119909119894)) + 20 + 119890

119899 = 30Ω = [minus30 30]30 119891lowast = 0 at 119909lowast = (0 0)

Foxholes119891(119909) =

1

0002 + sum25

119895=1(1 (119895 + (119909

1minus 1198861119895)6

+ (1199092minus 1198862119895)6

))

[119886119894119895] = [

minus32 minus16 0 16 32 minus32 minus16 sdot sdot sdot 16 32

minus32 minus32 minus32 minus32 minus32 minus16 minus16 sdot sdot sdot 32 32]

119899 = 2 Ω = [minus65536 65536]2 119891lowast asymp 13 at 119909lowast = (0 0)

Griewank119891 (119909) = 1 +

1

4000

119899

sum119894=1

1199092119894minus119899

prod119894=1

cos(119909119894

radic119894)

119899 = 30 Ω = [minus300 300]30 119891lowast = 0 at 119909lowast = (0 0)

Quartic119891(119909) =

119899

sum119894=1

1198941199094119894+ 119880[0 1]

119899 = 30 Ω = [minus128 128]30 119891lowast = 0 + noise at 119909lowast = (0 0)

Rastrigin119891(119909) = 10119899 +

119899

sum119894=1

(1199092119894minus 10 cos (2120587119909

119894))

119899 = 30 Ω = [minus512 512]30 119891lowast = 0 at 119909lowast = (0 0)

Rosenbrock2 119891(119909) = 100 (11990921minus 1199092)2

+ (1 minus 1199091)2

119899 = 2 Ω = [minus2048 2048]2 119891lowast = 0 at 119909lowast = (1 1)

Rosenbrock 119891(119909) =119899minus1

sum119894=1

100(1199092119894minus 119909119894+1)2 + (1 minus 119909

119894)2

119899 = 30 Ω = [minus2048 2048]30 119891lowast = 0 at 119909lowast = (1 1)

Schaffer 119891(119909) = 05 +(sin(radic1199092

1+ 11990922))2

minus 05

(1 + 0001(11990921+ 11990922))2

119899 = 2Ω = [minus100 100]2 119891lowast = 0 at 119909lowast = (0 0)

Spherical119891 (119909) =

119899

sum119894=1

1199092119894

119899 = 3 Ω = [minus512 512]3 119891lowast = 0 at 119909lowast = (0 0 0)

Step119891(119909) = 6119899 +

119899

sum119894=1

lfloor119909119894rfloor

119899 = 5 Ω = [minus512 512]5 119891lowast = 30 at 119909lowast = (0 0 0 0 0)

a tolerance 120578 of the optimal solution 119891lowast in all runs FurthermBS (Algorithm 3) works better when the discretization ofthe variables is carried out by (15) Overall mCS based on (14)produces the best results on 6 problems mCS based on (15)gives the best results on 7 problems (including 4 ties with theformer case) mBS based on (14) wins only on one problemand mBS based on (15) wins on 3 problems (all are ties withmCS based on (15))

Further when performing the Friedman test on thefour distributions of ldquonferdquo values the chi-square statisticalvalue is 13747 (and the 119875 value is 00033) From the 1205942

distribution table the critical value for a significance levelof 5 and 3 degrees of freedom is 781 Since 13747 gt 781the null hypothesis is rejected and we conclude that theobserved differences of the four distributions are statisticallysignificant

We now introduce in the statistical analysis the resultsreported in Tables 2 and 3 concerned with both implementa-tions mCS andmBS Six distributions of ldquonferdquo values are now

in comparison Friedmanrsquos chi-square value is 18175 (119875 value= 00027) The critical value of the chi-square distributionfor a significance level of 5 and 5 degrees of freedom is1107 Thus the null hypothesis of ldquono significant differenceson mean ranksrdquo is rejected and there is evidence that thesix distributions of ldquonferdquo values have statistically significantdifferences Multiple comparisons (two at a time) may becarried out to determine which mean ranks are significantlydifferent The estimates of the 95 confidence intervalsare shown in the graph of Figure 2 for each case undertesting Two compared distributions of ldquonferdquo are significantlydifferent if their intervals are disjoint and are not significantlydifferent if their intervals overlap Hence from the six caseswe conclude that the mean ranks produced by mCS basedon (15) are significantly different from those of mBS basedon (9) and mBS based on (14) For the remaining pairs ofcomparison there are no significant differences on the meanranks

8 Advances in Operations Research

Table 2 Comparison with AMPSO binPSO binDE and AMDE based on 119891avg and StD (shown in parentheses)

Prob mCS based on (9) mBS based on (9) pBC based on (9) AMPSO binPSO binDE AMDE119891avg nfe 119891avg nfe 119891avg nfe 119891avg 119891avg 119891avg 119891avg

Ackley 888119890 minus 16 80 888119890 minus 16 1156 888119890 minus 16 2168 19711989001 20111989001 17311989001 16411989001

(00011989000) (00011989000) (00011989000) (057119890 minus 01) (049119890 minus 01) (03111989001) (07611989000)

Foxholes 12711989001 61 12711989001 72 12711989001 63 053119890 minus 10 053119890 minus 10 12911989001 5011989002

(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (00011989000) (097119890 minus 14) (08611989000) (0011989000)

Griewank 00011989000 80 00011989000 1332 00011989000 2300 10611989002 67911989001 26311989002 20611989002

(00011989000) (00011989000) (00011989000) (04411989001) (09811989001) (01011989002) (03911989001)

Quartic 455119890 minus 01 2012 537119890 minus 01 1771 488119890 minus 01 2951 41511989001 20911989001 14911989000 35511989000

(301119890 minus 01) (303119890 minus 01) (271119890 minus 01) (01911989001) (01911989001) (06611989000) (08111989000)

Rastrigin 00011989000 80 00011989000 12827 00011989000 24067 22511989002 30811989002 21411989002 90511989001

(00011989000) (00011989000) (00011989000) (03511989002) (02811989001) (04511989002) (03111989002)

Rosenbrock2 00011989000 65 00011989000 57 00011989000 61 049119890 minus 04 014119890 minus 03 020119890 minus 05 055119890 minus 04

(00011989000) (00011989000) (00011989000) (011119890 minus 03) (088119890 minus 04) (015119890 minus 04) (017119890 minus 04)

Rosenbrock 00011989000 180 00011989000 21907 00011989000 2088 22011989003 22411989003 18111989003 91411989001

(00011989000) (00011989000) (00011989000) (08611989002) (07711989002) (01611989002) (04211989002)

Schaffer 00011989000 61 00011989000 8 00011989000 49 024119890 minus 01 073119890 minus 01 minus099511989000 minus1011989000

(00011989000) (00011989000) (00011989000) (042119890 minus 02) (011119890 minus 01) (027119890 minus 06) (0011989000)

Spherical 00011989000 12 00011989000 12 00011989000 117 030119890 minus 03 030119890 minus 03 015119890 minus 03 020119890 minus 04

(00011989000) (00011989000) (00011989000) (00011989000) (0011989000) (041119890 minus 04) (015119890 minus 04)

Step 30011989001 427 30011989001 427 30011989001 48 00011989000 017119890 minus 04 015119890 minus 01 02511989000

(00011989000) (00011989000) (00011989000) (00011989000) (015119890 minus 04) (0011989000) (060119890 minus 01)

0 1 2 3 4 5 6

mBS based on (15)

mCS based on (15)

mBS based on (14)

mCS based on (14)

mBS based on (9)

mCS based on (9)

mBS based on (9) and (14) have mean ranks significantly different from mCS based on (15)

Figure 2 Confidence intervals for mean ranks of nfe

For comparative purposes we include in Table 4 theresults obtained by using the proposed Levy (L) distributionin the randomization term as shown in (7) and those pro-duced by the Uniform (U) distribution using rand sim 119880[0 1]as shown in (3) The reported tests use implementation mCS(described in Algorithm 2) with the two heuristics for binaryvariables (i) the ldquoerfrdquo function in (14) together with (10) and(ii) the floor function in (15) It is shown that the performanceof HBFA with Uniform distribution is very sensitive to thedimension of the problem since the efficiency is good when119899 is small but gets worse when 119899 is largeThus we have shownthat the Levy distribution is a very good bid

We add to some problems with 119899 = 30 from Table 1mdashAckley Griewank Rastrigin Rosenbrock and Sphericalmdashthree other functions Schwefel 222 Schwefel 226 and SumofDifferent Power to compare our results with those reportedin [1] Schwefel 222 is unimodal and for Ω = [minus10 10]30the binary solution is (0 0) with 119891lowast = 0 Schwefel 226is multimodal and in Ω = [minus500 500]30 the binary solutionis (1 1 1) with 119891lowast = minus25244129544 Sum of DifferentPower is unimodal and in Ω = [minus1 1]30 the minimum is 0at (0 0) For the results of Table 5 we use HBFA basedon mCS with both ldquoerfrdquo function in (14) together with (10)and the floor function (15) The table reports on the average

Advances in Operations Research 9

Table 3 Comparison of mCS versus mBS and (14) versus (15) based on 119891avg nfe and nit

Prob mCS based on (14) mBS based on (14) mCS based on (15) mBS based on (15)119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 6787 16 888119890 minus 16 80 1 888119890 minus 16 827 11Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12911989001 4048 1002Griewank 00011989000 80 1 00011989000 7173 169 00011989000 80 1 00011989000 827 11Quartic 238119890 minus 01 813 103 466119890 minus 01 7947 189 948119890 minus 02 80 1 393119890 minus 01 80 1Rastrigin 00011989000 80 1 00011989000 7027 166 00011989000 80 1 00011989000 80 1Rosenbrock2 00011989000 64 06 00011989000 53 03 00011989000 63 06 233119890 minus 01 4708 1167Rosenbrock 00011989000 80 1 00011989000 1053 16 00011989000 80 1 29011989001 20040 500Schaffer 00011989000 68 07 00011989000 129 22 00011989000 51 03 708119890 minus 02 2051 503Spherical 00011989000 99 02 00011989000 227 18 00011989000 101 03 00011989000 115 04Step 30011989001 459 04 30011989001 629 1 30011989001 405 03 30011989001 405 03

Table 4 Comparison between Levy and Uniform distributions in the randomization term based on 119891avg nfe and nit (with StD inparentheses)

Prob mCS based on (14) + L mCS based on (14) + U mCS based on (15) + L mCS based on (15) + U119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 1096 264 888119890 minus 16 80 1 141e00 20040 500(00011989000) (00011989000) (00011989000) (126119890 minus 02)

Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12711989001 68 07(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (903119890 minus 15)

Griewank 00011989000 80 1 00011989000 2436 599 00011989000 80 1 127119890 minus 01 20040 500(00011989000) (00011989000) (00011989000) (276119890 minus 02)

Quartic 238119890 minus 01 813 103 69011989000 14692 3662 948119890 minus 02 80 1 510119890 minus 01 10581 2635(170119890 minus 01) (11611989001) (103119890 minus 01) (290119890 minus 01)

Rastrigin 00011989000 80 1 00011989000 1157 279 00011989000 80 1 100119890 minus 01 18104 4516(00011989000) (00011989000) (00011989000) (403119890 minus 01)

Rosenbrock2 00011989000 64 06 00011989000 368 82 00011989000 63 06 00011989000 59 05(00011989000) (00011989000) (00011989000) (00011989000)

Rosenbrock 00011989000 80 1 82211989001 14136 3524 00011989000 80 1 74211989001 17698 4412(00011989000) (10211989002) (00011989000) (84311989001)

Schaffer 00011989000 68 07 00011989000 185 36 00011989000 51 03 00011989000 56 04(00011989000) (00011989000) (00011989000) (00011989000)

Spherical 00011989000 99 02 00011989000 133 07 00011989000 101 03 00011989000 147 08(00011989000) (00011989000) (00011989000) (00011989000)

Step 30011989001 459 04 30011989001 469 05 30011989001 405 03 30011989001 523 06(00011989000) (00011989000) (00011989000) (00011989000)

Table 5 Comparison of HBFA (with mCS) with ABHS in [1] based on 119891avg nfe and SR ()

Prob mCS based on (14) mCS based on (15) ABHS in [1]119891avg nfe SR () 119891avg nfe SR () 119891avg nfe SR ()

Ackley 888119890 minus 16 80 100 888119890 minus 16 80 100 156119890 minus 01 62350 90

Griewank 00011989000 80 100 00011989000 80 100 330119890 minus 02 79758 38

Rastrigin 00011989000 80 100 00011989000 80 100 13211989001 90000 0

Rosenbrock 00011989000 80 100 00011989000 80 100 68011989002 90000 0

Schwefel 222 00011989000 80 100 00011989000 80 100 00011989000 59870 100

Schwefel 226 minus25211989001 80 100 minus24711989001 10867 87 minus119511989004 90000 0

Spherical 00011989000 80 100 00011989000 80 100 00011989000 62234 100

Sum of Different Power 00011989000 91 100 00011989000 168 100 00011989000 80371 100

10 Advances in Operations Research

Table 6 Results for varied dimensions (119899 = 50 100 200) considering119898 = 40

119891lowast 119899mCS based on (14) mCS based on (15)

119891avg StD nfe nit 119891avg StD nfe nit

Ackley00011989000 50 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 100 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 200 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

Griewank00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Quartic00011989000 + noise 50 224119890 minus 01 195119890 minus 01 827 11 143119890 minus 01 159119890 minus 01 80 1

00011989000 + noise 100 432119890 minus 01 273119890 minus 01 1467 27 173119890 minus 01 110119890 minus 01 80 1

00011989000 + noise 200 523119890 minus 01 294119890 minus 01 17387 425 196119890 minus 01 213119890 minus 01 813 103

Rosenbrock00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Spherical00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Step30011989002 50 30011989002 00011989000 80 1 30011989002 00011989000 80 1

60011989002 100 60011989002 00011989000 80 1 60011989002 00011989000 80 1

12011989003 200 12011989003 00011989000 80 1 12011989003 00011989000 80 1

function values average number of function evaluations andsuccess rate (SR) Here 50 independent runs were carriedout to compare with the results shown in [1] The maximumnumber of function evaluations therein used was 90000 Itis shown that our HBFA outperforms the proposed adaptivebinary harmony search (ABHS)

43 Effect of Problemrsquos Dimension on HBFA Performance Wenow consider six problems with varied dimensions from theprevious set to analyze the effect of problemrsquos dimension onthe HBFA performance We test three dimensions 119899 = 50119899 = 100 and 119899 = 200 The algorithmrsquos parameters areset as previously defined We remark that the size of thepopulation for all the tested problems and dimensions is 40points

Table 6 contains the results for comparison based onaveraged values of 119891 number of function evaluationsand number of iterations The ldquoStDrdquo of the 119891 values arealso displayed Since the implementation mCS shown inAlgorithm 2 performs better and shows more consistentresults than the other two we tested only mCS based on (14)and mCS based on (15)

Besides testing significant differences on the mean ranksproduced by the two treatments mCS based on (14) andmCSbased on (15) we also want to determine if the differences onmean ranks produced by problemrsquos dimensionmdash50 100 and200mdashare statistically significant at a significance level of 5Hence we aim to analyze the effects of two factors ldquoArdquo andldquoBrdquo ldquoArdquo is the HBFA implementation (with two levels) andldquoBrdquo is the problemrsquos dimension (with three levels) For thispurpose the results obtained for the six problems for each

combination of the levels of ldquoArdquo and ldquoBrdquo are considered asreplications When performing the Friedman test for factorldquoArdquo the chi-square statistical value is 1225 (119875 value = 02685)with 1 degree of freedom The critical value for a significancelevel of 5 and 1 degree of freedom in the 1205942 distributiontable is 384 and there is no evidence of statistically significantdifferences From the Friedman test for factor ldquoBrdquo we alsoconclude that there is no evidence of statistically significantdifferences since the chi-square statistical value is 0746 (119875value = 06886) with 2 degrees of freedom (The critical valueof the 1205942 distribution table for a significance level of 5 and2 degrees of freedom is 599) Hence we conclude that thedimension of the problem does not affect the algorithmrsquos per-formance Only with problem Quartic the efficiency of mCSbased on (14) getsworse as dimension increasesOverall bothtested strategies are rather effective when binary solutions arerequired on small as well as on large nonlinear optimizationproblems

44 Solving 0-1 Knapsack Problems Finally we aim to analyzethe behavior of our best tested strategies when solvingwell-known binary and linear optimization problems Forthis preliminary experiment we selected two small knap-sack problems The 0-1 knapsack problem (KP) can bedescribed as follows Let 119899 be the number of items fromwhich we have to select some of them to be carried in aknapsack Let 119908

119897and V

119897be the weight and the value of

item 119897 respectively and let 119882 be the knapsackrsquos capac-ity It is usually assumed that all weights and values arenonnegative The objective is to maximize the total value

Advances in Operations Research 11

of the knapsack under the constraint of the knapsackrsquoscapacity

max119909

119881 (119909) equiv119899

sum119897=1

V119897119909119897

st119899

sum119897=1

119908119897119909119897le 119882 119909

119897isin 0 1 119897 = 1 119899

(17)

If item 119897 is selected 119909119897= 1 otherwise 119909

119897= 0 Using a penalty

function this problem can be transformed into

min119909

minus119899

sum119897=1

V119897119909119897+ 120583max0

119899

sum119897=1

119908119897119909119897minus119882 (18)

where 120583 is the penalty parameter which was set to be 100 inthis experiment

Case 1 (an instance of a 0-1 KP with 4 items) Knapsackrsquoscapacity is 119882 = 6 and the vectors of values and weights areV = (40 15 20 10) and 119908 = (4 2 3 1) Based on the above-mentioned parameters the HBFA with mCS based on (14)was run 30 times and the averaged results were the followingWith a success rate of 100 items 1 and 2 are included in theknapsack and items 3 and 4 are excluded with a maximumvalue of 55 (StD = 00e00) On average the runs required08 iterations and 293 function evaluations With a successrate of 23 the heuristic based on the floor function thusmCS based on (15) reached 119891avg = 49 (StD = 40e00) afteran average of 61611 function evaluations and an average of3841 iterations

Case 2 (an instance of a 0-1 KP with 8 items) The maximumcapacity of the knapsack is set to 8 and the vectors ofvalues and weights are V = (83 14 54 79 72 52 48 62) and119908 = (3 2 3 2 1 2 2 3) The results are averaged over the 30runs After 87 iterations and 3867 function evaluations themaximum value produced by the strategy mCS based on (14)is 286 (StD = 00e00) with a success rate of 100 Items 14 5 and 6 are included in the knapsack and the others areexcluded The heuristic mCS based on (15) did not reach theoptimal solution All runs required 500 iterations and 20040function evaluations and the average function values were119891avg = 227 with StD = 314e01

5 Conclusions and Future Work

In this work we have implemented several heuristics tocompute a global optimal binary solution of bound con-strained nonlinear optimization problems which have beenincorporated into FA yielding the herein called HBFA Theproblems addressed in this study have bounded continu-ous search space Our FA proposal uses dynamic updatingschemes for two parameters 120574 from the attractiveness termand 120572 from the randomization term and considers the Levydistribution to create randomness in firefly movement Theperformance behavior of the proposed heuristics has beeninvestigated Three simple heuristics capable of transformingreal continuous variables into binary ones are implemented

A new sigmoid ldquoerfrdquo function is proposed In the context ofthe firefly algorithm three different implementations aimingto incorporate the heuristics for binary variables into FAare proposed (mCS mBS and pBC) Based on a set ofbenchmark problems a comparison is carried out with otherbinary dealing metaheuristics namely AMPSO binPSObinDE and AMDE The experimental results show that theimplementation denoted bymCSwhen combined with eitherthe new sigmoid ldquoerfrdquo function or the rounding schemebased on the floor function is quite efficient and superiorto the other methods in comparison The statistical analysiscarried out on the results shows evidence of statisticallysignificant differences on efficiency measured by the numberof function evaluations between the implementation mCSbased on the floor function approach and the mBS basedon both tested sigmoid functions schemes We have alsoinvestigated the effect of problemrsquos dimension on the perfor-mance of our algorithmUsing the Friedman statistical testweconclude that the differences on efficiency are not statisticallysignificant Another simple experiment has shown that theimplementation mCS with the sigmoid ldquoerfrdquo function iseffective in solving two small 0-1 KPThe performance of thissimple heuristic strategy will be further analyzed to solvelarge and multidimensional 0-1 KP Future developmentsconcerning the HBFA will consider its extension to dealwith integer variables in nonlinear optimization problemsDifferent heuristics to transform continuous real variablesinto integer variableswill be investigated Challengingmixed-integer nonconvex nonlinear problems will be solved

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors wish to thank two anonymous referees fortheir valuable suggestions to improve the paper This workhas been supported by FCT (Fundacao para a Ciencia eTecnologia Portugal) in the scope of the Projects PEst-OEMATUI00132014 and PEst-OEEEIUI03192014

References

[1] L Wang R Yang Y Xu Q Niu P M Pardalos and MFei ldquoAn improved adaptive binary harmony search algorithmrdquoInformation Sciences vol 232 pp 58ndash87 2013

[2] M A K Azad A M A C Rocha and E M G P FernandesldquoImproved binary artificial fish swarm algorithm for the 0-1multidimensional knapsack problemsrdquo Swarm and Evolution-ary Computation vol 14 pp 66ndash75 2014

[3] A P Engelbrecht andG Pampara ldquoBinary differential evolutionstrategiesrdquo in Proceedings of the IEEE Congress on EvolutionaryComputation (CEC rsquo07) pp 1942ndash1947 September 2007

[4] M H Kashan N Nahavandi and A H Kashan ldquoDisABC anew artificial bee colony algorithm for binary optimizationrdquoApplied Soft Computing Journal vol 12 no 1 pp 342ndash352 2012

12 Advances in Operations Research

[5] M H Kashan A H Kashan and N Nahavandi ldquoA noveldifferential evolution algorithm for binary optimizationrdquo Com-putational Optimization and Applications vol 55 no 2 pp 481ndash513 2013

[6] J Kennedy and R C Eberhart ldquoA discrete binary versionof the particle swarm algorithmrdquo in Proceedings of the IEEEInternational Conference on Systems Man and Cybernetics vol5 pp 4104ndash4108 Orlando Fla USA October 1997

[7] T Liu L Zhang and J Zhang ldquoStudy of binary artificialbee colony algorithm based on particle swarm optimizationrdquoJournal of Computational Information Systems vol 9 no 16 pp6459ndash6466 2013

[8] S Mirjalili and A Lewis ldquoS-shaped versus V-shaped transferfunctions for binary particle swarm optimizationrdquo Swarm andEvolutionary Computation vol 9 pp 1ndash14 2013

[9] G Pampara A P Engelbrecht and N Franken ldquoBinarydifferential evolutionrdquo in Proceedings of the IEEE Congress onEvolutionary Computation (CEC rsquo06) pp 1873ndash1879 VancouverCanada July 2006

[10] G Pampara and A P Engelbrecht ldquoBinary artificial bee colonyoptimizationrdquo in Proceedings of the IEEE Symposium on SwarmIntelligence (SIS rsquo11) pp 1ndash8 IEEE Perth April 2011

[11] S Burer and A N Letchford ldquoNon-convex mixed-integer non-linear programming a surveyrdquo Surveys in Operations Researchand Management Science vol 17 no 2 pp 97ndash106 2012

[12] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Proceedings of the Stochastic Algorithms Foundations andApplications (SAGA rsquo09) O Watanabe and T Zeugmann Edsvol 5792 of Lecture Notes in Computer Science pp 169ndash1782009

[13] X-S Yang ldquoFirefly algorithm stochastic test functions anddesign optimizationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[14] I Fister Jr X-S Yang and J Brest ldquoA comprehensive review offirefly algorithmsrdquo Swarm and Evolutionary Computation vol13 pp 34ndash46 2013

[15] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[16] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoA Gaussian firefly algorithmrdquo International Journal of MachineLearning and Computing vol 1 no 5 pp 448ndash453 2011

[17] L Guo G-G Wang H Wang and D Wang ldquoAn effectivehybrid firefly algorithmwith harmony search for global numer-ical optimizationrdquoTheScientificWorld Journal vol 2013 ArticleID 125625 9 pages 2013

[18] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoSome hybrid models to improve firefly algorithm perfor-mancerdquo International Journal of Artificial Intelligence vol 8 no12 pp 97ndash117 2012

[19] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 467631 12pages 2012

[20] X Lin Y Zhong and H Zhang ldquoAn enhanced firefly algorithmfor function optimisation problemsrdquo International Journal ofModelling Identification and Control vol 18 no 2 pp 166ndash1732013

[21] A Manju and M J Nigam ldquoFirefly algorithm with fireflieshaving quantum behaviorrdquo in Proceedings of the InternationalConference on Radar Communication and Computing (ICRCCrsquo12) pp 117ndash119 IEEE Tiruvannamalai India December 2012

[22] X-S Yang and X He ldquoFirefly algorithm recent advances andapplicationsrdquo International Journal of Swarm Intelligence vol 1no 1 pp 36ndash50 2013

[23] S Arora and S Singh ldquoThe firefly optimization algorithmconvergence analysis and parameter selectionrdquo InternationalJournal of Computer Applications vol 69 no 3 pp 48ndash52 2013

[24] X-S Yang S S S Hosseini and A H Gandomi ldquoFireflyalgorithm for solving non-convex economic dispatch problemswith valve loading effectrdquo Applied Soft Computing Journal vol12 no 3 pp 1180ndash1186 2012

[25] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using firefly algorithmrdquo Computers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[26] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering with Computers vol 29 no 2 pp175ndash184 2013

[27] A N Kumbharana and G M Pandey ldquoSolving travellingsalesman problemusing firefly algorithmrdquo International Journalfor Research in ScienceampAdvanced Technologies vol 2 no 2 pp53ndash57 2013

[28] M K Sayadi A Hafezalkotob and S G J Naini ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[29] X-S Yang ldquoFirefly algorithmrdquo inNature-InspiredMetaheuristicAlgorithms pp 81ndash96 Luniver Press University of CambridgeCambridge UK 2nd edition 2010

[30] A R Jordehi and J Jasni ldquoParameter selection in particle swarmoptimisation a surveyrdquo Journal of Experimental amp TheoreticalArtificial Intelligence vol 25 no 4 pp 527ndash542 2013

[31] M Mahdavi M Fesanghary and E Damangir ldquoAn improvedharmony search algorithm for solving optimization problemsrdquoAppliedMathematics and Computation vol 188 no 2 pp 1567ndash1579 2007

[32] M Padberg ldquoHarmony search algorithms for binary optimiza-tion problemsrdquo in Operations Research Proceedings 2011 pp343ndash348 Springer Berlin Germany 2012

[33] M A K Azad A M A C Rocha and E M G P FernandesldquoA simplified binary artificial fish swarm algorithm for unca-pacitated facility location problemsrdquo in Proceedings of WorldCongress on Engineering S I Ao L Gelman D W L HukinsA Hunter and A M Korsunsky Eds vol 1 pp 31ndash36 IAENGLondon UK 2013

[34] M Sevkli and A R Guner ldquoA continuous particle swarm opti-mization algorithm for uncapacitated facility location problemrdquoin Ant Colony Optimization and Swarm Intelligence M DorigoL M Gambardella M Birattari A Martinoli R Poli and TStutzle Eds vol 4150 of Lecture Notes in Computer Sciencespp 316ndash323 Springer 2006

[35] L Wang and C Singh ldquoUnit commitment considering genera-tor outages through a mixed-integer particle swarm optimiza-tion algorithmrdquoApplied SoftComputing Journal vol 9 no 3 pp947ndash953 2009

[36] MM Ali C Khompatraporn and Z B Zabinsky ldquoA numericalevaluation of several stochastic algorithms on selected con-tinuous global optimization test problemsrdquo Journal of GlobalOptimization vol 31 no 4 pp 635ndash672 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 7: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

Advances in Operations Research 7

Table 1 Problems set

Ackley 119891 (119909) = minus20 exp(minus02radic 1

119899

119899

sum119894=1

1199092119894) minus exp(1

119899

119899

sum119894=1

cos (2120587119909119894)) + 20 + 119890

119899 = 30Ω = [minus30 30]30 119891lowast = 0 at 119909lowast = (0 0)

Foxholes119891(119909) =

1

0002 + sum25

119895=1(1 (119895 + (119909

1minus 1198861119895)6

+ (1199092minus 1198862119895)6

))

[119886119894119895] = [

minus32 minus16 0 16 32 minus32 minus16 sdot sdot sdot 16 32

minus32 minus32 minus32 minus32 minus32 minus16 minus16 sdot sdot sdot 32 32]

119899 = 2 Ω = [minus65536 65536]2 119891lowast asymp 13 at 119909lowast = (0 0)

Griewank119891 (119909) = 1 +

1

4000

119899

sum119894=1

1199092119894minus119899

prod119894=1

cos(119909119894

radic119894)

119899 = 30 Ω = [minus300 300]30 119891lowast = 0 at 119909lowast = (0 0)

Quartic119891(119909) =

119899

sum119894=1

1198941199094119894+ 119880[0 1]

119899 = 30 Ω = [minus128 128]30 119891lowast = 0 + noise at 119909lowast = (0 0)

Rastrigin119891(119909) = 10119899 +

119899

sum119894=1

(1199092119894minus 10 cos (2120587119909

119894))

119899 = 30 Ω = [minus512 512]30 119891lowast = 0 at 119909lowast = (0 0)

Rosenbrock2 119891(119909) = 100 (11990921minus 1199092)2

+ (1 minus 1199091)2

119899 = 2 Ω = [minus2048 2048]2 119891lowast = 0 at 119909lowast = (1 1)

Rosenbrock 119891(119909) =119899minus1

sum119894=1

100(1199092119894minus 119909119894+1)2 + (1 minus 119909

119894)2

119899 = 30 Ω = [minus2048 2048]30 119891lowast = 0 at 119909lowast = (1 1)

Schaffer 119891(119909) = 05 +(sin(radic1199092

1+ 11990922))2

minus 05

(1 + 0001(11990921+ 11990922))2

119899 = 2Ω = [minus100 100]2 119891lowast = 0 at 119909lowast = (0 0)

Spherical119891 (119909) =

119899

sum119894=1

1199092119894

119899 = 3 Ω = [minus512 512]3 119891lowast = 0 at 119909lowast = (0 0 0)

Step119891(119909) = 6119899 +

119899

sum119894=1

lfloor119909119894rfloor

119899 = 5 Ω = [minus512 512]5 119891lowast = 30 at 119909lowast = (0 0 0 0 0)

a tolerance 120578 of the optimal solution 119891lowast in all runs FurthermBS (Algorithm 3) works better when the discretization ofthe variables is carried out by (15) Overall mCS based on (14)produces the best results on 6 problems mCS based on (15)gives the best results on 7 problems (including 4 ties with theformer case) mBS based on (14) wins only on one problemand mBS based on (15) wins on 3 problems (all are ties withmCS based on (15))

Further when performing the Friedman test on thefour distributions of ldquonferdquo values the chi-square statisticalvalue is 13747 (and the 119875 value is 00033) From the 1205942

distribution table the critical value for a significance levelof 5 and 3 degrees of freedom is 781 Since 13747 gt 781the null hypothesis is rejected and we conclude that theobserved differences of the four distributions are statisticallysignificant

We now introduce in the statistical analysis the resultsreported in Tables 2 and 3 concerned with both implementa-tions mCS andmBS Six distributions of ldquonferdquo values are now

in comparison Friedmanrsquos chi-square value is 18175 (119875 value= 00027) The critical value of the chi-square distributionfor a significance level of 5 and 5 degrees of freedom is1107 Thus the null hypothesis of ldquono significant differenceson mean ranksrdquo is rejected and there is evidence that thesix distributions of ldquonferdquo values have statistically significantdifferences Multiple comparisons (two at a time) may becarried out to determine which mean ranks are significantlydifferent The estimates of the 95 confidence intervalsare shown in the graph of Figure 2 for each case undertesting Two compared distributions of ldquonferdquo are significantlydifferent if their intervals are disjoint and are not significantlydifferent if their intervals overlap Hence from the six caseswe conclude that the mean ranks produced by mCS basedon (15) are significantly different from those of mBS basedon (9) and mBS based on (14) For the remaining pairs ofcomparison there are no significant differences on the meanranks

8 Advances in Operations Research

Table 2 Comparison with AMPSO binPSO binDE and AMDE based on 119891avg and StD (shown in parentheses)

Prob mCS based on (9) mBS based on (9) pBC based on (9) AMPSO binPSO binDE AMDE119891avg nfe 119891avg nfe 119891avg nfe 119891avg 119891avg 119891avg 119891avg

Ackley 888119890 minus 16 80 888119890 minus 16 1156 888119890 minus 16 2168 19711989001 20111989001 17311989001 16411989001

(00011989000) (00011989000) (00011989000) (057119890 minus 01) (049119890 minus 01) (03111989001) (07611989000)

Foxholes 12711989001 61 12711989001 72 12711989001 63 053119890 minus 10 053119890 minus 10 12911989001 5011989002

(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (00011989000) (097119890 minus 14) (08611989000) (0011989000)

Griewank 00011989000 80 00011989000 1332 00011989000 2300 10611989002 67911989001 26311989002 20611989002

(00011989000) (00011989000) (00011989000) (04411989001) (09811989001) (01011989002) (03911989001)

Quartic 455119890 minus 01 2012 537119890 minus 01 1771 488119890 minus 01 2951 41511989001 20911989001 14911989000 35511989000

(301119890 minus 01) (303119890 minus 01) (271119890 minus 01) (01911989001) (01911989001) (06611989000) (08111989000)

Rastrigin 00011989000 80 00011989000 12827 00011989000 24067 22511989002 30811989002 21411989002 90511989001

(00011989000) (00011989000) (00011989000) (03511989002) (02811989001) (04511989002) (03111989002)

Rosenbrock2 00011989000 65 00011989000 57 00011989000 61 049119890 minus 04 014119890 minus 03 020119890 minus 05 055119890 minus 04

(00011989000) (00011989000) (00011989000) (011119890 minus 03) (088119890 minus 04) (015119890 minus 04) (017119890 minus 04)

Rosenbrock 00011989000 180 00011989000 21907 00011989000 2088 22011989003 22411989003 18111989003 91411989001

(00011989000) (00011989000) (00011989000) (08611989002) (07711989002) (01611989002) (04211989002)

Schaffer 00011989000 61 00011989000 8 00011989000 49 024119890 minus 01 073119890 minus 01 minus099511989000 minus1011989000

(00011989000) (00011989000) (00011989000) (042119890 minus 02) (011119890 minus 01) (027119890 minus 06) (0011989000)

Spherical 00011989000 12 00011989000 12 00011989000 117 030119890 minus 03 030119890 minus 03 015119890 minus 03 020119890 minus 04

(00011989000) (00011989000) (00011989000) (00011989000) (0011989000) (041119890 minus 04) (015119890 minus 04)

Step 30011989001 427 30011989001 427 30011989001 48 00011989000 017119890 minus 04 015119890 minus 01 02511989000

(00011989000) (00011989000) (00011989000) (00011989000) (015119890 minus 04) (0011989000) (060119890 minus 01)

0 1 2 3 4 5 6

mBS based on (15)

mCS based on (15)

mBS based on (14)

mCS based on (14)

mBS based on (9)

mCS based on (9)

mBS based on (9) and (14) have mean ranks significantly different from mCS based on (15)

Figure 2 Confidence intervals for mean ranks of nfe

For comparative purposes we include in Table 4 theresults obtained by using the proposed Levy (L) distributionin the randomization term as shown in (7) and those pro-duced by the Uniform (U) distribution using rand sim 119880[0 1]as shown in (3) The reported tests use implementation mCS(described in Algorithm 2) with the two heuristics for binaryvariables (i) the ldquoerfrdquo function in (14) together with (10) and(ii) the floor function in (15) It is shown that the performanceof HBFA with Uniform distribution is very sensitive to thedimension of the problem since the efficiency is good when119899 is small but gets worse when 119899 is largeThus we have shownthat the Levy distribution is a very good bid

We add to some problems with 119899 = 30 from Table 1mdashAckley Griewank Rastrigin Rosenbrock and Sphericalmdashthree other functions Schwefel 222 Schwefel 226 and SumofDifferent Power to compare our results with those reportedin [1] Schwefel 222 is unimodal and for Ω = [minus10 10]30the binary solution is (0 0) with 119891lowast = 0 Schwefel 226is multimodal and in Ω = [minus500 500]30 the binary solutionis (1 1 1) with 119891lowast = minus25244129544 Sum of DifferentPower is unimodal and in Ω = [minus1 1]30 the minimum is 0at (0 0) For the results of Table 5 we use HBFA basedon mCS with both ldquoerfrdquo function in (14) together with (10)and the floor function (15) The table reports on the average

Advances in Operations Research 9

Table 3 Comparison of mCS versus mBS and (14) versus (15) based on 119891avg nfe and nit

Prob mCS based on (14) mBS based on (14) mCS based on (15) mBS based on (15)119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 6787 16 888119890 minus 16 80 1 888119890 minus 16 827 11Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12911989001 4048 1002Griewank 00011989000 80 1 00011989000 7173 169 00011989000 80 1 00011989000 827 11Quartic 238119890 minus 01 813 103 466119890 minus 01 7947 189 948119890 minus 02 80 1 393119890 minus 01 80 1Rastrigin 00011989000 80 1 00011989000 7027 166 00011989000 80 1 00011989000 80 1Rosenbrock2 00011989000 64 06 00011989000 53 03 00011989000 63 06 233119890 minus 01 4708 1167Rosenbrock 00011989000 80 1 00011989000 1053 16 00011989000 80 1 29011989001 20040 500Schaffer 00011989000 68 07 00011989000 129 22 00011989000 51 03 708119890 minus 02 2051 503Spherical 00011989000 99 02 00011989000 227 18 00011989000 101 03 00011989000 115 04Step 30011989001 459 04 30011989001 629 1 30011989001 405 03 30011989001 405 03

Table 4 Comparison between Levy and Uniform distributions in the randomization term based on 119891avg nfe and nit (with StD inparentheses)

Prob mCS based on (14) + L mCS based on (14) + U mCS based on (15) + L mCS based on (15) + U119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 1096 264 888119890 minus 16 80 1 141e00 20040 500(00011989000) (00011989000) (00011989000) (126119890 minus 02)

Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12711989001 68 07(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (903119890 minus 15)

Griewank 00011989000 80 1 00011989000 2436 599 00011989000 80 1 127119890 minus 01 20040 500(00011989000) (00011989000) (00011989000) (276119890 minus 02)

Quartic 238119890 minus 01 813 103 69011989000 14692 3662 948119890 minus 02 80 1 510119890 minus 01 10581 2635(170119890 minus 01) (11611989001) (103119890 minus 01) (290119890 minus 01)

Rastrigin 00011989000 80 1 00011989000 1157 279 00011989000 80 1 100119890 minus 01 18104 4516(00011989000) (00011989000) (00011989000) (403119890 minus 01)

Rosenbrock2 00011989000 64 06 00011989000 368 82 00011989000 63 06 00011989000 59 05(00011989000) (00011989000) (00011989000) (00011989000)

Rosenbrock 00011989000 80 1 82211989001 14136 3524 00011989000 80 1 74211989001 17698 4412(00011989000) (10211989002) (00011989000) (84311989001)

Schaffer 00011989000 68 07 00011989000 185 36 00011989000 51 03 00011989000 56 04(00011989000) (00011989000) (00011989000) (00011989000)

Spherical 00011989000 99 02 00011989000 133 07 00011989000 101 03 00011989000 147 08(00011989000) (00011989000) (00011989000) (00011989000)

Step 30011989001 459 04 30011989001 469 05 30011989001 405 03 30011989001 523 06(00011989000) (00011989000) (00011989000) (00011989000)

Table 5 Comparison of HBFA (with mCS) with ABHS in [1] based on 119891avg nfe and SR ()

Prob mCS based on (14) mCS based on (15) ABHS in [1]119891avg nfe SR () 119891avg nfe SR () 119891avg nfe SR ()

Ackley 888119890 minus 16 80 100 888119890 minus 16 80 100 156119890 minus 01 62350 90

Griewank 00011989000 80 100 00011989000 80 100 330119890 minus 02 79758 38

Rastrigin 00011989000 80 100 00011989000 80 100 13211989001 90000 0

Rosenbrock 00011989000 80 100 00011989000 80 100 68011989002 90000 0

Schwefel 222 00011989000 80 100 00011989000 80 100 00011989000 59870 100

Schwefel 226 minus25211989001 80 100 minus24711989001 10867 87 minus119511989004 90000 0

Spherical 00011989000 80 100 00011989000 80 100 00011989000 62234 100

Sum of Different Power 00011989000 91 100 00011989000 168 100 00011989000 80371 100

10 Advances in Operations Research

Table 6 Results for varied dimensions (119899 = 50 100 200) considering119898 = 40

119891lowast 119899mCS based on (14) mCS based on (15)

119891avg StD nfe nit 119891avg StD nfe nit

Ackley00011989000 50 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 100 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 200 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

Griewank00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Quartic00011989000 + noise 50 224119890 minus 01 195119890 minus 01 827 11 143119890 minus 01 159119890 minus 01 80 1

00011989000 + noise 100 432119890 minus 01 273119890 minus 01 1467 27 173119890 minus 01 110119890 minus 01 80 1

00011989000 + noise 200 523119890 minus 01 294119890 minus 01 17387 425 196119890 minus 01 213119890 minus 01 813 103

Rosenbrock00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Spherical00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Step30011989002 50 30011989002 00011989000 80 1 30011989002 00011989000 80 1

60011989002 100 60011989002 00011989000 80 1 60011989002 00011989000 80 1

12011989003 200 12011989003 00011989000 80 1 12011989003 00011989000 80 1

function values average number of function evaluations andsuccess rate (SR) Here 50 independent runs were carriedout to compare with the results shown in [1] The maximumnumber of function evaluations therein used was 90000 Itis shown that our HBFA outperforms the proposed adaptivebinary harmony search (ABHS)

43 Effect of Problemrsquos Dimension on HBFA Performance Wenow consider six problems with varied dimensions from theprevious set to analyze the effect of problemrsquos dimension onthe HBFA performance We test three dimensions 119899 = 50119899 = 100 and 119899 = 200 The algorithmrsquos parameters areset as previously defined We remark that the size of thepopulation for all the tested problems and dimensions is 40points

Table 6 contains the results for comparison based onaveraged values of 119891 number of function evaluationsand number of iterations The ldquoStDrdquo of the 119891 values arealso displayed Since the implementation mCS shown inAlgorithm 2 performs better and shows more consistentresults than the other two we tested only mCS based on (14)and mCS based on (15)

Besides testing significant differences on the mean ranksproduced by the two treatments mCS based on (14) andmCSbased on (15) we also want to determine if the differences onmean ranks produced by problemrsquos dimensionmdash50 100 and200mdashare statistically significant at a significance level of 5Hence we aim to analyze the effects of two factors ldquoArdquo andldquoBrdquo ldquoArdquo is the HBFA implementation (with two levels) andldquoBrdquo is the problemrsquos dimension (with three levels) For thispurpose the results obtained for the six problems for each

combination of the levels of ldquoArdquo and ldquoBrdquo are considered asreplications When performing the Friedman test for factorldquoArdquo the chi-square statistical value is 1225 (119875 value = 02685)with 1 degree of freedom The critical value for a significancelevel of 5 and 1 degree of freedom in the 1205942 distributiontable is 384 and there is no evidence of statistically significantdifferences From the Friedman test for factor ldquoBrdquo we alsoconclude that there is no evidence of statistically significantdifferences since the chi-square statistical value is 0746 (119875value = 06886) with 2 degrees of freedom (The critical valueof the 1205942 distribution table for a significance level of 5 and2 degrees of freedom is 599) Hence we conclude that thedimension of the problem does not affect the algorithmrsquos per-formance Only with problem Quartic the efficiency of mCSbased on (14) getsworse as dimension increasesOverall bothtested strategies are rather effective when binary solutions arerequired on small as well as on large nonlinear optimizationproblems

44 Solving 0-1 Knapsack Problems Finally we aim to analyzethe behavior of our best tested strategies when solvingwell-known binary and linear optimization problems Forthis preliminary experiment we selected two small knap-sack problems The 0-1 knapsack problem (KP) can bedescribed as follows Let 119899 be the number of items fromwhich we have to select some of them to be carried in aknapsack Let 119908

119897and V

119897be the weight and the value of

item 119897 respectively and let 119882 be the knapsackrsquos capac-ity It is usually assumed that all weights and values arenonnegative The objective is to maximize the total value

Advances in Operations Research 11

of the knapsack under the constraint of the knapsackrsquoscapacity

max119909

119881 (119909) equiv119899

sum119897=1

V119897119909119897

st119899

sum119897=1

119908119897119909119897le 119882 119909

119897isin 0 1 119897 = 1 119899

(17)

If item 119897 is selected 119909119897= 1 otherwise 119909

119897= 0 Using a penalty

function this problem can be transformed into

min119909

minus119899

sum119897=1

V119897119909119897+ 120583max0

119899

sum119897=1

119908119897119909119897minus119882 (18)

where 120583 is the penalty parameter which was set to be 100 inthis experiment

Case 1 (an instance of a 0-1 KP with 4 items) Knapsackrsquoscapacity is 119882 = 6 and the vectors of values and weights areV = (40 15 20 10) and 119908 = (4 2 3 1) Based on the above-mentioned parameters the HBFA with mCS based on (14)was run 30 times and the averaged results were the followingWith a success rate of 100 items 1 and 2 are included in theknapsack and items 3 and 4 are excluded with a maximumvalue of 55 (StD = 00e00) On average the runs required08 iterations and 293 function evaluations With a successrate of 23 the heuristic based on the floor function thusmCS based on (15) reached 119891avg = 49 (StD = 40e00) afteran average of 61611 function evaluations and an average of3841 iterations

Case 2 (an instance of a 0-1 KP with 8 items) The maximumcapacity of the knapsack is set to 8 and the vectors ofvalues and weights are V = (83 14 54 79 72 52 48 62) and119908 = (3 2 3 2 1 2 2 3) The results are averaged over the 30runs After 87 iterations and 3867 function evaluations themaximum value produced by the strategy mCS based on (14)is 286 (StD = 00e00) with a success rate of 100 Items 14 5 and 6 are included in the knapsack and the others areexcluded The heuristic mCS based on (15) did not reach theoptimal solution All runs required 500 iterations and 20040function evaluations and the average function values were119891avg = 227 with StD = 314e01

5 Conclusions and Future Work

In this work we have implemented several heuristics tocompute a global optimal binary solution of bound con-strained nonlinear optimization problems which have beenincorporated into FA yielding the herein called HBFA Theproblems addressed in this study have bounded continu-ous search space Our FA proposal uses dynamic updatingschemes for two parameters 120574 from the attractiveness termand 120572 from the randomization term and considers the Levydistribution to create randomness in firefly movement Theperformance behavior of the proposed heuristics has beeninvestigated Three simple heuristics capable of transformingreal continuous variables into binary ones are implemented

A new sigmoid ldquoerfrdquo function is proposed In the context ofthe firefly algorithm three different implementations aimingto incorporate the heuristics for binary variables into FAare proposed (mCS mBS and pBC) Based on a set ofbenchmark problems a comparison is carried out with otherbinary dealing metaheuristics namely AMPSO binPSObinDE and AMDE The experimental results show that theimplementation denoted bymCSwhen combined with eitherthe new sigmoid ldquoerfrdquo function or the rounding schemebased on the floor function is quite efficient and superiorto the other methods in comparison The statistical analysiscarried out on the results shows evidence of statisticallysignificant differences on efficiency measured by the numberof function evaluations between the implementation mCSbased on the floor function approach and the mBS basedon both tested sigmoid functions schemes We have alsoinvestigated the effect of problemrsquos dimension on the perfor-mance of our algorithmUsing the Friedman statistical testweconclude that the differences on efficiency are not statisticallysignificant Another simple experiment has shown that theimplementation mCS with the sigmoid ldquoerfrdquo function iseffective in solving two small 0-1 KPThe performance of thissimple heuristic strategy will be further analyzed to solvelarge and multidimensional 0-1 KP Future developmentsconcerning the HBFA will consider its extension to dealwith integer variables in nonlinear optimization problemsDifferent heuristics to transform continuous real variablesinto integer variableswill be investigated Challengingmixed-integer nonconvex nonlinear problems will be solved

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors wish to thank two anonymous referees fortheir valuable suggestions to improve the paper This workhas been supported by FCT (Fundacao para a Ciencia eTecnologia Portugal) in the scope of the Projects PEst-OEMATUI00132014 and PEst-OEEEIUI03192014

References

[1] L Wang R Yang Y Xu Q Niu P M Pardalos and MFei ldquoAn improved adaptive binary harmony search algorithmrdquoInformation Sciences vol 232 pp 58ndash87 2013

[2] M A K Azad A M A C Rocha and E M G P FernandesldquoImproved binary artificial fish swarm algorithm for the 0-1multidimensional knapsack problemsrdquo Swarm and Evolution-ary Computation vol 14 pp 66ndash75 2014

[3] A P Engelbrecht andG Pampara ldquoBinary differential evolutionstrategiesrdquo in Proceedings of the IEEE Congress on EvolutionaryComputation (CEC rsquo07) pp 1942ndash1947 September 2007

[4] M H Kashan N Nahavandi and A H Kashan ldquoDisABC anew artificial bee colony algorithm for binary optimizationrdquoApplied Soft Computing Journal vol 12 no 1 pp 342ndash352 2012

12 Advances in Operations Research

[5] M H Kashan A H Kashan and N Nahavandi ldquoA noveldifferential evolution algorithm for binary optimizationrdquo Com-putational Optimization and Applications vol 55 no 2 pp 481ndash513 2013

[6] J Kennedy and R C Eberhart ldquoA discrete binary versionof the particle swarm algorithmrdquo in Proceedings of the IEEEInternational Conference on Systems Man and Cybernetics vol5 pp 4104ndash4108 Orlando Fla USA October 1997

[7] T Liu L Zhang and J Zhang ldquoStudy of binary artificialbee colony algorithm based on particle swarm optimizationrdquoJournal of Computational Information Systems vol 9 no 16 pp6459ndash6466 2013

[8] S Mirjalili and A Lewis ldquoS-shaped versus V-shaped transferfunctions for binary particle swarm optimizationrdquo Swarm andEvolutionary Computation vol 9 pp 1ndash14 2013

[9] G Pampara A P Engelbrecht and N Franken ldquoBinarydifferential evolutionrdquo in Proceedings of the IEEE Congress onEvolutionary Computation (CEC rsquo06) pp 1873ndash1879 VancouverCanada July 2006

[10] G Pampara and A P Engelbrecht ldquoBinary artificial bee colonyoptimizationrdquo in Proceedings of the IEEE Symposium on SwarmIntelligence (SIS rsquo11) pp 1ndash8 IEEE Perth April 2011

[11] S Burer and A N Letchford ldquoNon-convex mixed-integer non-linear programming a surveyrdquo Surveys in Operations Researchand Management Science vol 17 no 2 pp 97ndash106 2012

[12] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Proceedings of the Stochastic Algorithms Foundations andApplications (SAGA rsquo09) O Watanabe and T Zeugmann Edsvol 5792 of Lecture Notes in Computer Science pp 169ndash1782009

[13] X-S Yang ldquoFirefly algorithm stochastic test functions anddesign optimizationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[14] I Fister Jr X-S Yang and J Brest ldquoA comprehensive review offirefly algorithmsrdquo Swarm and Evolutionary Computation vol13 pp 34ndash46 2013

[15] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[16] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoA Gaussian firefly algorithmrdquo International Journal of MachineLearning and Computing vol 1 no 5 pp 448ndash453 2011

[17] L Guo G-G Wang H Wang and D Wang ldquoAn effectivehybrid firefly algorithmwith harmony search for global numer-ical optimizationrdquoTheScientificWorld Journal vol 2013 ArticleID 125625 9 pages 2013

[18] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoSome hybrid models to improve firefly algorithm perfor-mancerdquo International Journal of Artificial Intelligence vol 8 no12 pp 97ndash117 2012

[19] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 467631 12pages 2012

[20] X Lin Y Zhong and H Zhang ldquoAn enhanced firefly algorithmfor function optimisation problemsrdquo International Journal ofModelling Identification and Control vol 18 no 2 pp 166ndash1732013

[21] A Manju and M J Nigam ldquoFirefly algorithm with fireflieshaving quantum behaviorrdquo in Proceedings of the InternationalConference on Radar Communication and Computing (ICRCCrsquo12) pp 117ndash119 IEEE Tiruvannamalai India December 2012

[22] X-S Yang and X He ldquoFirefly algorithm recent advances andapplicationsrdquo International Journal of Swarm Intelligence vol 1no 1 pp 36ndash50 2013

[23] S Arora and S Singh ldquoThe firefly optimization algorithmconvergence analysis and parameter selectionrdquo InternationalJournal of Computer Applications vol 69 no 3 pp 48ndash52 2013

[24] X-S Yang S S S Hosseini and A H Gandomi ldquoFireflyalgorithm for solving non-convex economic dispatch problemswith valve loading effectrdquo Applied Soft Computing Journal vol12 no 3 pp 1180ndash1186 2012

[25] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using firefly algorithmrdquo Computers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[26] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering with Computers vol 29 no 2 pp175ndash184 2013

[27] A N Kumbharana and G M Pandey ldquoSolving travellingsalesman problemusing firefly algorithmrdquo International Journalfor Research in ScienceampAdvanced Technologies vol 2 no 2 pp53ndash57 2013

[28] M K Sayadi A Hafezalkotob and S G J Naini ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[29] X-S Yang ldquoFirefly algorithmrdquo inNature-InspiredMetaheuristicAlgorithms pp 81ndash96 Luniver Press University of CambridgeCambridge UK 2nd edition 2010

[30] A R Jordehi and J Jasni ldquoParameter selection in particle swarmoptimisation a surveyrdquo Journal of Experimental amp TheoreticalArtificial Intelligence vol 25 no 4 pp 527ndash542 2013

[31] M Mahdavi M Fesanghary and E Damangir ldquoAn improvedharmony search algorithm for solving optimization problemsrdquoAppliedMathematics and Computation vol 188 no 2 pp 1567ndash1579 2007

[32] M Padberg ldquoHarmony search algorithms for binary optimiza-tion problemsrdquo in Operations Research Proceedings 2011 pp343ndash348 Springer Berlin Germany 2012

[33] M A K Azad A M A C Rocha and E M G P FernandesldquoA simplified binary artificial fish swarm algorithm for unca-pacitated facility location problemsrdquo in Proceedings of WorldCongress on Engineering S I Ao L Gelman D W L HukinsA Hunter and A M Korsunsky Eds vol 1 pp 31ndash36 IAENGLondon UK 2013

[34] M Sevkli and A R Guner ldquoA continuous particle swarm opti-mization algorithm for uncapacitated facility location problemrdquoin Ant Colony Optimization and Swarm Intelligence M DorigoL M Gambardella M Birattari A Martinoli R Poli and TStutzle Eds vol 4150 of Lecture Notes in Computer Sciencespp 316ndash323 Springer 2006

[35] L Wang and C Singh ldquoUnit commitment considering genera-tor outages through a mixed-integer particle swarm optimiza-tion algorithmrdquoApplied SoftComputing Journal vol 9 no 3 pp947ndash953 2009

[36] MM Ali C Khompatraporn and Z B Zabinsky ldquoA numericalevaluation of several stochastic algorithms on selected con-tinuous global optimization test problemsrdquo Journal of GlobalOptimization vol 31 no 4 pp 635ndash672 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 8: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

8 Advances in Operations Research

Table 2 Comparison with AMPSO binPSO binDE and AMDE based on 119891avg and StD (shown in parentheses)

Prob mCS based on (9) mBS based on (9) pBC based on (9) AMPSO binPSO binDE AMDE119891avg nfe 119891avg nfe 119891avg nfe 119891avg 119891avg 119891avg 119891avg

Ackley 888119890 minus 16 80 888119890 minus 16 1156 888119890 minus 16 2168 19711989001 20111989001 17311989001 16411989001

(00011989000) (00011989000) (00011989000) (057119890 minus 01) (049119890 minus 01) (03111989001) (07611989000)

Foxholes 12711989001 61 12711989001 72 12711989001 63 053119890 minus 10 053119890 minus 10 12911989001 5011989002

(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (00011989000) (097119890 minus 14) (08611989000) (0011989000)

Griewank 00011989000 80 00011989000 1332 00011989000 2300 10611989002 67911989001 26311989002 20611989002

(00011989000) (00011989000) (00011989000) (04411989001) (09811989001) (01011989002) (03911989001)

Quartic 455119890 minus 01 2012 537119890 minus 01 1771 488119890 minus 01 2951 41511989001 20911989001 14911989000 35511989000

(301119890 minus 01) (303119890 minus 01) (271119890 minus 01) (01911989001) (01911989001) (06611989000) (08111989000)

Rastrigin 00011989000 80 00011989000 12827 00011989000 24067 22511989002 30811989002 21411989002 90511989001

(00011989000) (00011989000) (00011989000) (03511989002) (02811989001) (04511989002) (03111989002)

Rosenbrock2 00011989000 65 00011989000 57 00011989000 61 049119890 minus 04 014119890 minus 03 020119890 minus 05 055119890 minus 04

(00011989000) (00011989000) (00011989000) (011119890 minus 03) (088119890 minus 04) (015119890 minus 04) (017119890 minus 04)

Rosenbrock 00011989000 180 00011989000 21907 00011989000 2088 22011989003 22411989003 18111989003 91411989001

(00011989000) (00011989000) (00011989000) (08611989002) (07711989002) (01611989002) (04211989002)

Schaffer 00011989000 61 00011989000 8 00011989000 49 024119890 minus 01 073119890 minus 01 minus099511989000 minus1011989000

(00011989000) (00011989000) (00011989000) (042119890 minus 02) (011119890 minus 01) (027119890 minus 06) (0011989000)

Spherical 00011989000 12 00011989000 12 00011989000 117 030119890 minus 03 030119890 minus 03 015119890 minus 03 020119890 minus 04

(00011989000) (00011989000) (00011989000) (00011989000) (0011989000) (041119890 minus 04) (015119890 minus 04)

Step 30011989001 427 30011989001 427 30011989001 48 00011989000 017119890 minus 04 015119890 minus 01 02511989000

(00011989000) (00011989000) (00011989000) (00011989000) (015119890 minus 04) (0011989000) (060119890 minus 01)

0 1 2 3 4 5 6

mBS based on (15)

mCS based on (15)

mBS based on (14)

mCS based on (14)

mBS based on (9)

mCS based on (9)

mBS based on (9) and (14) have mean ranks significantly different from mCS based on (15)

Figure 2 Confidence intervals for mean ranks of nfe

For comparative purposes we include in Table 4 theresults obtained by using the proposed Levy (L) distributionin the randomization term as shown in (7) and those pro-duced by the Uniform (U) distribution using rand sim 119880[0 1]as shown in (3) The reported tests use implementation mCS(described in Algorithm 2) with the two heuristics for binaryvariables (i) the ldquoerfrdquo function in (14) together with (10) and(ii) the floor function in (15) It is shown that the performanceof HBFA with Uniform distribution is very sensitive to thedimension of the problem since the efficiency is good when119899 is small but gets worse when 119899 is largeThus we have shownthat the Levy distribution is a very good bid

We add to some problems with 119899 = 30 from Table 1mdashAckley Griewank Rastrigin Rosenbrock and Sphericalmdashthree other functions Schwefel 222 Schwefel 226 and SumofDifferent Power to compare our results with those reportedin [1] Schwefel 222 is unimodal and for Ω = [minus10 10]30the binary solution is (0 0) with 119891lowast = 0 Schwefel 226is multimodal and in Ω = [minus500 500]30 the binary solutionis (1 1 1) with 119891lowast = minus25244129544 Sum of DifferentPower is unimodal and in Ω = [minus1 1]30 the minimum is 0at (0 0) For the results of Table 5 we use HBFA basedon mCS with both ldquoerfrdquo function in (14) together with (10)and the floor function (15) The table reports on the average

Advances in Operations Research 9

Table 3 Comparison of mCS versus mBS and (14) versus (15) based on 119891avg nfe and nit

Prob mCS based on (14) mBS based on (14) mCS based on (15) mBS based on (15)119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 6787 16 888119890 minus 16 80 1 888119890 minus 16 827 11Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12911989001 4048 1002Griewank 00011989000 80 1 00011989000 7173 169 00011989000 80 1 00011989000 827 11Quartic 238119890 minus 01 813 103 466119890 minus 01 7947 189 948119890 minus 02 80 1 393119890 minus 01 80 1Rastrigin 00011989000 80 1 00011989000 7027 166 00011989000 80 1 00011989000 80 1Rosenbrock2 00011989000 64 06 00011989000 53 03 00011989000 63 06 233119890 minus 01 4708 1167Rosenbrock 00011989000 80 1 00011989000 1053 16 00011989000 80 1 29011989001 20040 500Schaffer 00011989000 68 07 00011989000 129 22 00011989000 51 03 708119890 minus 02 2051 503Spherical 00011989000 99 02 00011989000 227 18 00011989000 101 03 00011989000 115 04Step 30011989001 459 04 30011989001 629 1 30011989001 405 03 30011989001 405 03

Table 4 Comparison between Levy and Uniform distributions in the randomization term based on 119891avg nfe and nit (with StD inparentheses)

Prob mCS based on (14) + L mCS based on (14) + U mCS based on (15) + L mCS based on (15) + U119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 1096 264 888119890 minus 16 80 1 141e00 20040 500(00011989000) (00011989000) (00011989000) (126119890 minus 02)

Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12711989001 68 07(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (903119890 minus 15)

Griewank 00011989000 80 1 00011989000 2436 599 00011989000 80 1 127119890 minus 01 20040 500(00011989000) (00011989000) (00011989000) (276119890 minus 02)

Quartic 238119890 minus 01 813 103 69011989000 14692 3662 948119890 minus 02 80 1 510119890 minus 01 10581 2635(170119890 minus 01) (11611989001) (103119890 minus 01) (290119890 minus 01)

Rastrigin 00011989000 80 1 00011989000 1157 279 00011989000 80 1 100119890 minus 01 18104 4516(00011989000) (00011989000) (00011989000) (403119890 minus 01)

Rosenbrock2 00011989000 64 06 00011989000 368 82 00011989000 63 06 00011989000 59 05(00011989000) (00011989000) (00011989000) (00011989000)

Rosenbrock 00011989000 80 1 82211989001 14136 3524 00011989000 80 1 74211989001 17698 4412(00011989000) (10211989002) (00011989000) (84311989001)

Schaffer 00011989000 68 07 00011989000 185 36 00011989000 51 03 00011989000 56 04(00011989000) (00011989000) (00011989000) (00011989000)

Spherical 00011989000 99 02 00011989000 133 07 00011989000 101 03 00011989000 147 08(00011989000) (00011989000) (00011989000) (00011989000)

Step 30011989001 459 04 30011989001 469 05 30011989001 405 03 30011989001 523 06(00011989000) (00011989000) (00011989000) (00011989000)

Table 5 Comparison of HBFA (with mCS) with ABHS in [1] based on 119891avg nfe and SR ()

Prob mCS based on (14) mCS based on (15) ABHS in [1]119891avg nfe SR () 119891avg nfe SR () 119891avg nfe SR ()

Ackley 888119890 minus 16 80 100 888119890 minus 16 80 100 156119890 minus 01 62350 90

Griewank 00011989000 80 100 00011989000 80 100 330119890 minus 02 79758 38

Rastrigin 00011989000 80 100 00011989000 80 100 13211989001 90000 0

Rosenbrock 00011989000 80 100 00011989000 80 100 68011989002 90000 0

Schwefel 222 00011989000 80 100 00011989000 80 100 00011989000 59870 100

Schwefel 226 minus25211989001 80 100 minus24711989001 10867 87 minus119511989004 90000 0

Spherical 00011989000 80 100 00011989000 80 100 00011989000 62234 100

Sum of Different Power 00011989000 91 100 00011989000 168 100 00011989000 80371 100

10 Advances in Operations Research

Table 6 Results for varied dimensions (119899 = 50 100 200) considering119898 = 40

119891lowast 119899mCS based on (14) mCS based on (15)

119891avg StD nfe nit 119891avg StD nfe nit

Ackley00011989000 50 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 100 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 200 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

Griewank00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Quartic00011989000 + noise 50 224119890 minus 01 195119890 minus 01 827 11 143119890 minus 01 159119890 minus 01 80 1

00011989000 + noise 100 432119890 minus 01 273119890 minus 01 1467 27 173119890 minus 01 110119890 minus 01 80 1

00011989000 + noise 200 523119890 minus 01 294119890 minus 01 17387 425 196119890 minus 01 213119890 minus 01 813 103

Rosenbrock00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Spherical00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Step30011989002 50 30011989002 00011989000 80 1 30011989002 00011989000 80 1

60011989002 100 60011989002 00011989000 80 1 60011989002 00011989000 80 1

12011989003 200 12011989003 00011989000 80 1 12011989003 00011989000 80 1

function values average number of function evaluations andsuccess rate (SR) Here 50 independent runs were carriedout to compare with the results shown in [1] The maximumnumber of function evaluations therein used was 90000 Itis shown that our HBFA outperforms the proposed adaptivebinary harmony search (ABHS)

43 Effect of Problemrsquos Dimension on HBFA Performance Wenow consider six problems with varied dimensions from theprevious set to analyze the effect of problemrsquos dimension onthe HBFA performance We test three dimensions 119899 = 50119899 = 100 and 119899 = 200 The algorithmrsquos parameters areset as previously defined We remark that the size of thepopulation for all the tested problems and dimensions is 40points

Table 6 contains the results for comparison based onaveraged values of 119891 number of function evaluationsand number of iterations The ldquoStDrdquo of the 119891 values arealso displayed Since the implementation mCS shown inAlgorithm 2 performs better and shows more consistentresults than the other two we tested only mCS based on (14)and mCS based on (15)

Besides testing significant differences on the mean ranksproduced by the two treatments mCS based on (14) andmCSbased on (15) we also want to determine if the differences onmean ranks produced by problemrsquos dimensionmdash50 100 and200mdashare statistically significant at a significance level of 5Hence we aim to analyze the effects of two factors ldquoArdquo andldquoBrdquo ldquoArdquo is the HBFA implementation (with two levels) andldquoBrdquo is the problemrsquos dimension (with three levels) For thispurpose the results obtained for the six problems for each

combination of the levels of ldquoArdquo and ldquoBrdquo are considered asreplications When performing the Friedman test for factorldquoArdquo the chi-square statistical value is 1225 (119875 value = 02685)with 1 degree of freedom The critical value for a significancelevel of 5 and 1 degree of freedom in the 1205942 distributiontable is 384 and there is no evidence of statistically significantdifferences From the Friedman test for factor ldquoBrdquo we alsoconclude that there is no evidence of statistically significantdifferences since the chi-square statistical value is 0746 (119875value = 06886) with 2 degrees of freedom (The critical valueof the 1205942 distribution table for a significance level of 5 and2 degrees of freedom is 599) Hence we conclude that thedimension of the problem does not affect the algorithmrsquos per-formance Only with problem Quartic the efficiency of mCSbased on (14) getsworse as dimension increasesOverall bothtested strategies are rather effective when binary solutions arerequired on small as well as on large nonlinear optimizationproblems

44 Solving 0-1 Knapsack Problems Finally we aim to analyzethe behavior of our best tested strategies when solvingwell-known binary and linear optimization problems Forthis preliminary experiment we selected two small knap-sack problems The 0-1 knapsack problem (KP) can bedescribed as follows Let 119899 be the number of items fromwhich we have to select some of them to be carried in aknapsack Let 119908

119897and V

119897be the weight and the value of

item 119897 respectively and let 119882 be the knapsackrsquos capac-ity It is usually assumed that all weights and values arenonnegative The objective is to maximize the total value

Advances in Operations Research 11

of the knapsack under the constraint of the knapsackrsquoscapacity

max119909

119881 (119909) equiv119899

sum119897=1

V119897119909119897

st119899

sum119897=1

119908119897119909119897le 119882 119909

119897isin 0 1 119897 = 1 119899

(17)

If item 119897 is selected 119909119897= 1 otherwise 119909

119897= 0 Using a penalty

function this problem can be transformed into

min119909

minus119899

sum119897=1

V119897119909119897+ 120583max0

119899

sum119897=1

119908119897119909119897minus119882 (18)

where 120583 is the penalty parameter which was set to be 100 inthis experiment

Case 1 (an instance of a 0-1 KP with 4 items) Knapsackrsquoscapacity is 119882 = 6 and the vectors of values and weights areV = (40 15 20 10) and 119908 = (4 2 3 1) Based on the above-mentioned parameters the HBFA with mCS based on (14)was run 30 times and the averaged results were the followingWith a success rate of 100 items 1 and 2 are included in theknapsack and items 3 and 4 are excluded with a maximumvalue of 55 (StD = 00e00) On average the runs required08 iterations and 293 function evaluations With a successrate of 23 the heuristic based on the floor function thusmCS based on (15) reached 119891avg = 49 (StD = 40e00) afteran average of 61611 function evaluations and an average of3841 iterations

Case 2 (an instance of a 0-1 KP with 8 items) The maximumcapacity of the knapsack is set to 8 and the vectors ofvalues and weights are V = (83 14 54 79 72 52 48 62) and119908 = (3 2 3 2 1 2 2 3) The results are averaged over the 30runs After 87 iterations and 3867 function evaluations themaximum value produced by the strategy mCS based on (14)is 286 (StD = 00e00) with a success rate of 100 Items 14 5 and 6 are included in the knapsack and the others areexcluded The heuristic mCS based on (15) did not reach theoptimal solution All runs required 500 iterations and 20040function evaluations and the average function values were119891avg = 227 with StD = 314e01

5 Conclusions and Future Work

In this work we have implemented several heuristics tocompute a global optimal binary solution of bound con-strained nonlinear optimization problems which have beenincorporated into FA yielding the herein called HBFA Theproblems addressed in this study have bounded continu-ous search space Our FA proposal uses dynamic updatingschemes for two parameters 120574 from the attractiveness termand 120572 from the randomization term and considers the Levydistribution to create randomness in firefly movement Theperformance behavior of the proposed heuristics has beeninvestigated Three simple heuristics capable of transformingreal continuous variables into binary ones are implemented

A new sigmoid ldquoerfrdquo function is proposed In the context ofthe firefly algorithm three different implementations aimingto incorporate the heuristics for binary variables into FAare proposed (mCS mBS and pBC) Based on a set ofbenchmark problems a comparison is carried out with otherbinary dealing metaheuristics namely AMPSO binPSObinDE and AMDE The experimental results show that theimplementation denoted bymCSwhen combined with eitherthe new sigmoid ldquoerfrdquo function or the rounding schemebased on the floor function is quite efficient and superiorto the other methods in comparison The statistical analysiscarried out on the results shows evidence of statisticallysignificant differences on efficiency measured by the numberof function evaluations between the implementation mCSbased on the floor function approach and the mBS basedon both tested sigmoid functions schemes We have alsoinvestigated the effect of problemrsquos dimension on the perfor-mance of our algorithmUsing the Friedman statistical testweconclude that the differences on efficiency are not statisticallysignificant Another simple experiment has shown that theimplementation mCS with the sigmoid ldquoerfrdquo function iseffective in solving two small 0-1 KPThe performance of thissimple heuristic strategy will be further analyzed to solvelarge and multidimensional 0-1 KP Future developmentsconcerning the HBFA will consider its extension to dealwith integer variables in nonlinear optimization problemsDifferent heuristics to transform continuous real variablesinto integer variableswill be investigated Challengingmixed-integer nonconvex nonlinear problems will be solved

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors wish to thank two anonymous referees fortheir valuable suggestions to improve the paper This workhas been supported by FCT (Fundacao para a Ciencia eTecnologia Portugal) in the scope of the Projects PEst-OEMATUI00132014 and PEst-OEEEIUI03192014

References

[1] L Wang R Yang Y Xu Q Niu P M Pardalos and MFei ldquoAn improved adaptive binary harmony search algorithmrdquoInformation Sciences vol 232 pp 58ndash87 2013

[2] M A K Azad A M A C Rocha and E M G P FernandesldquoImproved binary artificial fish swarm algorithm for the 0-1multidimensional knapsack problemsrdquo Swarm and Evolution-ary Computation vol 14 pp 66ndash75 2014

[3] A P Engelbrecht andG Pampara ldquoBinary differential evolutionstrategiesrdquo in Proceedings of the IEEE Congress on EvolutionaryComputation (CEC rsquo07) pp 1942ndash1947 September 2007

[4] M H Kashan N Nahavandi and A H Kashan ldquoDisABC anew artificial bee colony algorithm for binary optimizationrdquoApplied Soft Computing Journal vol 12 no 1 pp 342ndash352 2012

12 Advances in Operations Research

[5] M H Kashan A H Kashan and N Nahavandi ldquoA noveldifferential evolution algorithm for binary optimizationrdquo Com-putational Optimization and Applications vol 55 no 2 pp 481ndash513 2013

[6] J Kennedy and R C Eberhart ldquoA discrete binary versionof the particle swarm algorithmrdquo in Proceedings of the IEEEInternational Conference on Systems Man and Cybernetics vol5 pp 4104ndash4108 Orlando Fla USA October 1997

[7] T Liu L Zhang and J Zhang ldquoStudy of binary artificialbee colony algorithm based on particle swarm optimizationrdquoJournal of Computational Information Systems vol 9 no 16 pp6459ndash6466 2013

[8] S Mirjalili and A Lewis ldquoS-shaped versus V-shaped transferfunctions for binary particle swarm optimizationrdquo Swarm andEvolutionary Computation vol 9 pp 1ndash14 2013

[9] G Pampara A P Engelbrecht and N Franken ldquoBinarydifferential evolutionrdquo in Proceedings of the IEEE Congress onEvolutionary Computation (CEC rsquo06) pp 1873ndash1879 VancouverCanada July 2006

[10] G Pampara and A P Engelbrecht ldquoBinary artificial bee colonyoptimizationrdquo in Proceedings of the IEEE Symposium on SwarmIntelligence (SIS rsquo11) pp 1ndash8 IEEE Perth April 2011

[11] S Burer and A N Letchford ldquoNon-convex mixed-integer non-linear programming a surveyrdquo Surveys in Operations Researchand Management Science vol 17 no 2 pp 97ndash106 2012

[12] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Proceedings of the Stochastic Algorithms Foundations andApplications (SAGA rsquo09) O Watanabe and T Zeugmann Edsvol 5792 of Lecture Notes in Computer Science pp 169ndash1782009

[13] X-S Yang ldquoFirefly algorithm stochastic test functions anddesign optimizationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[14] I Fister Jr X-S Yang and J Brest ldquoA comprehensive review offirefly algorithmsrdquo Swarm and Evolutionary Computation vol13 pp 34ndash46 2013

[15] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[16] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoA Gaussian firefly algorithmrdquo International Journal of MachineLearning and Computing vol 1 no 5 pp 448ndash453 2011

[17] L Guo G-G Wang H Wang and D Wang ldquoAn effectivehybrid firefly algorithmwith harmony search for global numer-ical optimizationrdquoTheScientificWorld Journal vol 2013 ArticleID 125625 9 pages 2013

[18] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoSome hybrid models to improve firefly algorithm perfor-mancerdquo International Journal of Artificial Intelligence vol 8 no12 pp 97ndash117 2012

[19] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 467631 12pages 2012

[20] X Lin Y Zhong and H Zhang ldquoAn enhanced firefly algorithmfor function optimisation problemsrdquo International Journal ofModelling Identification and Control vol 18 no 2 pp 166ndash1732013

[21] A Manju and M J Nigam ldquoFirefly algorithm with fireflieshaving quantum behaviorrdquo in Proceedings of the InternationalConference on Radar Communication and Computing (ICRCCrsquo12) pp 117ndash119 IEEE Tiruvannamalai India December 2012

[22] X-S Yang and X He ldquoFirefly algorithm recent advances andapplicationsrdquo International Journal of Swarm Intelligence vol 1no 1 pp 36ndash50 2013

[23] S Arora and S Singh ldquoThe firefly optimization algorithmconvergence analysis and parameter selectionrdquo InternationalJournal of Computer Applications vol 69 no 3 pp 48ndash52 2013

[24] X-S Yang S S S Hosseini and A H Gandomi ldquoFireflyalgorithm for solving non-convex economic dispatch problemswith valve loading effectrdquo Applied Soft Computing Journal vol12 no 3 pp 1180ndash1186 2012

[25] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using firefly algorithmrdquo Computers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[26] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering with Computers vol 29 no 2 pp175ndash184 2013

[27] A N Kumbharana and G M Pandey ldquoSolving travellingsalesman problemusing firefly algorithmrdquo International Journalfor Research in ScienceampAdvanced Technologies vol 2 no 2 pp53ndash57 2013

[28] M K Sayadi A Hafezalkotob and S G J Naini ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[29] X-S Yang ldquoFirefly algorithmrdquo inNature-InspiredMetaheuristicAlgorithms pp 81ndash96 Luniver Press University of CambridgeCambridge UK 2nd edition 2010

[30] A R Jordehi and J Jasni ldquoParameter selection in particle swarmoptimisation a surveyrdquo Journal of Experimental amp TheoreticalArtificial Intelligence vol 25 no 4 pp 527ndash542 2013

[31] M Mahdavi M Fesanghary and E Damangir ldquoAn improvedharmony search algorithm for solving optimization problemsrdquoAppliedMathematics and Computation vol 188 no 2 pp 1567ndash1579 2007

[32] M Padberg ldquoHarmony search algorithms for binary optimiza-tion problemsrdquo in Operations Research Proceedings 2011 pp343ndash348 Springer Berlin Germany 2012

[33] M A K Azad A M A C Rocha and E M G P FernandesldquoA simplified binary artificial fish swarm algorithm for unca-pacitated facility location problemsrdquo in Proceedings of WorldCongress on Engineering S I Ao L Gelman D W L HukinsA Hunter and A M Korsunsky Eds vol 1 pp 31ndash36 IAENGLondon UK 2013

[34] M Sevkli and A R Guner ldquoA continuous particle swarm opti-mization algorithm for uncapacitated facility location problemrdquoin Ant Colony Optimization and Swarm Intelligence M DorigoL M Gambardella M Birattari A Martinoli R Poli and TStutzle Eds vol 4150 of Lecture Notes in Computer Sciencespp 316ndash323 Springer 2006

[35] L Wang and C Singh ldquoUnit commitment considering genera-tor outages through a mixed-integer particle swarm optimiza-tion algorithmrdquoApplied SoftComputing Journal vol 9 no 3 pp947ndash953 2009

[36] MM Ali C Khompatraporn and Z B Zabinsky ldquoA numericalevaluation of several stochastic algorithms on selected con-tinuous global optimization test problemsrdquo Journal of GlobalOptimization vol 31 no 4 pp 635ndash672 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 9: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

Advances in Operations Research 9

Table 3 Comparison of mCS versus mBS and (14) versus (15) based on 119891avg nfe and nit

Prob mCS based on (14) mBS based on (14) mCS based on (15) mBS based on (15)119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 6787 16 888119890 minus 16 80 1 888119890 minus 16 827 11Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12911989001 4048 1002Griewank 00011989000 80 1 00011989000 7173 169 00011989000 80 1 00011989000 827 11Quartic 238119890 minus 01 813 103 466119890 minus 01 7947 189 948119890 minus 02 80 1 393119890 minus 01 80 1Rastrigin 00011989000 80 1 00011989000 7027 166 00011989000 80 1 00011989000 80 1Rosenbrock2 00011989000 64 06 00011989000 53 03 00011989000 63 06 233119890 minus 01 4708 1167Rosenbrock 00011989000 80 1 00011989000 1053 16 00011989000 80 1 29011989001 20040 500Schaffer 00011989000 68 07 00011989000 129 22 00011989000 51 03 708119890 minus 02 2051 503Spherical 00011989000 99 02 00011989000 227 18 00011989000 101 03 00011989000 115 04Step 30011989001 459 04 30011989001 629 1 30011989001 405 03 30011989001 405 03

Table 4 Comparison between Levy and Uniform distributions in the randomization term based on 119891avg nfe and nit (with StD inparentheses)

Prob mCS based on (14) + L mCS based on (14) + U mCS based on (15) + L mCS based on (15) + U119891avg nfe nit 119891avg nfe nit 119891avg nfe nit 119891avg nfe nit

Ackley 888119890 minus 16 80 1 888119890 minus 16 1096 264 888119890 minus 16 80 1 141e00 20040 500(00011989000) (00011989000) (00011989000) (126119890 minus 02)

Foxholes 12711989001 57 04 12711989001 8 1 12711989001 61 05 12711989001 68 07(903119890 minus 15) (903119890 minus 15) (903119890 minus 15) (903119890 minus 15)

Griewank 00011989000 80 1 00011989000 2436 599 00011989000 80 1 127119890 minus 01 20040 500(00011989000) (00011989000) (00011989000) (276119890 minus 02)

Quartic 238119890 minus 01 813 103 69011989000 14692 3662 948119890 minus 02 80 1 510119890 minus 01 10581 2635(170119890 minus 01) (11611989001) (103119890 minus 01) (290119890 minus 01)

Rastrigin 00011989000 80 1 00011989000 1157 279 00011989000 80 1 100119890 minus 01 18104 4516(00011989000) (00011989000) (00011989000) (403119890 minus 01)

Rosenbrock2 00011989000 64 06 00011989000 368 82 00011989000 63 06 00011989000 59 05(00011989000) (00011989000) (00011989000) (00011989000)

Rosenbrock 00011989000 80 1 82211989001 14136 3524 00011989000 80 1 74211989001 17698 4412(00011989000) (10211989002) (00011989000) (84311989001)

Schaffer 00011989000 68 07 00011989000 185 36 00011989000 51 03 00011989000 56 04(00011989000) (00011989000) (00011989000) (00011989000)

Spherical 00011989000 99 02 00011989000 133 07 00011989000 101 03 00011989000 147 08(00011989000) (00011989000) (00011989000) (00011989000)

Step 30011989001 459 04 30011989001 469 05 30011989001 405 03 30011989001 523 06(00011989000) (00011989000) (00011989000) (00011989000)

Table 5 Comparison of HBFA (with mCS) with ABHS in [1] based on 119891avg nfe and SR ()

Prob mCS based on (14) mCS based on (15) ABHS in [1]119891avg nfe SR () 119891avg nfe SR () 119891avg nfe SR ()

Ackley 888119890 minus 16 80 100 888119890 minus 16 80 100 156119890 minus 01 62350 90

Griewank 00011989000 80 100 00011989000 80 100 330119890 minus 02 79758 38

Rastrigin 00011989000 80 100 00011989000 80 100 13211989001 90000 0

Rosenbrock 00011989000 80 100 00011989000 80 100 68011989002 90000 0

Schwefel 222 00011989000 80 100 00011989000 80 100 00011989000 59870 100

Schwefel 226 minus25211989001 80 100 minus24711989001 10867 87 minus119511989004 90000 0

Spherical 00011989000 80 100 00011989000 80 100 00011989000 62234 100

Sum of Different Power 00011989000 91 100 00011989000 168 100 00011989000 80371 100

10 Advances in Operations Research

Table 6 Results for varied dimensions (119899 = 50 100 200) considering119898 = 40

119891lowast 119899mCS based on (14) mCS based on (15)

119891avg StD nfe nit 119891avg StD nfe nit

Ackley00011989000 50 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 100 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 200 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

Griewank00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Quartic00011989000 + noise 50 224119890 minus 01 195119890 minus 01 827 11 143119890 minus 01 159119890 minus 01 80 1

00011989000 + noise 100 432119890 minus 01 273119890 minus 01 1467 27 173119890 minus 01 110119890 minus 01 80 1

00011989000 + noise 200 523119890 minus 01 294119890 minus 01 17387 425 196119890 minus 01 213119890 minus 01 813 103

Rosenbrock00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Spherical00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Step30011989002 50 30011989002 00011989000 80 1 30011989002 00011989000 80 1

60011989002 100 60011989002 00011989000 80 1 60011989002 00011989000 80 1

12011989003 200 12011989003 00011989000 80 1 12011989003 00011989000 80 1

function values average number of function evaluations andsuccess rate (SR) Here 50 independent runs were carriedout to compare with the results shown in [1] The maximumnumber of function evaluations therein used was 90000 Itis shown that our HBFA outperforms the proposed adaptivebinary harmony search (ABHS)

43 Effect of Problemrsquos Dimension on HBFA Performance Wenow consider six problems with varied dimensions from theprevious set to analyze the effect of problemrsquos dimension onthe HBFA performance We test three dimensions 119899 = 50119899 = 100 and 119899 = 200 The algorithmrsquos parameters areset as previously defined We remark that the size of thepopulation for all the tested problems and dimensions is 40points

Table 6 contains the results for comparison based onaveraged values of 119891 number of function evaluationsand number of iterations The ldquoStDrdquo of the 119891 values arealso displayed Since the implementation mCS shown inAlgorithm 2 performs better and shows more consistentresults than the other two we tested only mCS based on (14)and mCS based on (15)

Besides testing significant differences on the mean ranksproduced by the two treatments mCS based on (14) andmCSbased on (15) we also want to determine if the differences onmean ranks produced by problemrsquos dimensionmdash50 100 and200mdashare statistically significant at a significance level of 5Hence we aim to analyze the effects of two factors ldquoArdquo andldquoBrdquo ldquoArdquo is the HBFA implementation (with two levels) andldquoBrdquo is the problemrsquos dimension (with three levels) For thispurpose the results obtained for the six problems for each

combination of the levels of ldquoArdquo and ldquoBrdquo are considered asreplications When performing the Friedman test for factorldquoArdquo the chi-square statistical value is 1225 (119875 value = 02685)with 1 degree of freedom The critical value for a significancelevel of 5 and 1 degree of freedom in the 1205942 distributiontable is 384 and there is no evidence of statistically significantdifferences From the Friedman test for factor ldquoBrdquo we alsoconclude that there is no evidence of statistically significantdifferences since the chi-square statistical value is 0746 (119875value = 06886) with 2 degrees of freedom (The critical valueof the 1205942 distribution table for a significance level of 5 and2 degrees of freedom is 599) Hence we conclude that thedimension of the problem does not affect the algorithmrsquos per-formance Only with problem Quartic the efficiency of mCSbased on (14) getsworse as dimension increasesOverall bothtested strategies are rather effective when binary solutions arerequired on small as well as on large nonlinear optimizationproblems

44 Solving 0-1 Knapsack Problems Finally we aim to analyzethe behavior of our best tested strategies when solvingwell-known binary and linear optimization problems Forthis preliminary experiment we selected two small knap-sack problems The 0-1 knapsack problem (KP) can bedescribed as follows Let 119899 be the number of items fromwhich we have to select some of them to be carried in aknapsack Let 119908

119897and V

119897be the weight and the value of

item 119897 respectively and let 119882 be the knapsackrsquos capac-ity It is usually assumed that all weights and values arenonnegative The objective is to maximize the total value

Advances in Operations Research 11

of the knapsack under the constraint of the knapsackrsquoscapacity

max119909

119881 (119909) equiv119899

sum119897=1

V119897119909119897

st119899

sum119897=1

119908119897119909119897le 119882 119909

119897isin 0 1 119897 = 1 119899

(17)

If item 119897 is selected 119909119897= 1 otherwise 119909

119897= 0 Using a penalty

function this problem can be transformed into

min119909

minus119899

sum119897=1

V119897119909119897+ 120583max0

119899

sum119897=1

119908119897119909119897minus119882 (18)

where 120583 is the penalty parameter which was set to be 100 inthis experiment

Case 1 (an instance of a 0-1 KP with 4 items) Knapsackrsquoscapacity is 119882 = 6 and the vectors of values and weights areV = (40 15 20 10) and 119908 = (4 2 3 1) Based on the above-mentioned parameters the HBFA with mCS based on (14)was run 30 times and the averaged results were the followingWith a success rate of 100 items 1 and 2 are included in theknapsack and items 3 and 4 are excluded with a maximumvalue of 55 (StD = 00e00) On average the runs required08 iterations and 293 function evaluations With a successrate of 23 the heuristic based on the floor function thusmCS based on (15) reached 119891avg = 49 (StD = 40e00) afteran average of 61611 function evaluations and an average of3841 iterations

Case 2 (an instance of a 0-1 KP with 8 items) The maximumcapacity of the knapsack is set to 8 and the vectors ofvalues and weights are V = (83 14 54 79 72 52 48 62) and119908 = (3 2 3 2 1 2 2 3) The results are averaged over the 30runs After 87 iterations and 3867 function evaluations themaximum value produced by the strategy mCS based on (14)is 286 (StD = 00e00) with a success rate of 100 Items 14 5 and 6 are included in the knapsack and the others areexcluded The heuristic mCS based on (15) did not reach theoptimal solution All runs required 500 iterations and 20040function evaluations and the average function values were119891avg = 227 with StD = 314e01

5 Conclusions and Future Work

In this work we have implemented several heuristics tocompute a global optimal binary solution of bound con-strained nonlinear optimization problems which have beenincorporated into FA yielding the herein called HBFA Theproblems addressed in this study have bounded continu-ous search space Our FA proposal uses dynamic updatingschemes for two parameters 120574 from the attractiveness termand 120572 from the randomization term and considers the Levydistribution to create randomness in firefly movement Theperformance behavior of the proposed heuristics has beeninvestigated Three simple heuristics capable of transformingreal continuous variables into binary ones are implemented

A new sigmoid ldquoerfrdquo function is proposed In the context ofthe firefly algorithm three different implementations aimingto incorporate the heuristics for binary variables into FAare proposed (mCS mBS and pBC) Based on a set ofbenchmark problems a comparison is carried out with otherbinary dealing metaheuristics namely AMPSO binPSObinDE and AMDE The experimental results show that theimplementation denoted bymCSwhen combined with eitherthe new sigmoid ldquoerfrdquo function or the rounding schemebased on the floor function is quite efficient and superiorto the other methods in comparison The statistical analysiscarried out on the results shows evidence of statisticallysignificant differences on efficiency measured by the numberof function evaluations between the implementation mCSbased on the floor function approach and the mBS basedon both tested sigmoid functions schemes We have alsoinvestigated the effect of problemrsquos dimension on the perfor-mance of our algorithmUsing the Friedman statistical testweconclude that the differences on efficiency are not statisticallysignificant Another simple experiment has shown that theimplementation mCS with the sigmoid ldquoerfrdquo function iseffective in solving two small 0-1 KPThe performance of thissimple heuristic strategy will be further analyzed to solvelarge and multidimensional 0-1 KP Future developmentsconcerning the HBFA will consider its extension to dealwith integer variables in nonlinear optimization problemsDifferent heuristics to transform continuous real variablesinto integer variableswill be investigated Challengingmixed-integer nonconvex nonlinear problems will be solved

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors wish to thank two anonymous referees fortheir valuable suggestions to improve the paper This workhas been supported by FCT (Fundacao para a Ciencia eTecnologia Portugal) in the scope of the Projects PEst-OEMATUI00132014 and PEst-OEEEIUI03192014

References

[1] L Wang R Yang Y Xu Q Niu P M Pardalos and MFei ldquoAn improved adaptive binary harmony search algorithmrdquoInformation Sciences vol 232 pp 58ndash87 2013

[2] M A K Azad A M A C Rocha and E M G P FernandesldquoImproved binary artificial fish swarm algorithm for the 0-1multidimensional knapsack problemsrdquo Swarm and Evolution-ary Computation vol 14 pp 66ndash75 2014

[3] A P Engelbrecht andG Pampara ldquoBinary differential evolutionstrategiesrdquo in Proceedings of the IEEE Congress on EvolutionaryComputation (CEC rsquo07) pp 1942ndash1947 September 2007

[4] M H Kashan N Nahavandi and A H Kashan ldquoDisABC anew artificial bee colony algorithm for binary optimizationrdquoApplied Soft Computing Journal vol 12 no 1 pp 342ndash352 2012

12 Advances in Operations Research

[5] M H Kashan A H Kashan and N Nahavandi ldquoA noveldifferential evolution algorithm for binary optimizationrdquo Com-putational Optimization and Applications vol 55 no 2 pp 481ndash513 2013

[6] J Kennedy and R C Eberhart ldquoA discrete binary versionof the particle swarm algorithmrdquo in Proceedings of the IEEEInternational Conference on Systems Man and Cybernetics vol5 pp 4104ndash4108 Orlando Fla USA October 1997

[7] T Liu L Zhang and J Zhang ldquoStudy of binary artificialbee colony algorithm based on particle swarm optimizationrdquoJournal of Computational Information Systems vol 9 no 16 pp6459ndash6466 2013

[8] S Mirjalili and A Lewis ldquoS-shaped versus V-shaped transferfunctions for binary particle swarm optimizationrdquo Swarm andEvolutionary Computation vol 9 pp 1ndash14 2013

[9] G Pampara A P Engelbrecht and N Franken ldquoBinarydifferential evolutionrdquo in Proceedings of the IEEE Congress onEvolutionary Computation (CEC rsquo06) pp 1873ndash1879 VancouverCanada July 2006

[10] G Pampara and A P Engelbrecht ldquoBinary artificial bee colonyoptimizationrdquo in Proceedings of the IEEE Symposium on SwarmIntelligence (SIS rsquo11) pp 1ndash8 IEEE Perth April 2011

[11] S Burer and A N Letchford ldquoNon-convex mixed-integer non-linear programming a surveyrdquo Surveys in Operations Researchand Management Science vol 17 no 2 pp 97ndash106 2012

[12] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Proceedings of the Stochastic Algorithms Foundations andApplications (SAGA rsquo09) O Watanabe and T Zeugmann Edsvol 5792 of Lecture Notes in Computer Science pp 169ndash1782009

[13] X-S Yang ldquoFirefly algorithm stochastic test functions anddesign optimizationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[14] I Fister Jr X-S Yang and J Brest ldquoA comprehensive review offirefly algorithmsrdquo Swarm and Evolutionary Computation vol13 pp 34ndash46 2013

[15] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[16] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoA Gaussian firefly algorithmrdquo International Journal of MachineLearning and Computing vol 1 no 5 pp 448ndash453 2011

[17] L Guo G-G Wang H Wang and D Wang ldquoAn effectivehybrid firefly algorithmwith harmony search for global numer-ical optimizationrdquoTheScientificWorld Journal vol 2013 ArticleID 125625 9 pages 2013

[18] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoSome hybrid models to improve firefly algorithm perfor-mancerdquo International Journal of Artificial Intelligence vol 8 no12 pp 97ndash117 2012

[19] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 467631 12pages 2012

[20] X Lin Y Zhong and H Zhang ldquoAn enhanced firefly algorithmfor function optimisation problemsrdquo International Journal ofModelling Identification and Control vol 18 no 2 pp 166ndash1732013

[21] A Manju and M J Nigam ldquoFirefly algorithm with fireflieshaving quantum behaviorrdquo in Proceedings of the InternationalConference on Radar Communication and Computing (ICRCCrsquo12) pp 117ndash119 IEEE Tiruvannamalai India December 2012

[22] X-S Yang and X He ldquoFirefly algorithm recent advances andapplicationsrdquo International Journal of Swarm Intelligence vol 1no 1 pp 36ndash50 2013

[23] S Arora and S Singh ldquoThe firefly optimization algorithmconvergence analysis and parameter selectionrdquo InternationalJournal of Computer Applications vol 69 no 3 pp 48ndash52 2013

[24] X-S Yang S S S Hosseini and A H Gandomi ldquoFireflyalgorithm for solving non-convex economic dispatch problemswith valve loading effectrdquo Applied Soft Computing Journal vol12 no 3 pp 1180ndash1186 2012

[25] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using firefly algorithmrdquo Computers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[26] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering with Computers vol 29 no 2 pp175ndash184 2013

[27] A N Kumbharana and G M Pandey ldquoSolving travellingsalesman problemusing firefly algorithmrdquo International Journalfor Research in ScienceampAdvanced Technologies vol 2 no 2 pp53ndash57 2013

[28] M K Sayadi A Hafezalkotob and S G J Naini ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[29] X-S Yang ldquoFirefly algorithmrdquo inNature-InspiredMetaheuristicAlgorithms pp 81ndash96 Luniver Press University of CambridgeCambridge UK 2nd edition 2010

[30] A R Jordehi and J Jasni ldquoParameter selection in particle swarmoptimisation a surveyrdquo Journal of Experimental amp TheoreticalArtificial Intelligence vol 25 no 4 pp 527ndash542 2013

[31] M Mahdavi M Fesanghary and E Damangir ldquoAn improvedharmony search algorithm for solving optimization problemsrdquoAppliedMathematics and Computation vol 188 no 2 pp 1567ndash1579 2007

[32] M Padberg ldquoHarmony search algorithms for binary optimiza-tion problemsrdquo in Operations Research Proceedings 2011 pp343ndash348 Springer Berlin Germany 2012

[33] M A K Azad A M A C Rocha and E M G P FernandesldquoA simplified binary artificial fish swarm algorithm for unca-pacitated facility location problemsrdquo in Proceedings of WorldCongress on Engineering S I Ao L Gelman D W L HukinsA Hunter and A M Korsunsky Eds vol 1 pp 31ndash36 IAENGLondon UK 2013

[34] M Sevkli and A R Guner ldquoA continuous particle swarm opti-mization algorithm for uncapacitated facility location problemrdquoin Ant Colony Optimization and Swarm Intelligence M DorigoL M Gambardella M Birattari A Martinoli R Poli and TStutzle Eds vol 4150 of Lecture Notes in Computer Sciencespp 316ndash323 Springer 2006

[35] L Wang and C Singh ldquoUnit commitment considering genera-tor outages through a mixed-integer particle swarm optimiza-tion algorithmrdquoApplied SoftComputing Journal vol 9 no 3 pp947ndash953 2009

[36] MM Ali C Khompatraporn and Z B Zabinsky ldquoA numericalevaluation of several stochastic algorithms on selected con-tinuous global optimization test problemsrdquo Journal of GlobalOptimization vol 31 no 4 pp 635ndash672 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 10: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

10 Advances in Operations Research

Table 6 Results for varied dimensions (119899 = 50 100 200) considering119898 = 40

119891lowast 119899mCS based on (14) mCS based on (15)

119891avg StD nfe nit 119891avg StD nfe nit

Ackley00011989000 50 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 100 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

00011989000 200 888119890 minus 16 00011989000 80 1 888119890 minus 16 00011989000 80 1

Griewank00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Quartic00011989000 + noise 50 224119890 minus 01 195119890 minus 01 827 11 143119890 minus 01 159119890 minus 01 80 1

00011989000 + noise 100 432119890 minus 01 273119890 minus 01 1467 27 173119890 minus 01 110119890 minus 01 80 1

00011989000 + noise 200 523119890 minus 01 294119890 minus 01 17387 425 196119890 minus 01 213119890 minus 01 813 103

Rosenbrock00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Spherical00011989000 50 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 100 00011989000 00011989000 80 1 00011989000 00011989000 80 1

00011989000 200 00011989000 00011989000 80 1 00011989000 00011989000 80 1

Step30011989002 50 30011989002 00011989000 80 1 30011989002 00011989000 80 1

60011989002 100 60011989002 00011989000 80 1 60011989002 00011989000 80 1

12011989003 200 12011989003 00011989000 80 1 12011989003 00011989000 80 1

function values average number of function evaluations andsuccess rate (SR) Here 50 independent runs were carriedout to compare with the results shown in [1] The maximumnumber of function evaluations therein used was 90000 Itis shown that our HBFA outperforms the proposed adaptivebinary harmony search (ABHS)

43 Effect of Problemrsquos Dimension on HBFA Performance Wenow consider six problems with varied dimensions from theprevious set to analyze the effect of problemrsquos dimension onthe HBFA performance We test three dimensions 119899 = 50119899 = 100 and 119899 = 200 The algorithmrsquos parameters areset as previously defined We remark that the size of thepopulation for all the tested problems and dimensions is 40points

Table 6 contains the results for comparison based onaveraged values of 119891 number of function evaluationsand number of iterations The ldquoStDrdquo of the 119891 values arealso displayed Since the implementation mCS shown inAlgorithm 2 performs better and shows more consistentresults than the other two we tested only mCS based on (14)and mCS based on (15)

Besides testing significant differences on the mean ranksproduced by the two treatments mCS based on (14) andmCSbased on (15) we also want to determine if the differences onmean ranks produced by problemrsquos dimensionmdash50 100 and200mdashare statistically significant at a significance level of 5Hence we aim to analyze the effects of two factors ldquoArdquo andldquoBrdquo ldquoArdquo is the HBFA implementation (with two levels) andldquoBrdquo is the problemrsquos dimension (with three levels) For thispurpose the results obtained for the six problems for each

combination of the levels of ldquoArdquo and ldquoBrdquo are considered asreplications When performing the Friedman test for factorldquoArdquo the chi-square statistical value is 1225 (119875 value = 02685)with 1 degree of freedom The critical value for a significancelevel of 5 and 1 degree of freedom in the 1205942 distributiontable is 384 and there is no evidence of statistically significantdifferences From the Friedman test for factor ldquoBrdquo we alsoconclude that there is no evidence of statistically significantdifferences since the chi-square statistical value is 0746 (119875value = 06886) with 2 degrees of freedom (The critical valueof the 1205942 distribution table for a significance level of 5 and2 degrees of freedom is 599) Hence we conclude that thedimension of the problem does not affect the algorithmrsquos per-formance Only with problem Quartic the efficiency of mCSbased on (14) getsworse as dimension increasesOverall bothtested strategies are rather effective when binary solutions arerequired on small as well as on large nonlinear optimizationproblems

44 Solving 0-1 Knapsack Problems Finally we aim to analyzethe behavior of our best tested strategies when solvingwell-known binary and linear optimization problems Forthis preliminary experiment we selected two small knap-sack problems The 0-1 knapsack problem (KP) can bedescribed as follows Let 119899 be the number of items fromwhich we have to select some of them to be carried in aknapsack Let 119908

119897and V

119897be the weight and the value of

item 119897 respectively and let 119882 be the knapsackrsquos capac-ity It is usually assumed that all weights and values arenonnegative The objective is to maximize the total value

Advances in Operations Research 11

of the knapsack under the constraint of the knapsackrsquoscapacity

max119909

119881 (119909) equiv119899

sum119897=1

V119897119909119897

st119899

sum119897=1

119908119897119909119897le 119882 119909

119897isin 0 1 119897 = 1 119899

(17)

If item 119897 is selected 119909119897= 1 otherwise 119909

119897= 0 Using a penalty

function this problem can be transformed into

min119909

minus119899

sum119897=1

V119897119909119897+ 120583max0

119899

sum119897=1

119908119897119909119897minus119882 (18)

where 120583 is the penalty parameter which was set to be 100 inthis experiment

Case 1 (an instance of a 0-1 KP with 4 items) Knapsackrsquoscapacity is 119882 = 6 and the vectors of values and weights areV = (40 15 20 10) and 119908 = (4 2 3 1) Based on the above-mentioned parameters the HBFA with mCS based on (14)was run 30 times and the averaged results were the followingWith a success rate of 100 items 1 and 2 are included in theknapsack and items 3 and 4 are excluded with a maximumvalue of 55 (StD = 00e00) On average the runs required08 iterations and 293 function evaluations With a successrate of 23 the heuristic based on the floor function thusmCS based on (15) reached 119891avg = 49 (StD = 40e00) afteran average of 61611 function evaluations and an average of3841 iterations

Case 2 (an instance of a 0-1 KP with 8 items) The maximumcapacity of the knapsack is set to 8 and the vectors ofvalues and weights are V = (83 14 54 79 72 52 48 62) and119908 = (3 2 3 2 1 2 2 3) The results are averaged over the 30runs After 87 iterations and 3867 function evaluations themaximum value produced by the strategy mCS based on (14)is 286 (StD = 00e00) with a success rate of 100 Items 14 5 and 6 are included in the knapsack and the others areexcluded The heuristic mCS based on (15) did not reach theoptimal solution All runs required 500 iterations and 20040function evaluations and the average function values were119891avg = 227 with StD = 314e01

5 Conclusions and Future Work

In this work we have implemented several heuristics tocompute a global optimal binary solution of bound con-strained nonlinear optimization problems which have beenincorporated into FA yielding the herein called HBFA Theproblems addressed in this study have bounded continu-ous search space Our FA proposal uses dynamic updatingschemes for two parameters 120574 from the attractiveness termand 120572 from the randomization term and considers the Levydistribution to create randomness in firefly movement Theperformance behavior of the proposed heuristics has beeninvestigated Three simple heuristics capable of transformingreal continuous variables into binary ones are implemented

A new sigmoid ldquoerfrdquo function is proposed In the context ofthe firefly algorithm three different implementations aimingto incorporate the heuristics for binary variables into FAare proposed (mCS mBS and pBC) Based on a set ofbenchmark problems a comparison is carried out with otherbinary dealing metaheuristics namely AMPSO binPSObinDE and AMDE The experimental results show that theimplementation denoted bymCSwhen combined with eitherthe new sigmoid ldquoerfrdquo function or the rounding schemebased on the floor function is quite efficient and superiorto the other methods in comparison The statistical analysiscarried out on the results shows evidence of statisticallysignificant differences on efficiency measured by the numberof function evaluations between the implementation mCSbased on the floor function approach and the mBS basedon both tested sigmoid functions schemes We have alsoinvestigated the effect of problemrsquos dimension on the perfor-mance of our algorithmUsing the Friedman statistical testweconclude that the differences on efficiency are not statisticallysignificant Another simple experiment has shown that theimplementation mCS with the sigmoid ldquoerfrdquo function iseffective in solving two small 0-1 KPThe performance of thissimple heuristic strategy will be further analyzed to solvelarge and multidimensional 0-1 KP Future developmentsconcerning the HBFA will consider its extension to dealwith integer variables in nonlinear optimization problemsDifferent heuristics to transform continuous real variablesinto integer variableswill be investigated Challengingmixed-integer nonconvex nonlinear problems will be solved

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors wish to thank two anonymous referees fortheir valuable suggestions to improve the paper This workhas been supported by FCT (Fundacao para a Ciencia eTecnologia Portugal) in the scope of the Projects PEst-OEMATUI00132014 and PEst-OEEEIUI03192014

References

[1] L Wang R Yang Y Xu Q Niu P M Pardalos and MFei ldquoAn improved adaptive binary harmony search algorithmrdquoInformation Sciences vol 232 pp 58ndash87 2013

[2] M A K Azad A M A C Rocha and E M G P FernandesldquoImproved binary artificial fish swarm algorithm for the 0-1multidimensional knapsack problemsrdquo Swarm and Evolution-ary Computation vol 14 pp 66ndash75 2014

[3] A P Engelbrecht andG Pampara ldquoBinary differential evolutionstrategiesrdquo in Proceedings of the IEEE Congress on EvolutionaryComputation (CEC rsquo07) pp 1942ndash1947 September 2007

[4] M H Kashan N Nahavandi and A H Kashan ldquoDisABC anew artificial bee colony algorithm for binary optimizationrdquoApplied Soft Computing Journal vol 12 no 1 pp 342ndash352 2012

12 Advances in Operations Research

[5] M H Kashan A H Kashan and N Nahavandi ldquoA noveldifferential evolution algorithm for binary optimizationrdquo Com-putational Optimization and Applications vol 55 no 2 pp 481ndash513 2013

[6] J Kennedy and R C Eberhart ldquoA discrete binary versionof the particle swarm algorithmrdquo in Proceedings of the IEEEInternational Conference on Systems Man and Cybernetics vol5 pp 4104ndash4108 Orlando Fla USA October 1997

[7] T Liu L Zhang and J Zhang ldquoStudy of binary artificialbee colony algorithm based on particle swarm optimizationrdquoJournal of Computational Information Systems vol 9 no 16 pp6459ndash6466 2013

[8] S Mirjalili and A Lewis ldquoS-shaped versus V-shaped transferfunctions for binary particle swarm optimizationrdquo Swarm andEvolutionary Computation vol 9 pp 1ndash14 2013

[9] G Pampara A P Engelbrecht and N Franken ldquoBinarydifferential evolutionrdquo in Proceedings of the IEEE Congress onEvolutionary Computation (CEC rsquo06) pp 1873ndash1879 VancouverCanada July 2006

[10] G Pampara and A P Engelbrecht ldquoBinary artificial bee colonyoptimizationrdquo in Proceedings of the IEEE Symposium on SwarmIntelligence (SIS rsquo11) pp 1ndash8 IEEE Perth April 2011

[11] S Burer and A N Letchford ldquoNon-convex mixed-integer non-linear programming a surveyrdquo Surveys in Operations Researchand Management Science vol 17 no 2 pp 97ndash106 2012

[12] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Proceedings of the Stochastic Algorithms Foundations andApplications (SAGA rsquo09) O Watanabe and T Zeugmann Edsvol 5792 of Lecture Notes in Computer Science pp 169ndash1782009

[13] X-S Yang ldquoFirefly algorithm stochastic test functions anddesign optimizationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[14] I Fister Jr X-S Yang and J Brest ldquoA comprehensive review offirefly algorithmsrdquo Swarm and Evolutionary Computation vol13 pp 34ndash46 2013

[15] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[16] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoA Gaussian firefly algorithmrdquo International Journal of MachineLearning and Computing vol 1 no 5 pp 448ndash453 2011

[17] L Guo G-G Wang H Wang and D Wang ldquoAn effectivehybrid firefly algorithmwith harmony search for global numer-ical optimizationrdquoTheScientificWorld Journal vol 2013 ArticleID 125625 9 pages 2013

[18] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoSome hybrid models to improve firefly algorithm perfor-mancerdquo International Journal of Artificial Intelligence vol 8 no12 pp 97ndash117 2012

[19] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 467631 12pages 2012

[20] X Lin Y Zhong and H Zhang ldquoAn enhanced firefly algorithmfor function optimisation problemsrdquo International Journal ofModelling Identification and Control vol 18 no 2 pp 166ndash1732013

[21] A Manju and M J Nigam ldquoFirefly algorithm with fireflieshaving quantum behaviorrdquo in Proceedings of the InternationalConference on Radar Communication and Computing (ICRCCrsquo12) pp 117ndash119 IEEE Tiruvannamalai India December 2012

[22] X-S Yang and X He ldquoFirefly algorithm recent advances andapplicationsrdquo International Journal of Swarm Intelligence vol 1no 1 pp 36ndash50 2013

[23] S Arora and S Singh ldquoThe firefly optimization algorithmconvergence analysis and parameter selectionrdquo InternationalJournal of Computer Applications vol 69 no 3 pp 48ndash52 2013

[24] X-S Yang S S S Hosseini and A H Gandomi ldquoFireflyalgorithm for solving non-convex economic dispatch problemswith valve loading effectrdquo Applied Soft Computing Journal vol12 no 3 pp 1180ndash1186 2012

[25] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using firefly algorithmrdquo Computers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[26] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering with Computers vol 29 no 2 pp175ndash184 2013

[27] A N Kumbharana and G M Pandey ldquoSolving travellingsalesman problemusing firefly algorithmrdquo International Journalfor Research in ScienceampAdvanced Technologies vol 2 no 2 pp53ndash57 2013

[28] M K Sayadi A Hafezalkotob and S G J Naini ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[29] X-S Yang ldquoFirefly algorithmrdquo inNature-InspiredMetaheuristicAlgorithms pp 81ndash96 Luniver Press University of CambridgeCambridge UK 2nd edition 2010

[30] A R Jordehi and J Jasni ldquoParameter selection in particle swarmoptimisation a surveyrdquo Journal of Experimental amp TheoreticalArtificial Intelligence vol 25 no 4 pp 527ndash542 2013

[31] M Mahdavi M Fesanghary and E Damangir ldquoAn improvedharmony search algorithm for solving optimization problemsrdquoAppliedMathematics and Computation vol 188 no 2 pp 1567ndash1579 2007

[32] M Padberg ldquoHarmony search algorithms for binary optimiza-tion problemsrdquo in Operations Research Proceedings 2011 pp343ndash348 Springer Berlin Germany 2012

[33] M A K Azad A M A C Rocha and E M G P FernandesldquoA simplified binary artificial fish swarm algorithm for unca-pacitated facility location problemsrdquo in Proceedings of WorldCongress on Engineering S I Ao L Gelman D W L HukinsA Hunter and A M Korsunsky Eds vol 1 pp 31ndash36 IAENGLondon UK 2013

[34] M Sevkli and A R Guner ldquoA continuous particle swarm opti-mization algorithm for uncapacitated facility location problemrdquoin Ant Colony Optimization and Swarm Intelligence M DorigoL M Gambardella M Birattari A Martinoli R Poli and TStutzle Eds vol 4150 of Lecture Notes in Computer Sciencespp 316ndash323 Springer 2006

[35] L Wang and C Singh ldquoUnit commitment considering genera-tor outages through a mixed-integer particle swarm optimiza-tion algorithmrdquoApplied SoftComputing Journal vol 9 no 3 pp947ndash953 2009

[36] MM Ali C Khompatraporn and Z B Zabinsky ldquoA numericalevaluation of several stochastic algorithms on selected con-tinuous global optimization test problemsrdquo Journal of GlobalOptimization vol 31 no 4 pp 635ndash672 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 11: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

Advances in Operations Research 11

of the knapsack under the constraint of the knapsackrsquoscapacity

max119909

119881 (119909) equiv119899

sum119897=1

V119897119909119897

st119899

sum119897=1

119908119897119909119897le 119882 119909

119897isin 0 1 119897 = 1 119899

(17)

If item 119897 is selected 119909119897= 1 otherwise 119909

119897= 0 Using a penalty

function this problem can be transformed into

min119909

minus119899

sum119897=1

V119897119909119897+ 120583max0

119899

sum119897=1

119908119897119909119897minus119882 (18)

where 120583 is the penalty parameter which was set to be 100 inthis experiment

Case 1 (an instance of a 0-1 KP with 4 items) Knapsackrsquoscapacity is 119882 = 6 and the vectors of values and weights areV = (40 15 20 10) and 119908 = (4 2 3 1) Based on the above-mentioned parameters the HBFA with mCS based on (14)was run 30 times and the averaged results were the followingWith a success rate of 100 items 1 and 2 are included in theknapsack and items 3 and 4 are excluded with a maximumvalue of 55 (StD = 00e00) On average the runs required08 iterations and 293 function evaluations With a successrate of 23 the heuristic based on the floor function thusmCS based on (15) reached 119891avg = 49 (StD = 40e00) afteran average of 61611 function evaluations and an average of3841 iterations

Case 2 (an instance of a 0-1 KP with 8 items) The maximumcapacity of the knapsack is set to 8 and the vectors ofvalues and weights are V = (83 14 54 79 72 52 48 62) and119908 = (3 2 3 2 1 2 2 3) The results are averaged over the 30runs After 87 iterations and 3867 function evaluations themaximum value produced by the strategy mCS based on (14)is 286 (StD = 00e00) with a success rate of 100 Items 14 5 and 6 are included in the knapsack and the others areexcluded The heuristic mCS based on (15) did not reach theoptimal solution All runs required 500 iterations and 20040function evaluations and the average function values were119891avg = 227 with StD = 314e01

5 Conclusions and Future Work

In this work we have implemented several heuristics tocompute a global optimal binary solution of bound con-strained nonlinear optimization problems which have beenincorporated into FA yielding the herein called HBFA Theproblems addressed in this study have bounded continu-ous search space Our FA proposal uses dynamic updatingschemes for two parameters 120574 from the attractiveness termand 120572 from the randomization term and considers the Levydistribution to create randomness in firefly movement Theperformance behavior of the proposed heuristics has beeninvestigated Three simple heuristics capable of transformingreal continuous variables into binary ones are implemented

A new sigmoid ldquoerfrdquo function is proposed In the context ofthe firefly algorithm three different implementations aimingto incorporate the heuristics for binary variables into FAare proposed (mCS mBS and pBC) Based on a set ofbenchmark problems a comparison is carried out with otherbinary dealing metaheuristics namely AMPSO binPSObinDE and AMDE The experimental results show that theimplementation denoted bymCSwhen combined with eitherthe new sigmoid ldquoerfrdquo function or the rounding schemebased on the floor function is quite efficient and superiorto the other methods in comparison The statistical analysiscarried out on the results shows evidence of statisticallysignificant differences on efficiency measured by the numberof function evaluations between the implementation mCSbased on the floor function approach and the mBS basedon both tested sigmoid functions schemes We have alsoinvestigated the effect of problemrsquos dimension on the perfor-mance of our algorithmUsing the Friedman statistical testweconclude that the differences on efficiency are not statisticallysignificant Another simple experiment has shown that theimplementation mCS with the sigmoid ldquoerfrdquo function iseffective in solving two small 0-1 KPThe performance of thissimple heuristic strategy will be further analyzed to solvelarge and multidimensional 0-1 KP Future developmentsconcerning the HBFA will consider its extension to dealwith integer variables in nonlinear optimization problemsDifferent heuristics to transform continuous real variablesinto integer variableswill be investigated Challengingmixed-integer nonconvex nonlinear problems will be solved

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors wish to thank two anonymous referees fortheir valuable suggestions to improve the paper This workhas been supported by FCT (Fundacao para a Ciencia eTecnologia Portugal) in the scope of the Projects PEst-OEMATUI00132014 and PEst-OEEEIUI03192014

References

[1] L Wang R Yang Y Xu Q Niu P M Pardalos and MFei ldquoAn improved adaptive binary harmony search algorithmrdquoInformation Sciences vol 232 pp 58ndash87 2013

[2] M A K Azad A M A C Rocha and E M G P FernandesldquoImproved binary artificial fish swarm algorithm for the 0-1multidimensional knapsack problemsrdquo Swarm and Evolution-ary Computation vol 14 pp 66ndash75 2014

[3] A P Engelbrecht andG Pampara ldquoBinary differential evolutionstrategiesrdquo in Proceedings of the IEEE Congress on EvolutionaryComputation (CEC rsquo07) pp 1942ndash1947 September 2007

[4] M H Kashan N Nahavandi and A H Kashan ldquoDisABC anew artificial bee colony algorithm for binary optimizationrdquoApplied Soft Computing Journal vol 12 no 1 pp 342ndash352 2012

12 Advances in Operations Research

[5] M H Kashan A H Kashan and N Nahavandi ldquoA noveldifferential evolution algorithm for binary optimizationrdquo Com-putational Optimization and Applications vol 55 no 2 pp 481ndash513 2013

[6] J Kennedy and R C Eberhart ldquoA discrete binary versionof the particle swarm algorithmrdquo in Proceedings of the IEEEInternational Conference on Systems Man and Cybernetics vol5 pp 4104ndash4108 Orlando Fla USA October 1997

[7] T Liu L Zhang and J Zhang ldquoStudy of binary artificialbee colony algorithm based on particle swarm optimizationrdquoJournal of Computational Information Systems vol 9 no 16 pp6459ndash6466 2013

[8] S Mirjalili and A Lewis ldquoS-shaped versus V-shaped transferfunctions for binary particle swarm optimizationrdquo Swarm andEvolutionary Computation vol 9 pp 1ndash14 2013

[9] G Pampara A P Engelbrecht and N Franken ldquoBinarydifferential evolutionrdquo in Proceedings of the IEEE Congress onEvolutionary Computation (CEC rsquo06) pp 1873ndash1879 VancouverCanada July 2006

[10] G Pampara and A P Engelbrecht ldquoBinary artificial bee colonyoptimizationrdquo in Proceedings of the IEEE Symposium on SwarmIntelligence (SIS rsquo11) pp 1ndash8 IEEE Perth April 2011

[11] S Burer and A N Letchford ldquoNon-convex mixed-integer non-linear programming a surveyrdquo Surveys in Operations Researchand Management Science vol 17 no 2 pp 97ndash106 2012

[12] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Proceedings of the Stochastic Algorithms Foundations andApplications (SAGA rsquo09) O Watanabe and T Zeugmann Edsvol 5792 of Lecture Notes in Computer Science pp 169ndash1782009

[13] X-S Yang ldquoFirefly algorithm stochastic test functions anddesign optimizationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[14] I Fister Jr X-S Yang and J Brest ldquoA comprehensive review offirefly algorithmsrdquo Swarm and Evolutionary Computation vol13 pp 34ndash46 2013

[15] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[16] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoA Gaussian firefly algorithmrdquo International Journal of MachineLearning and Computing vol 1 no 5 pp 448ndash453 2011

[17] L Guo G-G Wang H Wang and D Wang ldquoAn effectivehybrid firefly algorithmwith harmony search for global numer-ical optimizationrdquoTheScientificWorld Journal vol 2013 ArticleID 125625 9 pages 2013

[18] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoSome hybrid models to improve firefly algorithm perfor-mancerdquo International Journal of Artificial Intelligence vol 8 no12 pp 97ndash117 2012

[19] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 467631 12pages 2012

[20] X Lin Y Zhong and H Zhang ldquoAn enhanced firefly algorithmfor function optimisation problemsrdquo International Journal ofModelling Identification and Control vol 18 no 2 pp 166ndash1732013

[21] A Manju and M J Nigam ldquoFirefly algorithm with fireflieshaving quantum behaviorrdquo in Proceedings of the InternationalConference on Radar Communication and Computing (ICRCCrsquo12) pp 117ndash119 IEEE Tiruvannamalai India December 2012

[22] X-S Yang and X He ldquoFirefly algorithm recent advances andapplicationsrdquo International Journal of Swarm Intelligence vol 1no 1 pp 36ndash50 2013

[23] S Arora and S Singh ldquoThe firefly optimization algorithmconvergence analysis and parameter selectionrdquo InternationalJournal of Computer Applications vol 69 no 3 pp 48ndash52 2013

[24] X-S Yang S S S Hosseini and A H Gandomi ldquoFireflyalgorithm for solving non-convex economic dispatch problemswith valve loading effectrdquo Applied Soft Computing Journal vol12 no 3 pp 1180ndash1186 2012

[25] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using firefly algorithmrdquo Computers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[26] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering with Computers vol 29 no 2 pp175ndash184 2013

[27] A N Kumbharana and G M Pandey ldquoSolving travellingsalesman problemusing firefly algorithmrdquo International Journalfor Research in ScienceampAdvanced Technologies vol 2 no 2 pp53ndash57 2013

[28] M K Sayadi A Hafezalkotob and S G J Naini ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[29] X-S Yang ldquoFirefly algorithmrdquo inNature-InspiredMetaheuristicAlgorithms pp 81ndash96 Luniver Press University of CambridgeCambridge UK 2nd edition 2010

[30] A R Jordehi and J Jasni ldquoParameter selection in particle swarmoptimisation a surveyrdquo Journal of Experimental amp TheoreticalArtificial Intelligence vol 25 no 4 pp 527ndash542 2013

[31] M Mahdavi M Fesanghary and E Damangir ldquoAn improvedharmony search algorithm for solving optimization problemsrdquoAppliedMathematics and Computation vol 188 no 2 pp 1567ndash1579 2007

[32] M Padberg ldquoHarmony search algorithms for binary optimiza-tion problemsrdquo in Operations Research Proceedings 2011 pp343ndash348 Springer Berlin Germany 2012

[33] M A K Azad A M A C Rocha and E M G P FernandesldquoA simplified binary artificial fish swarm algorithm for unca-pacitated facility location problemsrdquo in Proceedings of WorldCongress on Engineering S I Ao L Gelman D W L HukinsA Hunter and A M Korsunsky Eds vol 1 pp 31ndash36 IAENGLondon UK 2013

[34] M Sevkli and A R Guner ldquoA continuous particle swarm opti-mization algorithm for uncapacitated facility location problemrdquoin Ant Colony Optimization and Swarm Intelligence M DorigoL M Gambardella M Birattari A Martinoli R Poli and TStutzle Eds vol 4150 of Lecture Notes in Computer Sciencespp 316ndash323 Springer 2006

[35] L Wang and C Singh ldquoUnit commitment considering genera-tor outages through a mixed-integer particle swarm optimiza-tion algorithmrdquoApplied SoftComputing Journal vol 9 no 3 pp947ndash953 2009

[36] MM Ali C Khompatraporn and Z B Zabinsky ldquoA numericalevaluation of several stochastic algorithms on selected con-tinuous global optimization test problemsrdquo Journal of GlobalOptimization vol 31 no 4 pp 635ndash672 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 12: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

12 Advances in Operations Research

[5] M H Kashan A H Kashan and N Nahavandi ldquoA noveldifferential evolution algorithm for binary optimizationrdquo Com-putational Optimization and Applications vol 55 no 2 pp 481ndash513 2013

[6] J Kennedy and R C Eberhart ldquoA discrete binary versionof the particle swarm algorithmrdquo in Proceedings of the IEEEInternational Conference on Systems Man and Cybernetics vol5 pp 4104ndash4108 Orlando Fla USA October 1997

[7] T Liu L Zhang and J Zhang ldquoStudy of binary artificialbee colony algorithm based on particle swarm optimizationrdquoJournal of Computational Information Systems vol 9 no 16 pp6459ndash6466 2013

[8] S Mirjalili and A Lewis ldquoS-shaped versus V-shaped transferfunctions for binary particle swarm optimizationrdquo Swarm andEvolutionary Computation vol 9 pp 1ndash14 2013

[9] G Pampara A P Engelbrecht and N Franken ldquoBinarydifferential evolutionrdquo in Proceedings of the IEEE Congress onEvolutionary Computation (CEC rsquo06) pp 1873ndash1879 VancouverCanada July 2006

[10] G Pampara and A P Engelbrecht ldquoBinary artificial bee colonyoptimizationrdquo in Proceedings of the IEEE Symposium on SwarmIntelligence (SIS rsquo11) pp 1ndash8 IEEE Perth April 2011

[11] S Burer and A N Letchford ldquoNon-convex mixed-integer non-linear programming a surveyrdquo Surveys in Operations Researchand Management Science vol 17 no 2 pp 97ndash106 2012

[12] X-S Yang ldquoFirefly algorithms for multimodal optimizationrdquoin Proceedings of the Stochastic Algorithms Foundations andApplications (SAGA rsquo09) O Watanabe and T Zeugmann Edsvol 5792 of Lecture Notes in Computer Science pp 169ndash1782009

[13] X-S Yang ldquoFirefly algorithm stochastic test functions anddesign optimizationrdquo International Journal of Bio-Inspired Com-putation vol 2 no 2 pp 78ndash84 2010

[14] I Fister Jr X-S Yang and J Brest ldquoA comprehensive review offirefly algorithmsrdquo Swarm and Evolutionary Computation vol13 pp 34ndash46 2013

[15] S Yu S Yang and S Su ldquoSelf-adaptive step firefly algorithmrdquoJournal of Applied Mathematics vol 2013 Article ID 832718 8pages 2013

[16] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoA Gaussian firefly algorithmrdquo International Journal of MachineLearning and Computing vol 1 no 5 pp 448ndash453 2011

[17] L Guo G-G Wang H Wang and D Wang ldquoAn effectivehybrid firefly algorithmwith harmony search for global numer-ical optimizationrdquoTheScientificWorld Journal vol 2013 ArticleID 125625 9 pages 2013

[18] S M Farahani A A Abshouri B Nasiri and M R MeybodildquoSome hybrid models to improve firefly algorithm perfor-mancerdquo International Journal of Artificial Intelligence vol 8 no12 pp 97ndash117 2012

[19] S L Tilahun and H C Ong ldquoModified firefly algorithmrdquoJournal of Applied Mathematics vol 2012 Article ID 467631 12pages 2012

[20] X Lin Y Zhong and H Zhang ldquoAn enhanced firefly algorithmfor function optimisation problemsrdquo International Journal ofModelling Identification and Control vol 18 no 2 pp 166ndash1732013

[21] A Manju and M J Nigam ldquoFirefly algorithm with fireflieshaving quantum behaviorrdquo in Proceedings of the InternationalConference on Radar Communication and Computing (ICRCCrsquo12) pp 117ndash119 IEEE Tiruvannamalai India December 2012

[22] X-S Yang and X He ldquoFirefly algorithm recent advances andapplicationsrdquo International Journal of Swarm Intelligence vol 1no 1 pp 36ndash50 2013

[23] S Arora and S Singh ldquoThe firefly optimization algorithmconvergence analysis and parameter selectionrdquo InternationalJournal of Computer Applications vol 69 no 3 pp 48ndash52 2013

[24] X-S Yang S S S Hosseini and A H Gandomi ldquoFireflyalgorithm for solving non-convex economic dispatch problemswith valve loading effectrdquo Applied Soft Computing Journal vol12 no 3 pp 1180ndash1186 2012

[25] A H Gandomi X-S Yang and A H Alavi ldquoMixed variablestructural optimization using firefly algorithmrdquo Computers andStructures vol 89 no 23-24 pp 2325ndash2336 2011

[26] X-S Yang ldquoMultiobjective firefly algorithm for continuousoptimizationrdquo Engineering with Computers vol 29 no 2 pp175ndash184 2013

[27] A N Kumbharana and G M Pandey ldquoSolving travellingsalesman problemusing firefly algorithmrdquo International Journalfor Research in ScienceampAdvanced Technologies vol 2 no 2 pp53ndash57 2013

[28] M K Sayadi A Hafezalkotob and S G J Naini ldquoFirefly-inspired algorithm for discrete optimization problems anapplication to manufacturing cell formationrdquo Journal of Man-ufacturing Systems vol 32 no 1 pp 78ndash84 2013

[29] X-S Yang ldquoFirefly algorithmrdquo inNature-InspiredMetaheuristicAlgorithms pp 81ndash96 Luniver Press University of CambridgeCambridge UK 2nd edition 2010

[30] A R Jordehi and J Jasni ldquoParameter selection in particle swarmoptimisation a surveyrdquo Journal of Experimental amp TheoreticalArtificial Intelligence vol 25 no 4 pp 527ndash542 2013

[31] M Mahdavi M Fesanghary and E Damangir ldquoAn improvedharmony search algorithm for solving optimization problemsrdquoAppliedMathematics and Computation vol 188 no 2 pp 1567ndash1579 2007

[32] M Padberg ldquoHarmony search algorithms for binary optimiza-tion problemsrdquo in Operations Research Proceedings 2011 pp343ndash348 Springer Berlin Germany 2012

[33] M A K Azad A M A C Rocha and E M G P FernandesldquoA simplified binary artificial fish swarm algorithm for unca-pacitated facility location problemsrdquo in Proceedings of WorldCongress on Engineering S I Ao L Gelman D W L HukinsA Hunter and A M Korsunsky Eds vol 1 pp 31ndash36 IAENGLondon UK 2013

[34] M Sevkli and A R Guner ldquoA continuous particle swarm opti-mization algorithm for uncapacitated facility location problemrdquoin Ant Colony Optimization and Swarm Intelligence M DorigoL M Gambardella M Birattari A Martinoli R Poli and TStutzle Eds vol 4150 of Lecture Notes in Computer Sciencespp 316ndash323 Springer 2006

[35] L Wang and C Singh ldquoUnit commitment considering genera-tor outages through a mixed-integer particle swarm optimiza-tion algorithmrdquoApplied SoftComputing Journal vol 9 no 3 pp947ndash953 2009

[36] MM Ali C Khompatraporn and Z B Zabinsky ldquoA numericalevaluation of several stochastic algorithms on selected con-tinuous global optimization test problemsrdquo Journal of GlobalOptimization vol 31 no 4 pp 635ndash672 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 13: Research Article Heuristic-Based Firefly Algorithm …downloads.hindawi.com/journals/aor/2014/215182.pdfFire y algorithm (FA) is a metaheuristic for global optimization. In this paper,

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of