Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

Swarm intelligence is a relatively young branch of artificial intelligence. Its beginnings are usually pinpointed in the early 1990s of the past century. At that time Marco Dorigo published his doctoral thesis concerning ant colony systems. After studies on ants, articles related, among others, to termite hills have appeared [11, 43]. Not only insects became the inspiration for researchers interested in “social algorithms.” Indeed, common interest is aroused by V-formations of birds, shoals of fish, or plankton and locust swarms. Studies on bivalves and their use in water intake purity assessment systems are also very interesting. As regards those inspirations, the beginning of the twenty-first century undoubtedly belongs to bees. The bee swarm optimization algorithms make up a collection of algorithms inspired by the behavior of honeybees [34, 35]. Observations performed as early as the mid-twentieth century by the German zoologist Martin Lindauer, who published his study in 1950 are usually regarded as the first ones [30]. Lindauer noted that bees returning to the swarm with food perform a sort of “dance.” Thanks to further observations, Lindauer concluded that only a small percentage of bees participate in making a decision on changing to the new food source. Most bees do not participate in the foraging but wait for the decision to be made by the “dancing” bees, who gradually reduce the number of proposed sources. When a single location is finally selected, most of the bees rise to fly towards the selected food source. Further entomologists proved the theory on the meaning of the dance performed by the bees. They gave incontrovertible proof that a scout bee returning to the hive uses its dance and pheromone to provide information allowing the swarm to figure out the type of food it met. Bees navigate by the sun, therefore the first theory that has been proven was the fact that the angle of the bee body is indicative of the direction of flight relative to the sun. Next, the information is carried by the amplitude of the individual’s vibrations as it is directly proportional to the abundance of the food source, and the length of the movement in a given direction informs the observer about the necessary length of the flight. There are three types of dance used by bees to depict the distance to the food:

  • Round dance: When a food source is near the hive

  • Flourish dance: When that distance exceeds 100 m

  • Crescent dance: When the distance is something between near and 100 m

Figure 13.1 presents the dancing bee and the method of reading the submitted information (Fig. 13.2).

Fig. 13.1
figure 1

The dance used by bees to depict the distance to the food

Fig. 13.2
figure 2

Navigation by the sun

Fig. 13.3
figure 3

Two different directions of flight are submitted in the dance

On the basis of entomologists’ studies, one can also conclude that the dance process is a way of reconciling the opinion of bees on the new location of food, a kind of voting. However, that hypothesis included some inconsistencies, as sometimes bees rose to fly despite the absence of unanimous decision of dancing bees and as the way of voting for dancing bees by other bees could not be observed. This caused formulating and attempting to prove two new hypotheses: a quorum hypothesis, whereby the voting in which the majority of the bees voting for a given nest is sufficient and a consensus hypothesis, denoting agreement of some group of dancing bees. On the basis of experimental studies scientists have managed to exclude the consensus hypothesis, whereas the quorum hypothesis has been confirmed. It turned out that, after reaching the quorum, the scout bees returned to their group at the same time creating the characteristic sound received by the remaining bees which stimulated them to warm up their muscles. This warm-up usually took about an hour and immediately after it bees flew to a new source of food (Fig. 13.3).

The behavior of bees when selecting a new nest can well be used for a decision made by any group. Thanks to three factors defined by scientists studying behavior of bees, such a decision shall always be correct (Fig. 13.4).

Fig. 13.4
figure 4

The dance angle indicates the angle of navigation with regard to the sun

  1. 1.

    Organization allowing knowledge sharing by the entire group. It is much easier to make proper and unanimous decisions thanks to a large number of objects taking part in the decision-making process and correct distribution of knowledge among the objects.

  2. 2.

    The competition, thanks to which every object tries to improve at any time. The more good objects, the easier and quicker the decision-making process can be.

  3. 3.

    Balance, which is defined as making a decision on the basis of the opinion of many objects, keeping to the democracy rules at the same time. As a consequence, wrong decisions do not influence the final decision.

2 ABC (Artificial Bee Colony) Model

The artificial bee colony (ABC) is a model proposed in 2005 by the Turkish scientist Dervis Karaboga. As with other algorithms described herein [12, 13, 26, 28, 29, 32, 33], ABC is also based on the swarm behavior of honey bees. It differs from other algorithms in the application of a higher number of bee types in a swarm [10]. After the initialization phase, the algorithm consists of the following four stages repeated iteratively until the number of repetitions specified by the user is executed [4, 18,19,20] (Fig. 13.5):

  • Employed bees stage

  • Onlooker bees stage

  • Scout bees stage

  • Storage of the best solution thus far

The algorithm starts with initialization of the food source vectors \(\overrightarrow{x}_{m} \) where \(m = 1, \ldots , SN\) and SN, ..., is the population size. Each of those vectors stores n values \(x_{m}, i = 1, \ldots ,n\), that shall be optimized during execution of that method. The vectors are initialized using the formula:

$$\begin{aligned} x_{mi}=l_{i}+rand(0,1)\cdot (u_{i} - l_{i}) \end{aligned}$$
(13.1)

