Introduction

Ever since its existence nature has its own perfect way of adapting to changes and finding solutions to all problems coming its way. Nature inspired computing is a new problem solving domain that is derived from nature. Theories evolve when man discovers new knowledge, which was unraveled till date. This process continues as nature has not completely unfolded itself before mankind. Swarm intelligence is a nature inspired computing methodology based on self organizing behavior of natural colonies.

Swarms are a group of distributed agents which can collectively accomplish an intelligent task. Examples of natural swarms are ant colonies, bee colonies, bird flocks, fish schools etc. Ant Colony Optimization (ACO) [1], Particle Swarm Optimization (PSO) [2], Artificial Bee Colony Optimization (ABC) [3], Smell Detection Agents (SDA) [4] are some algorithms based on swarm intelligence. These algorithms have profound application in almost all fields of optimization.

Natural behaviors of honey bees have attracted the attention of researchers in this field. Foraging, mating and queen bee principle are some natural bee swarm behaviors based on which many algorithms are proposed [5, 6]. ABC is a method that has gained a lot of attention in recent times and is derived from foraging behavior of bee swarms in a colony. Natural foraging behavior of honey bees is used for constrained optimization and numerical optimization problems [7]. An algorithm based on social foraging is used to solve a class of resource allocation problems [8]. Migratory Multi-swarm Artificial Bee Colony (MiMSABC) algorithm uses different perturbation schemes of ABC function differently in varying landscapes [9]. An adaptive hybrid artificial bee colony algorithm for thrust allocation in marine repositioning system uses chaotic search strategies of bees with features from PSO and differential evolution [10].

This paper proposes a novel algorithm where multi dimensional view of bee colonies and food sources are considered. Multidimensional swarms, multiple sources, multiple destinations co-ordinate without any centralized control to meet their demands. Swarm bees from different colonies optimally cluster own colonies with maximum food spending minimum energy. Bees might share food from the same source and dynamically adjust their paths in order to optimize their demands.

In multi dimensional honey bee colonies, transportation of food from a source to a destination is based on the energy consumption required by individual swarms. A source with minimum energy consumption will be an optimal choice by foragers. This idea has been developed into a Multi dimensional Honey Bee Foraging (MHBF) algorithm which can be applied in Engineering optimization problems. One such example is the multi objective transportation problem. Cost minimizing transportation problem and bottle neck transportation problems are the two variants of the traditional transportation problem. There is no single derivation method to optimize time and cost together using traditional methods. This method successfully optimizes cost and time involved in the transportation of commodities between source and destination.

Honey Bee Foraging

Bees forage to bring in food to their hive to maximize their storage capacity. The things they forage include nectar, pollen, water, resins etc. depending on the requirements of inmates. They select a food source based on energy consumed in transporting food to the bee colony. Energy consumption depends on the quality of food source and the distance of the food source from destination. Minimum energy will be consumed when transporting high quality food from a shorter distance. Minimum energy consumption will lead to maximum profitability [11]. The factors that affect energy consumption of forager bees are the distance between the source and the destination, food quality, food quantity, weather and temperature. There are also some unpredictable factors like natural disasters, outsider attacks on bee colonies and destruction of nectar sources. These unpredictable factors are not considered in the proposed method

The process of foraging begins when a class of bees called scout bees wander randomly in search of food sources. When scout bees come up with a potential food source, they estimate information like quality and quantity of food, distance between source and colony, direction of source from colony. All gathered information is shared with the unemployed forager bees waiting in the hive by performing a waggle dance. Three main factors that are communicated to the unemployed bees include direction of the food source, distance to food source and food quality.

Each unemployed forager makes a decision on which food source to be chosen. This is based on the profitability of food source which is inversely proportional to the energy consumed for the transportation of food.

Multidimensional Honey Bee Foraging

If a specific geographical area is considered, there exists multiple bee hives and multiple nectar sources. The foraging principle followed in all hives is the same as stated above. In such a scenario, scout bees from the same hive may visit different nectar sources and scout bees from different hives may visit the same nectar sources. After estimating the desirability of each of the nectar sources, scout bees return to their respective hives and share this information to all the unemployed bees that are ready for foraging. It is observed that all unemployed forager bees in different hives select food sources so as to maximize the nectar storage in their respective hives. This distributed optimization behavior of honey bees goes on until the termination criterion is met.

When a food source becomes depleted or extinct alternate arrangements are immediately made by the scouts. The scout bees always try to find new sources. Hence, there will never be a shortage of food sources to meet the demands of the respective hives. From currently available sources, optimal nectar sources are selected by unemployed foragers. This process repeats itself in all hives without any conflicts and centralized co-ordination.

Computational Model

