Honey-Bees Mating Optimization (HBMO) Algorithm: A New Heuristic Approach For Water Resources Optimization
Honey-Bees Mating Optimization (HBMO) Algorithm: A New Heuristic Approach For Water Resources Optimization
DOI: 10.1007/s11269-005-9001-3
C Springer 2006
Key words: honey-bees mating optimization, genetic algorithm, heuristic search, non-linear opti-
mization, single-reservoir operation
Introduction
Traditional optimization search methods may be classified into two distinct groups:
direct-search and gradient-based search methods. In direct-search methods, only
the objective function and constraint values are used to guide the search strategy,
whereas gradient-based methods use the first and/or second-order derivatives of the
objective function and/or constraints to guide the search process. Since derivative
information is not used, direct-search methods usually require many function eval-
uations for convergence. For the same reason, they can also be applied to a variety
of problems without a major change in the algorithm. In contrast, gradient-based
methods often quickly converge to an optimal solution, but are not efficient in
non-differentiable or discontinuous problems. In addition, there are some common
662 OMID BOZORG HADDAD ET AL.
difficulties with most of the traditional direct and gradient-based techniques, such
as: (1) the convergence to a suboptimal solution, with pre-mature convergence;
(2) an algorithm efficiency varies depending on the particular problem; (3) algo-
rithms are not efficient in handling problems having discrete variables; and (4)
algorithms cannot be efficiently used on a parallel machine, should they be deemed
useful.
In most engineering problems, some variables may be restricted to take dis-
crete values only. A usual practice to deal with such problems is to assure that
all variables are continuous during the optimization process, choosing an avail-
able size closer to the obtained solution. In this case, the optimization algorithm
must spend enormous time in computing infeasible solutions, causing an inefficient
search effort. In addition, post-optimization calculations on a large number of dis-
crete variables, and few other problems can be eliminated if only feasible values
of the variables are allowed during the optimization process. Thus, for one rea-
son or another, traditional search methods may not be good candidates as efficient
optimization algorithms for a broad range of engineering design and operation prob-
lems. Over the last decade, evolutionary and meta-heuristic algorithms have been
extensively developed and used as search and optimization tools in various problem
domains. Among them, genetic algorithms (GAs) have been extensively employed
as search and optimization methods in various problem domains, including science,
commerce, biology, and engineering (Esat and Hall, 1994; Gen and Cheng, 1997;
Wardlaw and Sharif, 1999). Particularly, codes are available for solving multimodal
problems (Goldberg et al., 1992), multi-objective problems (Jaszkiewicz, 2001),
scheduling problems, as well as Neuro-Fuzzy-GA implementation (Brasil et al.,
1998).
Modeling the behavior of social insects, such as ants and bees, and using these
models for search and problem-solving are the context of the emerging area of
swarm intelligence. Ant colony is a typical successful swarm-based approach to
optimization, where the search algorithm is inspired by the behavior of real ants.
Ant colony algorithms as evolutionary optimization algorithms were first proposed
by Dorigo (1992) and Dorigo et al. (1996) as a multi-agent approach to different
combinatorial optimization problems like the traveling salesman problem and the
quadratic assignment problem. Later, Dorigo and Di Caro (1999) introduced a gen-
eral ant colony optimization algorithm (ACOA) namely ant colony meta-heuristic,
which enables them to be applicable to other engineering problems (Dorigo et al.,
2000). Successful application of ACO to some water resources design and opera-
tion problems have been reported (Abbaspour et al., 2001; Simpson et al., 2001;
Jalali et al., 2006).
Honey-bees mating may also be considered as a typical swarm-based approach
to optimization, in which the search algorithm is inspired by the process of mating
in real honey-bees. The behavior of honey-bees is the interaction of their (1) genetic
potentiality. (2) ecological and physiological environments, and (3) the social con-
ditions of the colony, as well as various prior and ongoing interactions between these
HONEY-BEES MATING OPTIMIZATION (HBMO) ALGORITHM 663
three parameters (Rinderer and Collins, 1986). Each bee undertakes sequences of
actions which unfold according to genetic, ecological, and social conditions of the
colony. Honey-bees are also used to model agent-based systems (Perez-Uribe and
Hirsbrunner, 2000). In a recent work, Abbass (2001a, b), developed an optimization
algorithm based on the honey-bees mating process.
In this paper, a honey-bees mating-based optimization algorithm is developed
and its performance is tested using three well defined and highly nonlinear bench-
mark mathematical functions, as well as developing an optimum operation policy
for a single reservoir.
Honey-bees Modeling
The mating–flight may be considered as a set of transitions in a state-space (the
environment) where the queen moves between the different states in some speed
and mates with the drone encountered at each state probabilistically. At the start of
the flight, the queen is initialized with some energy content and returns to her nest
when her energy is within some threshold from zero or when her spermatheca is
full.
In developing the algorithm, the functionality of workers is restricted to brood
care (i.e., nurse bees), and therefore, each worker may be represented as a heuristic
which acts to improve and/or take care of a set of broods (i.e., as feeding the future
queen with royal jelly). A drone mates with a queen probabilistically using an
annealing function as (Abbass, 2001a):
( f )
Prob (Q, D) = e− S(t) (1)
where Prob (Q, D) is the probability of adding the sperm of drone D to the sper-
matheca of queen Q (that is, the probability of a successful mating); ( f ) is the
absolute difference between the fitness of D (i.e., f (D)) and the fitness of Q (i.e.,
f (Q)); and S(t) is the speed of the queen at time t. It is apparent that this function
acts as an annealing function, where the probability of mating is high when either
the queen is still in the start of her mating–flight and therefore her speed is high, or
when the fitness of the drone is as good as the queen’s. After each transition in space,
HONEY-BEES MATING OPTIMIZATION (HBMO) ALGORITHM 665
the queen’s speed, S(t), and energy, E(t), decay using the following equations:
where α is a factor ∈ [0, 1] and γ is the amount of energy reduction after each
transition. Thus, an Honey-Bees Mating Optimization (HBMO) algorithm may be
constructed with the following five main stages (Abbass, 2005a):
1. The algorithm starts with the mating–flight, where a queen (best solution) selects
drones probabilistically to form the spermatheca (list of drones). A drone is then
selected from the list at random for the creation of broods.
2. Creation of new broods (trial solutions) by crossoverring the drones’ genotypes
with the queen’s.
3. Use of workers (heuristics) to conduct local search on broods (trial solutions).
4. Adaptation of workers’ fitness based on the amount of improvement achieved
on broods.
5. Replacement of weaker queens by fitter broods.
The fitness of the resulted genotype is determined by evaluating the value of the
objective function of the brood genotype and/or its normalized value. It is important
to note that a brood has only one genotype.
The algorithm starts with three user-defined parameters and one predefined
parameter. The predefined parameter is the number of workers, representing the
number of heuristics encoded in the program. However, the predefined parameter
may be used as a user parameter to alter the number of active heuristics if required;
that is, the user may choose the first heuristic, where the number of workers is less
than or equal to the total number of heuristics encoded in the program. The three
user-defined parameters are the number of queens, the queen’s spermatheca size
(representing the maximum number of matings per queen in a single mating-flight),
and the number of broods that will be born by all queens.
Figure 1 shows a computational flowchart and translation of biological and
natural processes in honey-bees mating into an algorithm. This figure clearly maps
biological processes into a mathematical representation as well as identifying the
steps taken in the optimization process.
A set of queens and their energy and speed at the start of each mating-flight is
then initialized at random. A randomly selected heuristic is used to improve the
genotype of each queen, assuming that a queen is usually a good bee. A number
of mating-flights are then undertaken. In each mating-flight, all queens fly based
on the energy and speed of each, where both energy and speed are generated at
random for each queen before each mating flight commences. At the start of a
mating-flight, a drone is generated at random and the queen is positioned over that
drone. The transition made by the queen in space is based on her speed which
represents the probability of flipping each gene in the drone’s genome. At the start
of a mating-flight, the speed may be higher and the queen may make very large
steps in space. While the energy of the queen decreases, the speed decreases and as
a result the neighborhood covered by the queen decreases. At each step in space,
the queen mates with the drone encountered at that step using the probabilistic rule
in Equation (1). If the mating is successful (i.e., the drone passes the probabilistic
decision rule), the drone’s sperm is stored in the queen’s spermatheca. One may
note that each time a drone is generated, half of his genes are marked at random, to
make them inactive, since each drone is haploid by definition. Therefore, the genes
that will be transmitted to the broods are fixed for each drone.
When all queens complete their mating-flight, they start breeding. For a required
number of broods, a queen is selected in proportion to her fitness and mated with a
randomly selected sperm from her spermatheca. A worker is chosen in proportion
to its fitness to improve the resultant brood. After all broods are being generated,
they are sorted according to their fitness. The best brood replaces the worst queen
until there is no brood that is better than any of the queens. Remaining broods
are then killed and a new mating-flight starts until all assigned mating-flights are
completed or convergence criteria met. The main steps in a HBMO algorithm are
presented in Figure 1.
HONEY-BEES MATING OPTIMIZATION (HBMO) ALGORITHM 667
Algorithm Application
To test the performance of the proposed algorithm, it was applied to several bench-
mark constrained and unconstrained mathematical optimization functions. The first
example of unconstrained optimization is Ackley’s function, a continuous and
multi-modal test function obtained by modulating an exponential function with
a cosine wave of moderate amplitude. Its topology is characterized by an almost
flat outer region and a central hole or peak where modulations by cosine wave
668 OMID BOZORG HADDAD ET AL.
Example Spermatheca Max no. of Best fitness Worst fitness Average over Standard
number size mating flight value value 10 runs deviation
Figure 2. Surface defined by Ackley’s function for (a) −30 ≤ x1 , x2 ≤ 30 and (b) −6 ≤
x1 , x2 ≤ 6.
As is clear from Figure 5, the search space is a highly non-linear and multi-modal
surface. Again, by employing the proposed HBMO algorithm, the best fitness value
was obtained as 38.850300 with an average over 10 runs of 38.850294, indicating
a very small standard deviation (Table I). The best, worst, and average rate of
convergence for 10 runs is presented in Figure 6. Solving the same problem with GA,
the best run was terminated after 1,000 generations, obtaining the best chromosomes
in the 419th generation as follows (Gen and Cheng, 1997):
Results from the GA and HBMO algorithm converge well with minor improve-
ment in the HBMO solution. All 10 runs have almost converged to the global optimal
670 OMID BOZORG HADDAD ET AL.
1
Worst
0.9 Average
Best
0.8
Normalized Fitness Function
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 20 40 60 80 100 120 140 160
Number of Mating Flights
Figure 3. Rate of convergence of first example problem for the best, worst, and average over
10 runs.
solution within 200 to 500 mating flights. Standard deviation of the final results is
practically zero (Table I). To compare the rate of convergence in the HBMO algo-
rithm, a GA was also developed. Convergence of the objective function is presented
in Figure 7. Once again for all ranges of number of function evaluations, the HBMO
algorithm performed slightly better than the GA used for this purpose.
To test the performance of the proposed algorithm in handling constrained
models, it was applied to a two-variable, two-constraint nonlinear programming
problem as (Figure 8):
2
2
Min f 1 (x1 , x2 ) = x12 + x2 − 11 + x1 + x22 − 7 (10)
s.t.:
g1 (x) ≡ 5.062 − x12 − (x2 − 2.5)2 ≥ 0 (11)
g2 (x) ≡ (x1 − 0.05) + (x2 − 2.5) − 4.84 ≥ 0
2 2
(12)
0 ≤ x1 ≤ 6, 0 ≤ x2 ≤ 6 (13)
0.0000
HBMO
-0.0005 GA
-0.0010
-0.0015
Objective Function Value
-0.0020
-0.0025
-0.0030
-0.0035
-0.0040
-0.0045
-0.0050
-0.0055
-0.0060
0 100 200 300 400 500 600 700 800 900
Thousands
Employing the same algorithm, the average fitness value over 10 runs was ob-
tained as f 1 (x1∗ , x2∗ ) = 13.628688, with the best result as low as 13.590840. Details
are provided in Table I. Figure 9 shows how the HBMO solutions converge to a
narrow region of feasible solutions and finally to the true optimum solution for
10 different runs. Clearly, the best and the worst solutions reveal a very rapid rate
of convergence to the near optimal solution. Again all ten runs show a very small
discrepancy with the final result as indicated by a very small value of the standard de-
viation (Table I). The rate of convergence to a near-optimal solution for the proposed
HBMO algorithm and GA is presented in Figure 10. Regardless of slight variations
in the rate of convergence, after 6 million function evaluations, the HBMO algo-
rithm ended up with a better performance in minimizing the defined constrained
function.
1
Worst
0.9 Average
Best
0.8
Normalized Fitness Function
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 50 100 150 200 250 300 350 400
Number of Mating Flights
Figure 6. Rate of convergence of second example problem for the best, worst, and average
over 10 runs.
HONEY-BEES MATING OPTIMIZATION (HBMO) ALGORITHM 673
38.86
38.84
38.82
Objective Function Value
38.80
38.78
38.76
38.74
38.72
HBMO
GA
38.70
0 100 200 300 400 500 600 700 800
Thousands
Number of Function Evaluations
Figure 9. Rate of convergence of third example problem for the best, worst, and average over
10 runs.
21
20.5 HBMO
GA
20
19.5
19
Objective Function Value
18.5
18
17.5
17
16.5
16
15.5
15
14.5
14
13.5
0 1000 2000 3000 4000 5000 6000
Thousands
Number of Function Evaluations
Figure 10. Variation of the objective function with number of function evaluations using
HBMO and CPGA for the third example (averaged over 10 runs).
HONEY-BEES MATING OPTIMIZATION (HBMO) ALGORITHM 675
1800
1700 Demand
1600 Inflow
1500
1400
1300
1200
Volume (106 m3)
1100
1000
900
800
700
600
500
400
300
200
100
0
1 13 25 37 49
Month
Figure 11. Monthly inflow to the reservoir along with monthly demand.
nt
2
Min TSD = R(t) − D(t) Dmax (14)
t=1
s.t.:
S(t) = S(t + 1) − Q(t) + R(t); ∀t (15)
Rmin (t) ≤ R(t) ≤ Rmax (t); ∀t (16)
Smin (t) ≤ S(t) ≤ Cap; ∀t (17)
S(1) = Smin (18)
In this problem, one queen with 160 drones were employed in each mating flight
(or iteration), with the total number of mating flights and queen’s spermatheca
capacity limited to 50 and 30, respectively. Results of the model for storage volume
at the end of each period, for the best run, are presented in Figure 12. For the
same problem, along with the global optimum, monthly releases resulting from
the HBMO model with 50 mating flights (or iterations) is presented in Figure 13.
Monthly demand and the global optimum results are presented in the same figure. In
order to have a notion of the rate of convergence of the model, Figure 14 is presented.
Very rapid convergence, as well as comparable TSD from the target demands makes
the approach and algorithm quite promising for further development and application
in the field of water resources planning and management. To be specific, results of
10 different runs, with their statistical measures are presented in Table II. One may
676 OMID BOZORG HADDAD ET AL.
3400
3200 HBMO
3000 Global Optimum
2800
2600
Monthly Storage (10 m )
2400
3
2200
6
2000
1800
1600
1400
1200
1000
800
600
400
200
0
1 13 25 37 49 61
Month
1000
950 Demand
900 HBMO
850 Global Optimume
800
750
Monthly Release (106 m3)
700
650
600
550
500
450
400
350
300
250
200
150
100
50
0
0 12 24 36 48 60
Month
Figure 13. Monthly releases resulting from the HBMO model and the global optimum.
note that the global optimum TSD from target demands is 1.07, which is less than
3 percent from the best result of the HBMO algorithm.
To test the effect of the discretization scheme on the final solution, the entire
search space was discretized into 3, 6, and 12 uniform grids. Results are depicted
in Figure 15 for different number of function evaluations. For the finer discretized
HONEY-BEES MATING OPTIMIZATION (HBMO) ALGORITHM 677
Table II. Reservoir operation problem: Ten different runs with their statistical measures
Iteration Standard Coefficient
number 1 2 3 4 5 6 7 8 9 10 Mean Min. Max. deviation of variation
Value of 1.32 1.34 1.14 1.27 1.28 1.14 1.43 1.10 1.24 1.34 1.26 1.10 1.43 0.11 0.084
fitness
function
2.5
2.4
2.3
2.2
Value of Fitness Function
2.1
2
1.9
1.8
1.7
1.6
1.5
1.4
1.3
1.2
1.1
1
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50
Number of Mating Flights
Figure 14. Rate of convergence of the model in reservoir operation problem to a near optimal
solution.
5.0
NS=3
NS=6
4.5
NS=12
Continuous
4.0
Objective Function Value
3.5
3.0
2.5
2.0
1.5
1.0
0 20 40 60 80 100 120 140 160 180 200 220
Thousands
1.6
HBMO
GA
1.5
1.4
Objective Function Value
1.3
1.2
1.1
1.0
0.9
0.8
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000
Thousands
Number of Function Evaluations
Figure 16. Convergence to a near optimal solution as a function of number of function evalu-
ations in reservoir operation problem (averaged over 10 runs).
scheme, the final results approach the near-optimal solution from a real value coding
for a continuous search space. Figure 16 shows the performance of the proposed
HBMO algorithm compared with that of the GA. As is clear, for the best run, after
6 million function evaluations, the HBMO generated a significantly better solution.
It is interesting to mention that the significantly better performance of the HBMO
in the last 4.5 million function evaluations may mainly be attributed to the active
contribution of heuristic functions employed in the breeding and queen’s feeding
process.
Concluding Remarks
HBMO as a search hybrid algorithm is inspired by the process of real honey-
bees mating. A very limited attempt has been made to employ honey-bees’ so-
cial behavior in real-world optimization. The modeling of honey-bees’ mating
process as an optimization algorithm and its application to several highly nonlin-
ear constrained and unconstrained optimization problems, partially revealed the
high potential of the proposed algorithm to solve nonlinear optimization prob-
lems. A mating flight is considered as a set of transition in a state-space en-
vironment in which the queen mates with the drones probabilistically. An an-
nealing function defines the probability of mating drones with the queen where
the number of predefined heuristic functions improves the generated solutions.
HONEY-BEES MATING OPTIMIZATION (HBMO) ALGORITHM 679
Results obtained are well comparable with those obtained by well developed
GAs. The model performance in a real-world reservoir operation problem is
promising. Test application of the algorithm revealed its capacity in conduct-
ing an extensive search in the entire search space. The algorithm performed
quite well in problems with combination of discrete and real-valued decision
variables.
References
Abbaspour, K. C. and Schulin, R., and van Genuchten, M. T., 2001, ‘Estimating unsaturated soil
hydraulic parameters using ant colony optimization’, Adv. Water Resour. 24(8), 827–933.
Abbass, H. A., 2001a, ‘Marriage in honeybees optimization (MBO): A haplometrosis polygynous
swarming approach’, in The Congress on Evolutionary Computation, CEC2001, Seoul, Korea,
May 2001, pp. 207–214.
Abbass, H. A., 2001b, ‘A monogenous MBO approach to satisfiability, in The International Conference
on Computational Intelligence for Modelling’, Control and Automation, CIMCA’2001, Las Vegas,
NV, USA.
Brasil, L. M., de Azevdo, F. M., Barreto, J. M., and Noirhomme, M., 1998, ‘Training algorithm for
Neuro-Fuzzy-GA systems’, in Proc. 16th IASTED International Conference on Applied Infor-
matics, AI’98, Garmisch-Partenkirchen, Germany, pp. 45–47.
Dietz, A., 1986, ‘Evolution’, in T. E. Rinderer (ed.), Bee Genetics and Breeding, Academic Press Inc.,
N.Y. pp. 3–22.
Dorigo, M., 1992, ‘Optimization, learning and natural algorithms’, Ph.D. Thesis, Politecnico di Mi-
lano, Milan, Italy.
Dorigo, M., Bonabeau, E., and Theraulaz, G., 2000, ‘Ant algorithms and stigmergy’, Future Gener-
ation Computer Systems 16, 851–871.
Dorigo, M. and Di Caro, G., 1999, ‘The ant colony optimization metaheuristic’, in D. Corne, M.
Dorigo, and F. Glover (eds.), New Ideas in Optimization, McGraw-Hill, Maidenhead, London,
pp. 11–32.
Dorigo, M., Maniezzo, V., and Colorni, A., 1996, The ant system: Optimization by a colony of
cooperating ants, IEEE Trans. Syst. Man. Cybern. 26, 29–42.
Esat, V. and Hall, M. J., 1994, ‘Water resources system optimization using genetic algorithms’,
in Hydroinformatics’ 94, Proc., 1st Int. Conf. on Hydroinformatics, Balkema, Rotterdam, The
Netherlands, pp. 225–231.
Gen, M. and Cheng, R., 1997, ‘Genetic Algorithm and Engineering Design’, John Wiley and Sons,
N.Y.
Goldberg, D. E., Deb, K., and Horn, J., 1992, ‘Massive multimodality, deception, and genetic algo-
rithms’, in R. Manner and B. Manderick (eds.), Parallel Problem Solving from Nature, Elsevier:
Amsterdam, 2, pp. 37–46.
Jalali, M. R., Afshar, A., and Mariño, M. A., (2006). ‘Reservoir operation by ant colony optimization
algorithms.’ Iranian Journal of Science and Technology, Shiraz, Iran, in press.
Jaszkiewicz, A., 2001, ‘Multiple objective metaheuristic algorithms for combinatorial optimization,
Habilitation Thesis’, Poznan University of Technology, Poznan.
Laidlaw, H. H. and Page, R.E., 1986, ‘Mating designs, in T. E. Rinderer (ed.), Bee Genetics and
Breeding’, Academic Press, Inc., pp. 323–341.
Moritz, R. F. A. and Southwick, E. E., 1992, Bees as Superorganisms, Springer Verlag, Berlin,
Germany.
Page, R. E., 1980, ‘The evolution of multiple mating behavior by honey bee queens (Apis mellifera
L.)’, Journal of Genetics 96, 263–273.
680 OMID BOZORG HADDAD ET AL.
Perez-Uribe, A. and Hirsbrunner, B., 2000, ‘Learning and foraging in robot-bees, in Meyer, Berthoz,
Floreano, Roitblat and Wilson (eds.)’, SAB2000 Proceedings Supplement Book, Intermit. Soc. for
Adaptive Behavior, Honolulu, Hawaii, pp. 185–194.
Rinderer, T. E. and Collins, A. M., 1986, ‘Behavioral genetics, in T. E. Rinderer (ed.), Bee Genetics
and Breeding’, Academic Press, Inc., pp. 155–176.
Simpson, A. R. Maier, H. R., Foong, W. K., Phang, K. Y., Seah, H. Y., and Tan, C. L., 2001, ‘Selection
of parameters for ant colony optimization applied to the optimal design of water distribution
systems’, in Proc., Int. Congress on Modeling and Simulation. Canberra, Australia, pp. 1931–
1936.
Wardlaw, R. and Sharif, M., 1999, ‘Evaluation of genetic algorithms for optimal reservoir system
operation’, J. Water Resour. Plng. and Mgmt. ASCE, 125(1), 25–33.