where \(l_{i}\) is the lower limit of the searched range, and \(u_{i}\) is the upper limit of the searched range.

Fig. 13.5
figure 5

The dance duration is proportional to the length of the flight

Bees adapted to different tasks participate in each stage of the algorithm operation. In the case of ABC, there are three types of objects involved in searching [3, 19, 21]:

  • Employed Bees: Bees that search points near points already stored in memory

  • Onlooker Bees: Objects responsible for searching the neighborhood of points deemed the most attractive

  • Scout Bees (also referred to as scouts): Bees that explore random points unrelated in any way to those discovered earlier

Once the initialization phase is completed, Employed Bees start their work. They are sent to places in the neighborhood of already known food sources to determine the amount of nectar available there. The results of the Employed Bees’ work are used by Onlooker Bees. Employed Bees randomly select a potential food source using the following relationship.

$$\begin{aligned} \overrightarrow{v}_{i} = x_{mi}+\varphi _{mi}(x_{mi}+x_{ki}) \end{aligned}$$
(13.2)

where \(\overleftarrow{V}_{i}\) is a vector of potential food sources, \(x_{k} \) is a randomly selected food source, and \(\varphi _{mi}\) is a random number from the range \([-a,a]\).

Once the vector is determined, its fitting is calculated based on the formula dependent on the problem being solved and the fitting \(\overleftarrow{v}_{m}\) is compared with \( \overleftarrow{x}_{m}\). If the new vector fits better than the former one, then the new one replaces the old one.

Another phase of the algorithm operation is the Onlooker Bees stage. They are sent to food sources classified as the best ones and in those very points the amount of available nectar is determined. The probability of the source selection is expressed with the formula:

$$\begin{aligned} p_{m}=\frac{fit_{m}(\overrightarrow{x}_{m})}{\sum _{m=1}^{SN}fit_{m}(\overrightarrow{x}_{m})} \end{aligned}$$
(13.3)

where \(fit_{m}(\overrightarrow{x}_{m})\) is the value of fitting functions for a given source.

Obviously, when Onlooker bees gather information on the amount of nectar, such data are compared with results obtained thus far and if the new food sources are better, they replace the old ones in memory. The last phase of this algorithm operation is exploration by Scouts. Bees of that type select random points from the search space and then check nectar volumes available there. If newly found volumes are higher than the volumes stored thus far, they replace the old volumes. The activity of those bees makes it possible to explore the space unavailable for the remaining types of bees thus allowing omitting any extremes.

3 Selected OFN Issues

There are researchers who focus on certain aspects of fuzzy logic application in artificial bee colony optimization. Their articles are literally related to Zadeh’s fuzzy sets and the fuzzy number arithmetics arose from them chronologically. Combining the Ordered Fuzzy Numbers (OFNs) with artificial bee colony optimization has not been proposed thus far. Articles describing such a hybrid approach to optimization tasks using ant colony algorithms are named OFNAnt [5, 6, 8, 31].

Basic research on many aspects of OFNs has been published in many papers of the creator of this concept, W. Kosinski [14, 23,24,25, 39, 40], and of a broad group of researchers who cooperated with him in this field of science [1, 7, 10, 15,16,17, 22, 27, 42]

[2, 9]. However, it is not the purpose here to cite the well-developed and well-known deliberations on the OFN, which, in some of the new articles, are also known as Kosinski’s fuzzy numbers (KFNs) [36,37,38, 41].

Fig. 13.6
figure 6

OFN describes the information from a scout bee

4 New Hybrid OFNBee Method

Application of OFN notation in artificial bee colony optimization seems to be a completely natural way to describe the behavioral mechanisms observed in a hive and mentioned above. The input data are pieces of information carried by a single bee:

  • The direction to the food location

  • The angle of navigation by the sun

  • The flight length

  • Abundance of the food source