The multi dimensional view of foraging in honey bee colonies is developed into a computational model where many practical optimization problems fit well. In the computational model, food source becomes source node and bee hive becomes destination node. Figure 1 shows graphical representation of the multidimensional source and destination nodes. Si denotes a source node which is the nectar source and Dj is the destination nodes which is bee hive. A line between a source Si and destination Dj shows a potential transportation path between Si and Dj. All potential paths are identified by scout bees during initial search phase.

Fig. 1
figure 1

Source–destination–potential path

Figure 1 shows graphical view of the source nodes, destination nodes and potential paths at a particular computational time. This graphical view keeps on changing as computation proceeds. More source nodes are added to the graph based on the new findings by scout bees. An existing source node is removed when a food source becomes least profitable. The same thing can happen with destination nodes. New destination nodes may be added to the existing model or an old node may be deleted.

Out of all the potential paths listed between a particular destination and source, paths are prioritized by foragers based on their profitability. The factor which determines profitability of a food source is effort. Effort is the measure of energy consumed by a forager in transporting nectar between the respective source and destination. In the computational model framed here, energy is measured by scout bees and shared with the inmates of hive through waggle dance.

Anotherfactor, which affects the energy consumption is distance δij between source Si and destination Dj. As distance increases the energy consumption also increases. The direct proportionality relation between energy E(i,j) and distance δij is written as

$$E_{(i,j)} = \rho \times \delta_{\begin{subarray}{l} ij \\ \end{subarray} }$$
(1)

Speed becomes proportionality constant, ρ, where every bees are assumed with uniform mass and constant speed.

The profitability P(i,j) of a food source Si with respect to a destination Dj is influenced by the energy E(i,j) consumed and the quality of the nectar, Qi, at source Si. Hence profitability of a source Si with respect to a destination Dj can be modeled as directly proportional to quality Qi of the nectar at Si and inversely proportional to the energy E(i,j) from destination Dj. µ is adjustment factor.

$$P_{(i,j)} = \mu \times (Q_{i} /E_{(i,j)} )$$
(2)

Presence of other foragers in the same source Si as measured by a scout from Dj which has a negative effect on the profitability P(i,j). If Nij denotes the number of foragers visiting a food source Si where Nij ≥ 1 as seen by a scout from Dj has a negative impact on the profitability. Hence the profitability measure P(i,j) can be redefined as

