Firefly Algorithm
for
Uncapacitated
Facility
Location
Problem and Number
of
$\Gamma$
ireflies
Kohei
Tsuya, Mayumi Takaya,
Szilárd
Zsolt Fazekas
\backslash Akihiro
Yamamura
Akita
University
Abstract
We
apply
thefirefly algorithm
to the uncapacitatcd facility locationproblemwhich is one ofoptimization problems and investigatethe opti‐
mum number of the fireflies. The light absorption coefficient parameter
$\gamma$ of the firefly
algorithm
is examined to obtain better performance andsuitable values of $\gamma$ are explored for the uncapacitated
facility
locationproblem. Effectiveness of local search in the
firefly
algorithm is also in‐vestigated.
In addition, weinvestigatetheoptimumnumber of fireflies forthefirefly algorithm.
1
Introduction
The method of
simulating
swarmintelligence
isinspired by
the movement andforaging
behavior in herd animals[1,
11,
21].
Astypical examples,
particle
swa,rm
optimiza,tion
wasinspired
by
the behavior of groups of birds and fish,ant
colony optimization
wasinspired by
theforaging
behavior ofants. Numer‐ ous swarmintelligence algorithms
have beenproposed
andinvestigated: particle
swarmoptimization
[10, 11],
antcolony
optiinization
[6],
artificial beecolony
algorithm
[9],
batalgorithm
[22],
cuckoo search[23],
genetic
algorithm
[5, 8]
andso on. These have beenapplied
toawiderange ofcomputational problems
like data
mining
andimage processing
[1]
in addition to numerousoptimiza‐
tion
problems
like thetraveling
salesmanproblem
and the flowshop
scheduling
problem.
Firefly algorithm
(FA
forshort)
is one of metaheuristicalgorithms
and hasbeen studied
by
many researchers.Recently,
effectiveness of FA and suitablevalues ofparameters of FA are
investigated
for someoptimization
problem
in[18].
We introduce the results in[18]
and add some results on effect.iveness ofEfficient
supply
chain management has led to increasedprofit,
increasedmarket
share,
reducedoperating
cost, andimproved
customer satisfaction formanybusinesses
[13,
16,
17].
Forthis purpose, it isgetting
moreand more im‐portant
ininformation and communicationstechnologies
to solveoptimization
problem
such as theuncapacitated facility
locationproblem
(UFI P)
whichis acombinatorial
optimization
problem.
Theobjective
of the UFLP is tooptimize
the cost oftransport to eachcustomer and the cost associated to
facility
open‐ing,
when the set ofpotential
locations of facilities and the customers aregiven,
whereas \mathrm{U} $\Gamma$ \mathrm{L}\mathrm{P} is knowntobe NP‐hard
(see
[13]).
In thecontext ofperforming
economic activities
efficiently,
variousobjects
have been considered asfacilities,
such as
manufacturing plants,
storage facilities, warehouses,libraries,
fire sta‐tions, hospitals
orwirelessservicestations. Severaltechniques
have beenapplied
tothe UFLP such as theswarm
intelligence algorithms
or a meta‐heuristics al‐gorithm; particle
swarmoptimization
(PSO) [7],
antcolony
optimization
(ACO)
[12],
artificial
beecolony algorithm
(AUC) [19],
andgenetic
algorithm
[14].
UFLP is described as follows. Given a set F of fa,cilities and a set C of
customers, afixed
opening
costf_{i} \in \mathbb{R}_{+}
for eachfacility
i\in F, andatransport
cost
c_{ij}\in \mathbb{R}_{+}
from eachfacility
i\in F toeachcustomerj\in C
, where\mathbb{R}_{+}
standsfor the setof
positive
realnumbers, \mathrm{I}\mathrm{T} $\Gamma$ \mathrm{L}\mathrm{P} asksto findacombination ofopening
facilities to minimize cost of
transportation
andopening
facilities.Each customer
j
isexpected
to select afacility
i from theopened
facilitiesso that the cost c_{ii} is lowest. It is asked to find a subset X of facilities to be
opened
and theassignment
$\sigma$ : C \rightarrow X of each customer to anappropriate
facility
so\mathrm{t}\mathrm{h}\mathrm{a}_{1}\mathrm{t} these minimize the sum of theopening
costsof the facilities andthe transport costs
given
by
theformula(1).
\displaystyle \sum_{i\in X}f_{i}+\sum_{j\in C}c_{ $\sigma$(j)g}
(1)
Severalswarm
intelligence algorithms
have beenapplied
toUFLP untilnow.For
example,
particle
swarmoptimization,
antcolony
optimiza,tion,
artificialbee
colony algorithm
(ABC
forshort),
andgenetic
algorithm
are studied in[7,
12, 14, 19,
20].
In[18],
FA isapplied
to \mathrm{U} $\Gamma$ \mathrm{L}\mathrm{P} andexplore
suitable value ofparaÌnetersofFA. Effectiveness of
equipping
a local search mechanisni to FA isalso discussed to minimize cost
(1).
FA is alsocompared
with ABCalgorithm
to find asolution of \mathrm{U} $\Gamma$ \mathrm{L}\mathrm{P}.
Experiments
arecarried out to answerthese issues.In this paper, weir the
optimum
number of fireflies for FA in additiontothe results in
[18].
2
Firefly algorithm
for the
uncapacitated
facil‐
ity
location
problem
2.1
Applying
toUFLP
Each
firefty
k isgiven
an openfacility
vectorY_{k}
(= [y_{k1}, y_{k2}, y_{k3}, \ldots, y_{k\mathrm{z} $\iota$}])
rep‐facilities. If the i‐th
facility
isopen,y_{ki}=1
. For theopenfacility
vector\mathrm{Y}_{k}
ofafirefly k,
X(k)
isdefined to be the set of facilities i in F such thaty_{ki}=1
, thatis,
X(k)
is the set of the facilities that areopened.
For the openfacility
vector\mathrm{Y}_{k}
,assignment
function $\sigma$ :C\rightarrow X(k)
from C toX(k)
is definedby
the trans‐port costs c_{\dot{ $\eta$}j} as follows. For each
j
inC,
$\sigma$(j)
is defined to be i\in X(k)
suchthat c_{ij} is the smallest among
\{c_{hj} |h\in X(k)\}
. If there are several candidatesh, one of them is selected
randomly.
The total costT(\mathrm{Y}_{k})
for eachfirefly
k iscomputed
as the sum of the cost ofopening
facilities determinedby
the openfacility
vector\mathrm{Y}_{k}
and thetransport cost determinedby
theassignment
function$\sigma$ :
C\rightarrow X(k)
for\mathrm{Y}_{k}
. The costT(\mathrm{Y}_{k})
for the openfacility
vectorY_{k}
is definedby
the formula(1)
and is rewritten asfollows.T(Y_{k})=\displaystyle \sum_{i\in X(k)}f_{i}+\sum_{j\in C}c_{ $\sigma$(j)j}
(2)
The notations used in this paper is summarized in Table 1.
Table 1: Notations
An
example
of aproblem
instance of \mathrm{U} $\Gamma$ \mathrm{L}\mathrm{P} isgiven
in Table 2.Suppose
that
\mathrm{A},
\mathrm{B},
\mathrm{C}, \mathrm{D},
\mathrm{E} arefacilities,
\mathrm{a},\mathrm{b},
\mathrm{c}, \mathrm{d} arecustomers, and[
1,
0,1,
0,1]
is theopen
facility
vector\mathrm{Y}_{s}
given
to afirefly
s. Note thatf_{\mathrm{A}}=3, f_{\mathrm{B}}=4_{:} f_{\mathrm{C}}
=6,
f_{\mathrm{D}}=7
, andf_{\mathrm{E}}=2
and$\sigma$(\mathrm{a})
=\mathrm{A},
$\sigma$(\mathrm{b})
=\mathrm{B}(it
may be \mathrm{E} aswell), $\sigma$(\mathrm{c})=\mathrm{C},
and
$\sigma$(\mathrm{d})=\mathrm{D}
for this openfacility
vector\mathrm{Y}_{s}
. Then the total costT(\mathrm{Y}_{s})
for theopen
facility
vector\mathrm{Y}_{s}
iscomputed following
theequation
(2).
Similarly,
theT(\mathrm{Y}_{s})
=Opening
costs +Transport
cost= (3+6+2)+\displaystyle \min(1,2,9)+\min(8,5,2)\min(4,3,6)+\min(9,4,3)
= 20.
T(\mathrm{Y}_{t})
=(4+6+7+2)+(2+2+3+2)
= 28.
Table 2:
Example
ofopenfacility
vector for afirefly
kAttractiveness of a
firefly
isrepresented
by
thelight
intensity.
FYom theassumption
3,
thelight
intensity
of thefirefly
isgiven
by
theobjective function,
that
is,
the total costT(Y_{k})
.Light
intensity
I(\mathrm{Y}_{k})
of afirefly
k isrepresented
by
theequation
(3).
I(\displaystyle \mathrm{Y}_{k})=\frac{1}{T(\mathrm{Y}_{k})}
.(3)
Note that
I(\mathrm{Y}_{k})
gets
larger
asT(\mathrm{Y}_{k})
gets
smaller. Itcanbe determined whetherthe
firefly
has agood
solutionby
comparing
I(Yk).
TheLight
intensity
offirefly
s and t is as follows.
I(\displaystyle \mathrm{Y}_{s})=\frac{1}{20}iI(\mathrm{Y}_{t})=\frac{1}{28}
.(4)
Distance between any two fireflies is
represented
by
thehamming
distanceof their open
facility
vectors.Suppose
that thefircfly
s and thefirefly
t haveopen
facility
vectorsbelow. Then thehamming
distance r_{st} between s and tis3.
Y_{s}=[1, 0, 1, 0, 1]
\mathrm{Y}_{t}=[0, 1, 1, 1, 1]
If
I(Y_{s})>I(\mathrm{Y}_{t})
holds for twofirefliessandt, thentmovestowardss. Movementof the
firefly
t toward thefirefly
s isthe conversionof the openfacility
vector oft. Common components of
\mathrm{Y}_{s}
and\mathrm{Y}_{t}
are carried over to the new openfacility
vector
Y_{t}.
Each of components of
Y_{t}
different fromYô
isreplaced
with aprobability $\beta$.
The
probability $\beta$
isgiven
by
thefollowing
formula(5).
$\beta$=\displaystyle \frac{$\beta$_{0}}{1+ $\gamma$ r_{st}^{2}}
(5)
where
$\beta$_{0}
istheprobability
atr_{st}=0
andỉio
is set1,
and $\gamma$ isthelight absorption
coefficient.
In thispaper,
suitable values of $\gamma$ isexplored.
Let
firefly
t be close tofirefly
sby probability
$\beta$
as follows. The total costofnew
\mathrm{Y}_{t}
at this time is24,
which shows that the cost isdecreasing.
new
\mathrm{Y}_{t}
=[
1, 1, 1,
0,1
]
new
T(Y_{t})
=(3+4+6+2)+(1+2+3+3)
= 24.
2.2
Pseudocode of FA
FA program generates fireỉlies and set Lhe parameters. Fireflies compare the
intensity
each other and thenchange
theirpositions,
thatis,
the openfacility
vectors
according
totheir distance.Repeating
thisprocess, FAprogramupdates
fireflies
intensity
and theiropenfacility
vectors, and then itoutputs a solution.A
pseudocode
of FAprogram is illustrated below.begin
Objective
function\displaystyle \min T(Y)
,Initialize
positions
of fireflies\mathrm{Y}_{k}.(k=1,2, \ldots , K)
I(Y_{k})
is definedby
thereciprocal
ofT(\mathrm{Y}_{k})
,Defineparameter $\gamma$and
$\beta$
while
(
\mathrm{r}<Repeat
count)
for t= lto K
for s= lto K
if
I(\mathrm{Y}_{s})>I(\mathrm{Y}_{t})
Move
firefly
t towardsfirefly
selse
Move
firefly
trandomly;
end if
Update
ofintensity
and total cost;end fors
end for t
Rank the fireflies and find the current best.
Local Search.
\mathrm{r}++;
end while
Post‐process
results and visualization end3
Experiments
and
Results
3.1
Objectives
Acomputer programofFA tosolve UFLP is
implemented
andexperiments
arecarried out. Suitable values of the
light absorption
coefficientparameter
$\gamma$ isexplored
toaccomplish
betterperformance.
A program isimplemented
inC#
language using
Visual Studio and run on an Intel Core i52. 67\mathrm{G}\mathrm{H}\mathrm{z}Desktop
with 4.0\mathrm{G}\mathrm{B} memory. Several test data sets of benchmark
problems
are bor‐rowed from
OR‐Library
[4],
which is acollectionoftest datasets for numerousoperations
researchproblems
andoriginally
described in[2].
\mathrm{U} $\Gamma$ \mathrm{L}\mathrm{P} is calledan
uncapacitated
warehouse locationproblem
inOR‐Library.
There are 15 datafiles
provided;
thetest data setsVII, X. XIII and A to \mathrm{C} from[3].
The test datasets VII
(cap71,
72,
73,
74),
X(cap
101, 102, 103,
104)
and XIII(cap
131, 132,
133,
134)
areemployed
forexperiments.
These test data sets are summarizedin Table
3,
in which m stands for the number ofcustomers and n stands forthe number of facilities. The
optimal
solutionsfor these testdata setsaretakenfrom
OR‐Library.
Table 3: Test data from
OR‐Library
3.2
Number of fireflies
Find the
optimum
number of fireflies for FA. In this paper, average relativepercenterror
(ARPE
forshort)
and hittooptimum
rate(HR
forshort)
isused forperformance
evaluation of thealgorithm.
ARPE is theaverage of the differencemore chance toobtain better solutions. ARPE is
given by
the formula(6).
ARPE=\displaystyle \sum_{i=1}^{R}(\frac{H_{i}-U}{U}) \times \frac{100}{R}
(6)
where
H_{i}
denotes the i‐threplication
solutionvalue,
R is the numberofreplica‐
tions,
and U is theoptimal
valueprovided by
[4].
HR representsthenumber oftimes that the
algorithm
finds theoptimal
solutions over allrepetitions.
IfHRis
higher,
then theprobability
to obtain a better solutionishigher.
$\gamma$ is set tobe
e.01,
the repeat count50,
and the number of fireflies is one of the values10,
15, 20, 25,
30or35intheexperiments.
The result is theaveragevalue when thealgorithm
isexecuted 100 times. The table 4 and table 5 is summaryofARPEor HR at repeat count is 50.
Table 4: ARPE for each
firefly
number(number
ofỉirefly,
ARPE)
Table 5: HR for each
firefly
number(number
offirefly,
HR)
4
Summary
We discussed several
aspects
of thefirefly algorithm
for UFLPand obtained twoFirst, optimal
values of thelight absorption
coefficient $\gamma$ of FA in UFLPare obtained. It is found that FA works better when $\gamma$ is
0.001,
0.005 or 0.01.These values work well
regardless
ofsizeofproblem
instanceof UFLP. Suitablevalues for
particular
test data are obtainedby experiments, however,
suitablevalues of $\gamma$ have not been
complete]y
classified for ageneral
case.Therefore,
itis necessary toseek suitable parameterswhen FA is
applied
to anoptimization
problem.
Second,
it is verified that local searchiinproves
performance
of FA and sothe combination of FA and local search
algorithm
is effective. FA iscompared
with FA with local search and ABC
algorithm
with respect to average relativepercenterrorand hitto
optimum
rate. Nosuperiority
of FAoverABCalgorithm
is
recognized,
whereas FA with local search works aswellasABCalgorithm
forUFLP.
Itseems necessary to compareFA and ABC
algorithm
formorevarious sizesoftest data and other type of
optimization problems
in order tocomprehend
thestrong
points
ofFA. It is also desirabletoexplore
suitableparametersmakesFA with local searchtowork better.
References
[1]
A.Abraham,
C.Grosan,
V.Ramos,
SwarmIntelligence
in DataMining,
Springer‐Verlag
BerlinHeidelberg,
(2006)
[2]
J.E.Beasley,
OR‐Library: distributing
testproblems Uy
electronicmail,
J.of
theOperational
ResearchSociety,
41(11)
(1990),
1069‐1072.[3]
J.E.Beasley, Lagrangean
heuristics for locationproblems, European
J.of
Operational Research,
65(1993),
383‐399.[4]
J.E.Beasley,
OR‐Library,
http:
//\mathrm{w}\mathrm{w}\mathrm{w}.brunel.ac.uk/\simmastj j
\mathrm{b}/\mathrm{j}\mathrm{e}\mathrm{b}/
inf0. html.[5]
K.D.Jong,
Analysis of
the behaviorof
a classof genetic adaptive
systems,
Ph.D.
Thesis, University
ofMichigan,
1975.[6]
M.Dorigo, optimization, Learning
and NaturalAlgorithms,
Ph.D.Thesis,
Politecnico di
Milano,
1992.[7]
A.R. Guner and M.Sevkli,
A discreteparticle
swarmoptimization
algorithm
for
uncapacitated facility
locationproblem,
J.of Artificial
Evolution andApplications,
2008(10) (2008),
9 pages.[8]
J.H.Holland, Adaptation
inNatural andArtificial Systems:
AnIntroductory
Analysis
withApplications
toBiology, Control,
andArtificial Intelligence,
A Uradford
Book,
1992.[9]
D.Karaboga,
An Idea UasedonHoney
BeeSwarmfor Numericaloptimiza‐
[10]
J.Kennedy
andR.Eberhart,
Particle Swarmoptimization, Proceedings
ofthe IEEE international conference onneural
networks,
1995,
1942‐1948.[11]
J.Kennedy,
R. EUerhart and Y.Shi,
Swarmintelligence,
AcademicPress,
2001.[12]
A.Kole,
P. Chakrabarti and S.Bhattacharyya,
Anantcolony
optimiLation
algorithm
foruncapacitated facility
locationproblem, Artzficial Intelligence
andApplications,
1(1) (2014),
55‐61.[13]
B. Korte and J.Vygen,
Combinatorialoptimization: Theory
andAlgo‐
rithms, Springer‐Verlag,
2007.[14]
J.Kratica,
D.Tosic,
V.Filipovic
and I.Ljubic, Solving
thesimple plant
location
problem by genetic algorithm,
RAIRO ‐Operations Research,
35(2001),
127‐142.[15]
S.M. Lewis and C. K.Cratsley,
Flashsignal evolution,
mate choice andpredation
infireflies,
Annual Reviewof Entomology,
53(2)
(2008),
293‐321.[16]
R. Rahmaniani and A.Ghaderi,
A combinedfacility
location and networkdesign problem
withmulti‐type
ofcapacitated links,
Applied
MathematicalModelling,
37(9) (2013),
6400‐6414.[17]
D.Simchi‐Levi,
P.Kaminsky,
E.Simchi‐Levi, Designing
andManaging
theSupply
Chain.Concepts, Strategies
and CaseStudies, McGraw‐Hill, Boston,
Mass,
USA.(2000)
[18]
K.Tsuya,
M.Takaya,
and A.Yamamura,
Application
of thefirefly algo‐
rithm to the
uncapacitated
facility
locationproblem,
J.of Intelligent
andFuzzy Systems,
32(4)
(2017)
3201‐3208.[19]
N.Tuncbilek,
$\Gamma$.Tasgetiren
and S.Esnaf,
Artificial beecolony optimization
algorithm
foruncapacitated facility
locationproblems,
J.of
Economic andSocial
Research,
14(1) (2012),
1‐24.[20]
Y.Watanabe,
M.Takaya
and A.Yamamura,
Fitnessfunction in ABCalgo‐
rithm for
uncapacitated
facility
locationproblem,
Lecture NotesinComputer
Science,
9357(2015),
129‐138.[21]
X.S.Yang, Biology‐Derived
Algorithms
inEngineering optimization,
Hand‐book of
Bioinspired
Algorithms
andApplications, Chapman
& Hall/\mathrm{C}\mathrm{R}\mathrm{C},
2005,
589‐600.[22]
X.S.Yang,
A new metaheuristicbat‐inspired algorithm,
Studies in Com‐putational Intelligence,
284(2010),
65‐74.[23]
X.S.Yang
and S.Deb,
Cuckoo search viaLevy flights, Proceedings
of theWorld