Figure 13.6 shows the OFN describing information delivered by a Scout bee:

  • aF: Angle between the sun and the food source

  • sF: Food quantity

  • dF: Distance to the food. Figure 13.6a shows the food that has to be reached by flying at the aF angle in relation to the sun’s position. Figure 13.6b includes selected information containing this angle. The arm with the symbolically marked bee represents the distance to food dF, and the amplitude of vibrations marked with a sine wave reflects the amount of food sF. An Ordered Fuzzy Number is determined as follows. First support(A) is determined, which is the base of the trapezoid. Then the rising edge f(x) is drawn at the angle of \(90^\circ - aF\). The second base of a trapezoid is laid off from the point in which the function f(x) intersects with \(y = 1\). At the end one has just to connect two ends of the trapezoid bases using the falling edge function g(x). Consecutive steps are presented using a pseudocode: Pseudokod ABC:

    1. 1.

      Initialize the population of solutions \(x_{i,j}\).

    2. 2.

      Evaluate the population.

    3. 3.

      Cycle = 1.

    4. 4.

      Repeat.

    5. 5.

      Produce new solutions (food source positions) \(v_{i,j}\) in the neighborhood of \(x_{i,j}\) for the employed bees using the formula \(v_{i,j} = x_{i,j} + \phi _{ij}(x_{i,j} - x_{k,j})\) (k is a solution in the neighborhood of i, and \(\phi \) is a random number in the range [-1,1]) and evaluate them.

    6. 6.

      Apply the greedy selection process between \(x_{i}\) and \(v_{i}\).

    7. 7.

      Calculate the probability values \(P_{i}\) for the solutions xi by means of their fitness values using the Eq. 13.4

      $$\begin{aligned} P_{i}= \frac{fit_{i}}{\sum _{i=1}^{SN}fit_{i}}. \end{aligned}$$
      (13.4)

      In order to calculate the fitness values of solutions we employed the Eq. 13.5:

      $$\begin{aligned} fit_{i}= \left\{ \begin{array}{lcl} \frac{1}{1+f_{i}}&{} if &{} f_{i} \ge 0\\ 1+ abs(f_{i})&{}if&{} f_{i} \le 0\\ \end{array} \right\} . \end{aligned}$$
      (13.5)

      Normalize \(P_{i}\) values into [0,1].

    8. 8.

      Produce the new solutions \(?_{i}\) for the onlookers from the solutions \(x_{i}\), selected depending on \(P_{i}\), and evaluate them.

    9. 9.

      Apply the greedy selection process for the onlookers between \(x_{i}\) and \(v_{i}\).

    10. 10.

      Determine the abandoned solution (source), if it exists, and replace it with a new randomly produced solution \(x_{i}\) for the Scout using the Eq. 13.6

      $$\begin{aligned} x_{ij}=min_{j}+rand(0,1)*(max_{j}-min_{j}). \end{aligned}$$
      (13.6)
    11. 11.

      Memorize the best food source position (solution) achieved thus far.

    12. 12.

      Cycle = cycle \(+\) 1.

    13. 13.

      Until cycle = maximum cycle number (MCN).

5 Experimental Results

This section includes results of our own tests solved using the OFNBee algorithm. Ten calculations were performed for each of the three optimization problems described below. Average values were calculated from the obtained results and then compared with results available in the literature for the classic ABC algorithm. Program settings for individual problems are presented in Table 13.1. where individual abbreviations mean, respectively:

  • Number of populations: NS

  • Number of iterations: MC

  • Change rate: MR

  • Scout generation time: SPP

For the first tested problem, the welded beam, the best results for program settings were obtained by the classic ABC algorithm and are shown in Table 13.2. The fillet weld width is defined by the variable x1, and x2 is the parameter defining the weld length, x3, the beam height, and x4, the beam width. After listing and comparing the results obtained using OFNBee and the classic ABC algorithm, one can notice that the solutions are similar. The result of the experiment for the objective function differs from the second decimal place which confirms repeatability of good results (Fig. 13.7). Another problem tested in the experiment is the pressure vessel problem. The wanted variables are shown in Fig. 13.8. The aim of this experiment is to minimize the total material costs of the cylinder and its welding. Solutions found by the ABC algorithm for this problem for given program settings are shown in Table 13.3. Comparing the experimental outcomes with the results available in the literature one can notice that there are no significant differences for variables from x1 to x3 whereas for variable x4 a bigger difference occurs which may significantly impact the final objective of the problem. However, for relatively large limits of the variables, the experiment result is satisfactory. In the speed reducer optimization problem, its mass is minimized. The test results for that problem are given in Table 13.4. In this case seven variables are subject to limitations, as shown in Fig. 13.9. The variables define, respectively: x1, surface width; x2, teeth pitch module; x3, number of teeth of a gear; x4, length of the first shaft between bearings; x5, length of the second shaft between bearings; x6, diameter of the first shaft; and x7, diameter of the second shaft.

Table 13.1 Program settings for the tested design problems
Table 13.2 Parameters and value limits of the best solutions obtained for the welded beam problem
Fig. 13.7
figure 7

Welded beam optimization problem

Fig. 13.8
figure 8

Pressure vessel optimization problem

Table 13.3 Parameters and value limits of the best solutions obtained for the pressure vessel optimization problem
Table 13.4 Parameters and value limits of the best solutions obtained for the speed reducer problem
Fig. 13.9
figure 9

Speed reducer optimization problem

After listing and comparing the results one can notice that there are only very minor deviations for individual variables. In this problem, the objective function differs very little from the results available in the literature. That may be caused by narrow intervals of the variables and numerous limits for the function.

6 Conclusion

The structure of the ABC solutions allows adjusting the algorithm very freely to the newly raised problem. This makes it very useful in solving multiobjective optimization problems. Its second important feature is the algorithm’s fast operation. Thanks to the modification that consists in application of the Ordered Fuzzy Numbers to determination of the objective function, the obtained result is of better quality. The algorithm operation time has improved as well. It should be noted that in each of the three analyzed benchmarks (tested problems), the results obtained using the OFNBee algorithm are at least as good and often better than without the modification. The authors analyzed the welded beam optimization problem, pressure vessel optimization problem, and the speed reducer optimization problem. The results of the conducted experiments are presented in Tables 13.1, 13.2, and 13.3. In the future, we plan to extend the field of OFN application to the calculations in several artificial bee colony algorithms. We expect that it could give some interesting results.