$$P_{(i,j)} = \mu \times (Q_{i} /(E_{(i,j)} \times N_{ij} )$$
(3)

P(i,j) is the information estimated by a scout bee returning from a source Si to destination Dj. At a destination node Dj, unemployed foragers observe profitability measure, P(i,j) shared by the successful scouts returning from different sources Si, where i varies from 1 to n. Algorithm 1 is the procedure followed by foragers at each source node.

Algorithm 1: Source

  • Step 1: For each food source Sj in parallel

  • Step 2: Scout from different sources within the permitted vicinity visit the flower.

  • Step 3: Measure presence of other bees near the source as Nij.

  • Step 4: Measure the Quality of the food source Sj as Qi

  • Step 5: Measure the distance of the food source Si from the hive Dj as distance δij

  • Step 6: Calculate the energy consumption required for transporting nectar from source Si to destination Dj

    $$E_{(i,j)} = \rho \times \delta_{\begin{subarray}{l} ij \\ \end{subarray} }$$
  • Step 7: Calculate the profitability P(i,j) of a food source Si with respect to destination Dj

    $$P_{(i,j)} = \mu \times (Q_{i} /(E_{(i,j)} \times N_{ij} )$$

Not all sources nodes listed by scouts become a forager’s choice. Only those nodes with P(i,j) above a particular threshold, Tij, are selected by forager. Tij is selected relatively based on the sources available for foraging to a particular destination. Total number of foragers available at destination Dj proportionally chooses to forage different eligible sources with P(i,j) ≥ Tij and is based on probability measure λ(i,j). Probability with which a forager bee in Dj choose an Si food source is

$$\lambda_{(i,j)} = \frac{{P_{(i,j)} }}{{\sum\nolimits_{i = 1}^{n} {P_{(i,j)} } }}$$
(4)

Number of unemployed foragers, \(X_{ij}\), proportionally divide themselves in such a way that all of them do not move to the most profitable source. Profitable food sources with respect to each destination are determined relatively based on their requirements. So, the total number of foragers Fij visiting a particular source depend relatively on the eligibility of sources in its neighborhood. Foraging in each destination is a continuous process that is repeated until the needs are met optimally.

$$F_{ij} = X_{ij} \times \lambda_{(i,j)}$$
(5)

Hence the multidimensional nectar foraging can be modeled as a multidimensional optimization problem with an objective function so as to maximize the Total Profitability (TPj) of nectar foraging at each destination Dj for all j from 1 to m

$${\text{Maximize}}\;TP_{(j)} = \sum\limits_{i = 1}^{n} {P_{(i,j)} \times F_{ij} }$$
(6)

Algorithm 2 details out steps followed by foragers at each destination node.

Algorithm 2: Destination

  • Step 1: In each destinations Di in parallel until demands are met.

  • Step 2: Scout bees communicate estimated profitability P(i,j) of ith source to the foragers in jth hive through waggle dance.

  • Step 3: Forager bee at Di choose one among the Sj food sources based on probability λ(i,j) above threshold Tij

    $$\lambda_{(i,j)} = \frac{{P_{(i,j)} }}{{\sum\nolimits_{i = 1}^{n} {P_{(i,j)} } }}.$$
  • Step 4: Number of Forager bees from Si visiting a food source Dj where Xij is total unemployed forager available at Dj

    $$F_{ij} = X_{ij} \times \lambda_{(i,j)}$$
  • Step 5: Calculate total profitability TPij of transporting nectar from Si to Dj

    $$TP_{(j)} = \sum\limits_{i = 1}^{n} {P_{(i,j)} \times F_{\begin{subarray}{l} ij \\ \end{subarray} } }$$

Scout bees and forager bees are the decision makers regarding choice of an optimal source. At destination side unemployed forager chooses one from many potential sources based on profitability of each source. Algorithm 3 outlines performance of foragers—both scout bees and employed bees in transporting food between source and destination.

Algorithm 3: Foraging

  • Step 1: For each destination Dj and Source Si in parallel until Demand at hive is satisfied optimally

  • Step 2: Scouts randomly wander in search for a source.

  • Step 3: Scout from Dj measure the profitability of the source Si

    $$P_{(i,j)} = \mu \times (Q_{i} /(E_{(i,j)} \times N_{ij} )$$
  • Step 4: Communicate profitability P(i,j) to unemployed bees waiting in the hive Dj to determine the probability of a source through waggle dance.

  • $$\lambda_{(i,j)} = \frac{{P_{(i,j)} }}{{\sum\nolimits_{i = 1}^{n} {P_{(i,j)} } }}$$
  • Step 5: Discard food source which becomes depleted or less profitable.

Transportation Problem

Transportation problem is a linear programming model with linear objective functions and constraints [11]. It is based on supply and demand of commodities transported between multiple sources and destinations. Two popular variants of transportation problems are Cost Minimizing Transportation Problem (CMTP) and Bottleneck Transportation Problem (BTP). In CMTP an attempt is made to minimize the cost of transportation from source to destination. Transportation time is the optimization factor in Bottleneck transportation problem.

The computational model based on a multidimensional honey bee foraging fits well on the mathematical model of transportation problem. It accommodates uncertainties and dynamism that are features of real world where traditional method designed for static domain fails. Self organizing principles of honey bee colonies make it robust to dynamic changes in environment.

Objective functions of maximizing TPj of each destination Dj in multi-dimensional honey bee foraging includes two factors—cost and time. Proposed algorithm handles transportation problem by mapping cost to quality and time to distance between source and destination. Objective function defined in multidimensional honey bee foraging is designed to consider both cost and time.

Results and Discussions

The computational model is tested on transportation problem which minimizes both cost and time to maximize profit. As required by transportation problem to optimize demands at all destination, honey bees adjust themselves and dynamically go on finding new solutions to meet their targets.

Algorithm is tested for its correctness by fitting computational model to dynamic transportation problem model with multiple destinations and sources. Unemployed bees proportionally choose source Si ≥ Tij. Threshold, Tij was relatively fixed depending on available source nodes. The process terminates when demand is met with maximum profitability. Computational model with n source nodes, m destination nodes have a maximum of mn potential paths. Algorithm runs in linear time at each destinations with time complexity as O(n).

Genetic algorithm applied over fixed cost transportation problem generates a set of feasible solutions based on a single objective of optimizing cost. Evolutionary process using mutation and cross over operator has considerable memory and computational cost when compared to proposed method which involves only simple linear operations.

ACO algorithm is used over variants of transportation problem like vehicle routing problem, traveling salesman problem and for optimizing cost of transporting loads of cross docking network [12]. The results were compared with branch and bound technique, genetic algorithm nearest neighbor algorithm. All these techniques deal with static problem domain to find feasible solutions. The algorithm is scalable to applications of larger dimensions with same performance criteria as computation proceeds in distributed manner.

A supplementary document is attached displaying the experimental results of proposed technique over a specific data sample.

Conclusion

In this paper an algorithm based on honey bee foraging by swarms of distinct hives over multiple food sources has been proposed. Foraging by bee swarms of a particular hive is based on the principle of consuming minimum energy to optimize the food storage at respective bee colonies. Definitude of this algorithm is evaluated by verifying it with multi-objective transportation problem optimizing cost and time which is found as giving promising results. The proposed method can be extended for solving similar multi-dimensional problems involving multiple sources and destinations like network flow problem and resource allocation problem.