Optimization: Applications: Bee Colony Principles and
Optimization: Applications: Bee Colony Principles and
^ ~~~Faculty of Electrical Engineering, University of Belgrade, Serbia, September 25-27, 2006 / E20
,* h~~~bittp://neure.eff`.Ibg.ac.v, http://www.ewh.ieee.org/reg/8/conferences.htmI a"IE
1i0
Abstract - The Bee Colony Optimization Metaheuristic organized in the following way. The new computational
(BCO) is proposed in the paper. The BCO represents the paradigm - The Bee Colony Optimization is described in
new metaheuristic capable to solve difficult combinatorial Section 2. Sections III, IV, and V are devoted to the
optimization problems. The artificial bee colony behaves description of Case Studies (Traveling Salesman
partially alike, and partially differently from bee colonies in
nature. In addition to proposing the BCO as a new Problem, Ride-Matching Problem, and Routing and
metaheuristic, we also describe in the paper two BCO Wavelength Assignment Problem). Conclusion is given in
algorithms that we call the Bee System (BS) and the Fuzzy the Section VI.
Bee System (FBS). In the case of FBS the agents (artificial
bees) use approximate reasoning and rules of fuzzy logic in II. THE BEE COLONY OPTIMIZATION: THE NEW
their communication and acting. In this way, the FBS is COMPUTATIONAL PARADIGM
capable to solve deterministic combinatorial problems, as
well as combinatorial problems characterized by Social insects (bees, wasps, ants, termites) have lived
uncertainty. The proposed approach is illustrated by three on Earth for millions of years, building nests and more
Case studies. complex dwellings, organizing production and procuring
food. The colonies of social insects are very flexible and
Keywords - Key words or phrases in alphabetical order, can adapt well to the changing environment. This
separated by commas. flexibility allows the colony of social insects to be robust
and maintain its life in spite of considerable disturbances.
The dynamics of the social insect population is a result
of the different actions and interactions of individual
I. INTRODUCTION insects with each other, as well as with their environment.
Agreat number of traditional engineering models and The interactions are executed via multitude of various
algorithms used to solve complex problems are based chemical and/or physical signals. The final product of
on control and centralization. Various natural systems different actions and interactions represents social insect
(social insects colonies) lecture us that very simple colony behavior. Interaction between individual insects in
individual organisms can create systems able to perform the colony of social insects has been well documented.
highly complex tasks by dynamically interacting with The examples of such interactive behavior are bee
each other. dancing during the food procurement, ants' pheromone
Bee swarm behavior in nature is, first and foremost, secretion, and performance of specific acts, which signal
characterized by autonomy and distributed functioning the other insects to start performing the same actions.
and self-organizing. In the last couple of years, the These communication systems between individual insects
researchers started studying the behavior of social insects
in an attempt to use the Swarm Intelligence concept in contribute to the formation of the "collective intelligence"
order to develop various Artificial Systems. of the social insect colonies. The term "Swarm
The Bee Colony Optimization (BCO) Metaheuristic Intelligence", denoting this "collective intelligence" has
that represents the new direction in the field of Swarm come into use [1]-[3].
Intelligence is introduced in this paper. The primary goal A. Bees in the Nature
of this paper is to explore the possible applications of Self-organization of bees is based on a few relatively
collective bee intelligence in solving combinatorial simple rules of individual insect's behavior. In spite of
problems characterized by uncertainty. The paper is the existence of a large number of different social insect
species, and variation in their behavioral patterns, it is
Dusan Teodorovic is with the Faculty of Transport and Traffic possible to describe individual insects' as capable of
Engineering, University of Belgrade, Serbia (phone +381-1 1-3091-210; performing a variety of complex tasks [4]. The best
fax: +381-1 1-3096-704; e-mail: dusanAsfbg.ac.yu).
Panta Lucic is with the CSSI, Inc, Washington D.C., U.S.A. (e-mail: example is the collection and processing of nectar, the
plucicAvt.edu). practice of which is highly organized. Each bee decides to
Goran Markovic is with the Faculty of Transport and Traffic reach the nectar source by following a nestmate who has
Engineering, University of Belgrade, Serbia (e-mail: already discovered a patch of flowers. Each hive has a so-
Mauro Dell' Orco is with the Technical University of Bari, Italy called dance floor area in which the bees that have
(e-mail: dellorco poliba.it) discovered nectar sources dance, in that way trying to
152
The following is pseudo-code of the Bee Colony perform third forward pass, etc. The iteration ends when
Optimization: the bees have visited all nodes.
Within the proposed BCO Metaheuristic, various
Bee Colony Optimization heuristic algorithms describing bees' behavior and/or
(1) Initialization. Determine the number of bees B, "reasoning" could be developed and tested. In other
and the number of iterations I. Select the set of stages ST words, various BCO algorithms could be developed.
= {Stl, st2 ,..., Stm}. Find any feasible solution x of the These algorithms should describe the ways in which bees
problem. This solution is the initial best solution. decide to abandon the created partial solution, to continue
(2) Set i: 1. Until i = I, repeat the following steps: to expand the same partial solution without recruiting the
(3) Setj 1. Untilj = m, repeat the following steps: nestmates, or to dance and thus recruit the nestmates
Forward pass: Allow bees to fly from the hive and to before returning to the created partial solution.
choose B partial solutions from the set of partial solutions
Sj at stage stj.
Backward pass: Send all bees back to the hive. Allow
o 0 0
bees to exchange information about quality of the partial BQ0 0 OIe
solutions created and to decide whether to abandon the
created partial solution and become again uncommitted 0 0 'I
Alternatively, forward and backward passes could be In addition to proposing the BCO as a new
performed until some other stopping condition is metaheuristic, we also describe in the paper two BCO
satisfied. The possible stopping conditions could be, for algorithms that we call the Bee System (BS) and the
example, the maximum total number of Fuzzy Bee System (FBS). The BS proposed in [5] is
forward/backward passes, or the maximum total number described in more details within the Case Study of the
of forward/backward passes between two objective Traveling Salesman Problem. In the case of FBS [7], the
function value improvements. agents (artificial bees) use approximate reasoning and
During the forward pass bees will visit certain number rules of fuzzy logic in their communication and acting. In
of nodes, create partial solution, and after that return to this way, the FBS is capable to solve deterministic
the hive (node 0). In the hive, bees will participate in a combinatorial problems, as well as combinatorial
decision making process. Bees compare all generated problems characterized by uncertainty. The FBS is
partial solutions. Based on the quality of the partial described in details within the Case Study of Ride-
solutions generated, every bee will decide whether to Matching problem.
abandon the generated path and become again
uncommitted follower, continue to fly along discovered III. CASE STUDY # 1: SOLVING THE TRAVELING
path without recruiting the nestmates, or dance and thus SALESMAN PROBLEM BY THE BEE COLONY OPTIMIZATION
recruit the nestmates before returning to the discovered The proposed Bee System was tested on a large
path. Depending on the quality of the partial solutions number of numerical examples. The benchmark problems
generated, every bee possesses certain level of loyalty to were taken from the following Internet address:
the path previously discovered. For example, bee B1, B2,
and B3 participated in the decision-making process. After
comparing all generated partial solutions, bee B1 decided The following problems were considered: Eil5 1 .tsp,
to abandon already generated path, and to join bee B2.
Berlin52.tsp, St70.tsp, Pr76.tsp, Kroal OO.tsp and
The bees B1, and B2 fly together along the path a280.tsp. All tests were run on an IBM compatible PC
generated by the bee B2. When they reach the end of the with PIll processor (533MHz). The results obtained are
path, they are free to make individual decision about next
node to be visited. The bee B3 will continue to fly along given in Table 1.
discovered path without recruiting the nestmates We can see from the Table 1 that the proposed BCO
(Figure2). In this way, bees are again performing forward produced results of a very high quality. The BCO was
pass. able to obtain the objective function values that are very
During the second forward pass, bees will visit few close to the optimal values of the objective function.
more nodes, expand previously created partial solutions, The times required to find the best solutions by the BCO
and after that perform again the backward pass and return are very low. In other words, the BCO was able to
to the hive (node 0). In the hive, bees will again produce "very good" solutions in a "reasonable amount"
participate in a decision making process, make a decision, of computer time.
153
TABLE 1: THE RESULTS OBTAINED BY THE BEE COLONY solution be abandon or not?; (c) Should the same partial
OPTIMIZATION solution be expanded without recruiting the nestmates?
Problem The best 444 Long
Name Optimal value B0 CP
(Numbe Value obtained by (B secPU I~~~~~~ iN
Da n isac
ofnodes)| (0) the Bee
(B)
0noes
Eil5l 51 429.983
S~~ystem
431.121 0.26% 44
Berlin52
(52) 7544.36 7544.366 Oo% 18
O \ 500 \ 1 00 0
St70 (70) 678.597 678.621 0.00350o 238
Pr76 (76) 108159 108790 0.58% 127
KroalOO
(10)0 21285.4 0.730%
21441.5 58
M edium Short
154
paths are less, or more attractive to bees. Let us note paths
Pi= /f (1) Pi and p1. We denote by nij the number of bees that will
Efj abandon path Pi , and join nestmates who will fly along
In order to choose next solution component to be added path pj.
to the partial solution, artificial bees use a proportional The approximate reasoning algorithm to calculate the
selection known as the "roulette wheel selection." (The number of shifting bees consists of the rules of the
sections of roulette are in proportion to probabilities pi). following type:
In addition to the "roulette wheel selection," several other If bees' loyalty to path Pi is LOW and path pj 's
ways of selection could be used.
attractiveness is HIGH
Then the number of shifting bees from path Pi to path p1
C. Bee's partial solutions comparison mechanism is HIGH
In order to describe bee's partial solutions comparison In this way, the number of bees flying along specific
mechanism, we introduce the concept of partial solution path is changed before beginning of the new forward
badness. We define partial solution badness in the pass. Using collective knowledge and sharing information
following way: among themselves, bees concentrate on more promising
L(k) -L
L ~min search paths, and slowly abandon less promising paths.
Lk
Lmax -Lmin
ways of selection could be used.
where: E. Numerical experiment
Lk - badness of the partial solution discovered by the The authors in [7] tested the proposed model in the
k-th bee case of ridesharing demand from Trani, a small city in the
L(k) - the objective function values of the partial southeastern Italy, to Bari, the region capital of Puglia
solution discovered by the k-th bee They collected the data regarding 97 travelers
Lmin -the objective function value of the best- demanding for ridesharing, and assumed, for sake of
discovered partial solution from the beginning of the simplicity, that the capacity is 4 passengers for all their
search process cars. In our case, the algorithm chooses 24*4 = 96 out of
Lmax - the objective function value of the worst 97 travelers to build up the "best" path. The authors used
discovered partial solution from the beginning of the a hive of 15 bees, leaving at once. Bees have generated
search process only six "foraging paths". The other generated paths were
The approximate reasoning algorithm to determine the abandoned eventually.
partial solution badness consists of the rules of the Changes of the best discovered objective function
following type: values are shown in Figure 4.
If the discovered partial solution is BAD
Then loyalty is LOW
Bees use approximate reasoning, and compare their
discovered partial solutions with the best, and the worst
discovered partial solution from the beginning of the
search process. In this way, "historical facts" discovered
by the all members of the bee colony have significant
influence on the future search directions.
D. Calculating the number of bees changing the path
Every partial solution (partial path) that is being
advertised in the dance area has two main attributes: (a)
the objective function value, and (b) the number of bees
that are advertising the partial solution (partial path). The i~ ~ ~ ~ ~ ~ ~ ~ ~ ~
number of bees that are advertising the partial solution is
a good indicator of a bees' collective knowledge. It shows Fig. 4. Changes of the best-discovered objective function
how bee colony perceives specific partial solutions. values
The approximate reasoning algorithm to determine the
advertised partial solution attractiveness consists of the V. CASE STUDY #3: ROUTING AND WAVELENGTH
rules of the following type: ASSIGNMENT (RWA) IN ALL-OPTICAL NETWORKS
If the length of the advertised path is SHORT and
the number of bees advertising the path is Every pair of nodes in optical networks is characterized
SMALL by a number of requested connections. The total number
Then the advertised partial solution attractiveness is of established connections in the network depends on the
MEDIUM routing and wavelength assignment procedure. Routing
Path attractiveness calculated in this way can take and wavelength assignment (RWA) problem in all-optical
values from the interval [0,1]. The higher the calculated networks could be defined in the following way: Assign a
value, the more attractive is advertised path. Bees are less path through the network and a wavelength on that path
or more loyal to "old" paths. At the same time, advertised for each considered connection between a pair of nodes in
155
such a way to maximize the total number of established The authors in [9] calculated the probability pp that the
connections in the network. P-th advertised partial solution will be chosen by any of
In [9] the authors proposed the BCO heuristic the uncomitted follower using the following relation:
algorithm tailored for the RWA problem. They called the eCp
proposed algorithm the BCO-RWA algorithm. Bees PP = p ,(5)
decide to choose a physical route in optical network in a Ecp
random manner. Logit model is one of the most p=1
successful and widely accepted discrete choice model. where Cp is the total number of the established lightpaths
Inspired by the Logit model, the authors in [9] assumed in the case of the P-th advertised partial solution
that the probability p,'d of choosing route r in the case of The BCO-RWA algorithm was tested on a few
origin-destination pair (s,d) equals: numerical examples. The authors in [9] fornulated
Vd
corresponding Integer Linear Program (ILP) and
e reRsd iW >0 discovered optimal solutions for the considered examples.
psd= Eisd (3)
In the next step, they compared the BCO-RWA results
Pr (3) with the optimal solution. The comparison for the
considered network is shown in the Table 2.
O,VreRsd iW =0 We can see from the Table 2 that the proposed BCO-
where Rsd is the total number of available routes RWA algorithm has been able to produce optimal, or a
between pair of nodes (s,d). The route r is availlable if near-optimal solutions in a reasonable amount of
there is at least one available wavelength on all links that computer time.
belong to the route r.
In the hive every bee makes the decision about VI. CONCLUSION
abandoning the created partial solution or expanding it in The successful applications of the Bee Colony
the next forward pass. The authors in [9] assumed that Optimization to difficult combinatorial optimization
every bee can obtain the information about partial problems are very encouraging. It is of a great importance
solution quality created by every other bee. They to investigate in future research both advantages and
calculated the probability that the bee b will at beginning disadvantages of autonomy, distributed functioning and
of the u + 1 forward pass use the same partial tour that is self-organizing in relation to traditional engineering
defined in forward pass u in the following way: methods relying on control and centralization.
_ C.. Cb
Pb =e u
(4) ACKNOWLEDGMENT
where:
Cb - the total number of established lightpaths from the This research was partially supported by the Ministry
beginning of the search process by the b-th bee of Sciences of Serbia.
Cmax - the maximal number of established lightpaths from
the beginning of the search process by any bee REFERENCES
u - ordinary number of forward pass, u=1,2,..., U [1] G. Beni, "The concept of Cellular Robotic System", in
Proceedings 1988 IEEE International Symposium on Intelligent
TABLE 2: THE RESULTS COMPARISON Control, Los Alamitos, CA, IEEE Computer Society Press, 1988,
Number of pp.57-62.
Total CPU time [2] G. Beni, J. Wang, "Swarm Intelligence, in Proceedings Seventh
number of Number of established [s] Relative Annual Meeting of the Robotics Society of Japan, Tokyo, RSJ
requested wave-
lengths
lightpathsero %
Press, 1989, pp.425-428.
light-paths ILP BCO- ILP BCO-ero[0]
RWA RWA [3] E.Bonabeau, M. Dorigo, G. Theraulaz, G., "Swarm Intelligence",
1 14 14 4 4.33 0
2 23 23 94 4.58 0 Oxford University Press, Oxford, (1999).
2828 32 27 27 251 4.68 0 [4] S. Camazine, J. Sneyd, "A Model of Collective Nectar Source by
4 28 28 313 4.66 0 Honey Bees: Self-organization Through Simple Rules", Journal of
1 15 14 4 4.73 6.67 Theoretical Biology, vol.149, pp.547-571, 1991.
31 2 25 25 83 5.00 0 [5] P. Lu6i6, D.Teodorovi6, "Bee System: Modeling Combinatorial
3 30 30 235 5.19 0 Optimization Transportation Engineering Problems by Swarm
4 31 31 1410 5.21 0
1 15 14 14 5.19 6.67 Intelligence", in Preprints of the TRISTAN IV Triennial
34 2 27 26 148 5.50 3.70 Symposium on Transportation Analysis, Sao Miguel, Azores
3 33 33 216 5.64 0 Islands, Portugal 2001, pp. 441-445.
4 34 34 906 5.64 0 [6] P. Lucic, D. Teodorovic, "Computing with Bees: Attacking
1 16 15 23 5.64 6.25 Complex Transportation Engineering Problems", International
36 32 27 26 325 6.09 3.70 Journal on Artificial Intelligence Tools, vol. 12, pp. 375-394,
36 34 34 788 6.11 0
4 36 36 1484 6.13 0 2003.
1 17 16 16 5.67 5.88 [7] D. Teodorovic, M. Dell' Orco, "Bee Colony Optimization-A
38 2 28 27 247 6.09 3.57 cooperative learning approach to complex transportation
38 35 35 261 6.23 0 problems" in Abstracts - of 10th EWGT Meeting and 16th Mini
4 38 38 1773 6.33 0 EURO Conference, Poznan, 2005.
1 17 16 31 6.00 5.88 [8] L. Zadeh, "Fuzzy Sets", Information and Control, vol. 8, pp. 338-
40 2 28 27 491 6.28 3.57
4 35 35 429 6.61 0 353, 1965.
4 40 40 1346 6.67 0 [9] G. Markovic, D. Teodorovic, V. Acimovic-Raspopovic, "Routing
and Wavelength Assignment in All-Optical Networks Based on the
Bee Colony Optimization", Submitted for publication, 2006
156