Artificial bee colony algorithm variants on constrained optimization

Article History: Received 29 September 2016 Accepted 15 November 2016 Available 12 January 2017 Optimization problems are generally classified into two main groups: unconstrained and constrained. In the case of constrained optimization, special techniques are required to handle with constraints and to produce solutions in the feasible space. Intelligent optimization techniques that do not make assumptions on the problem characteristics are preferred to produce acceptable solutions to the constrained optimization problems. In this study, the performance analysis of artificial bee colony algorithm (ABC), one of the intelligent optimization techniques, is examined on constrained problems and the effect of some modifications on the performance of the algorithm is examined. Different variants of the algorithm were proposed and compared in terms of efficiency and stability. Depending on the results, when DE operators were integrated into ABC algorithm, an enhancement in the performance was gained in addition to preserving the stability of the basic ABC. The ABC algorithm is a simple optimization algorithm that can be efficiently used for constrained optimization without requiring a priori knowledge.


Introduction
Design problems are optimization problems in which the parameters of the system are decided in order to obtain the best performance.Formulating design problems as optimization problems and solving them by using an appropriate optimization tool minimizes the experimental costs and errors.In most of the design problems, problems have some constraints that the solutions must satisfy.
Traditional optimization algorithms are not successful when the problems are nonlinear and have many constraints and discrete variables.Evolutionary algorithms (EAs) [1] that mimic the genetic inheritance and natural selection do not make assumptions on the problem characteristics and can be used for constrained, nonlinear design problems successfully [2].In EAs, a population of solutions are assigned fitness values and new child solutions are produced after reproduction, mutation, crossover operators.Better solutions are retained in the population applying a selection operator and the population quality is increased which means convergence to better solutions.Swarm intelligence (SI) based algorithms employ similar operators to those of evolutionary algorithms while SI algorithms are also capable of using collective intelligence coming due to the interactions of individuals in the swarm.Genetic algorithm [3], Differential Evolution [4] are typical examples of EAs; Ant Colony Optimization [5], Particle Swarm Optimization [6] and Artificial Bee Colony [7] algorithms are examples of SI based algorithms.
All these algorithms were initially proposed for unconstrained optimization and their basic versions did not have any mechanism to produce solutions in feasible space or to prefer feasible solution to infeasible one.Some operators are integrated to the algorithms in order to search the feasible space and solve constrained problems such as *Corresponding Author transforming operator that preserve feasibility of solutions, penalty functions to penalize constraint violations in the cost function, distinction operator that separate feasible and infeasible, hybrid methods that incorporates evolutionary methods and deterministic procedures [8].Artificial Bee Colony Algorithm proposed for constrained optimization [9,10] prefers feasible solutions to infeasible solutions applying Deb's rules [11] in the selection phase.Another modification in basic ABC concerns fitness assignment scheme which considers both feasible solutions and infeasible solutions because the population can include both types of solutions to maintain diversity in the population.Although there are some studies related to ABC on the constrained optimization, effect of the neighbor production mechanism has not been studied to analyze how they cover feasible space or whether they are capable of making distinction between feasible and infeasible space or which one is more efficient for constrained optimization.In this study, various ABC algorithm variants, which employ different neighbor productions mechanisms and neighborhood topologies, are analyzed in terms of success rates.Effect of the neighbor solution production in the search behavior of the algorithms and in the convergence are investigated.Basic ABC algorithm for unconstrained optimization and proposed ABC algorithm variants for constrained optimization are summarized in the second and the third sections, respectively.In the forth section, the experimental studies are presented and the results are discussed.The last section is dedicated to the conclusion.

Artificial bee colony algorithm
Honey bees perform many intelligent tasks and foraging is one of the most important tasks in the colony.The foraging is performed using the collective intelligence based on the communication and interaction of the bees.Bees are specialized depending on the task they are assigned to.In a real colony, there are three types of bees assigned to the foraging task: employed bees, onlooker bees and scout bees.The scout bees search for new food sources of which the nectar will be loaded to the hive.Discovered sources are exploited by the employed bees and the employed bees share information with the onlooker bees who wait in the hive.Onlooker bees select a food source to fly based on the information taken from the employed bees.When a source is exhausted, it is abandoned and its bee switches her role to a scout bee.In the foraging task, bees try to maximize the nectar amount loaded to hive by finding the most profitable sources in the environment.ABC algorithm [7] simulates the foraging behavior of honey bees in nature.Locations of the food sources correspond to the parameters of the problem and finding the location of the most profitable source is an optimization problem.Nectar amount of the solution is measured by the fitness of a parameter vector.Main steps of the algorithm are given in Alg.1: Algorithm 1. Pseudo-code of ABC algorithm

9:
Memorize the best solution so far 10: In the initialization phase of the algorithm, values are passed to the control parameters: the number of food sources (CS), maximum cycle number (M CN ) and the limit that controls whether a source is exhausted or not.If the problem has D parameters to be optimized, a population of CS number of D dimensional solutions are generated randomly using Eq. 1.
where x j min and x j max are lower and upper bound of the parameter j, respectively.In the evaluation phase, each solution is substituted in the cost function and assigned a fitness value using the cost function associated with the problem.Subsequently, the employed bee, onlooker bee and scout bee phases are repeated until the cycle number reaches to M CN .In the employed bee phase, a local search is carried out in the vicinity of each solution by Eq. 2: where k = i is a neighbor solution drawn randomly from the population, φ ij is random real number within the range [-1,1] drawn from uniform distribution.After new solution is assigned a fitness value, ABC algorithm performs greedy selection by which if the fitness of x ′ is better than the fitness of x, x is discarded and x ′ is included in the population.Otherwise, x is retained in the population.To be used in the scout bee phase, a counter associated with each solution holds the number of times that the solution is retained in the population.In the onlooker bee phase, onlooker bees use the information obtained from employed bees and select high quality sources to fly.Each solution is assigned a probability value (Eq. 3) proportional to its fitness value obtained from the employed bee phase.In basic ABC algorithm, a roulette wheel selection scheme is applied to select potentially high quality solutions but also to give chance to low quality solutions to be selected.
Once a solution is determined using roulette wheel selection, a local search is performed using Eq. 2.
As in the employed bee phase, a greedy selection is applied and counters are updated.The onlooker bee phase promotes more local searches around the better solutions which is a positive feedback feature.
In the scout bee phase, counters associated with each solution are checked and if a counter is higher than the control parameter limit, that source is assumed to be exhausted.The exhausted source is replaced with a new solution produced by Eq. 1 and its counter is set to 0. This phenomena arises a negative feedback effect and fluctuation in the algorithm which avoids to trap local minima.
The algorithm performs a balanced exploration and exploitation and has the advantage of employing less control parameters.ABC algorithm has been applied to many problems in wide range of fields [12,13,14] and has shown superior performance on high dimensional multimodal problems [15,9] 3. Artificial bee colony algorithm for constrained optimization In most of the design problems, problems have some constraints that the solutions must satisfy.
A constrained design problem is defined as in Eq. 4.
minimize f ( x), x = (x 1 , . . ., x n ) ∈ R n l i ≤ x i ≤ u i , i = 1, . . ., n subject to : g j ( x) ≤ 0, for j = 1, . . ., q h j ( x) = 0, for j = q + 1, . . ., m where f is defined in n-dimensional search space, (S), and each x i parameter is bounded by the range [l i , u i ].Constrained optimization finds a parameter vector x which minimizes the cost function,(f ( x)) and does not violate inequality (g j ( x)) and equality (h j ( x)) constraints.A feasible solution satisfies all constraints and in feasible space F ⊆ S, which is defined by m ≥ 0 constraints [16].Like the other EAs, ABC algorithm was initially proposed for unconstrained optimization and some modifications have to be made in the algorithm in order to cope with the constraints and provide solutions in the feasible space (F ).In the subsequent sections, proposed ABC algorithm variants for constraint optimization are explained.

ABCV1: ABC algorithm for constrained optimization
ABC algorithm for constrained optimization [9,10] uses the same framework with the basic ABC algorithm.ABCV1 includes employed bees, onlooker bees and scout bees phases as well while there have been some modifications inside the phases.ABCV1 does not need initial solutions to be in feasible space and initial solutions are produced using Eq. 1 as in basic ABC algorithm.
In the employed bee phase of ABCV1, a local search is conducted in the neighborhood of the solution in bee's memory using Eq. 5 instead of Eq. 2. Eq. 2 makes modification on one dimension of the current solution while Eq. 5 makes modification on dimensions if a uniformly distributed random number R j is lower than perturbation rate, M R. M R is a control parameter introduced in ABCV1.High values of M R speeds up the convergence but has negative effect on fine tuning.
After generating a mutant solution υ ij for each solution, instead of greedy selection, ABCV1 applies Deb's rules [11] that are listed below: • A feasible solution (violation i ≤ 0) is chosen against an infeasible solution (violation j > 0) (solution i is dominant), • If both of the solutions are feasible(violation i ≤ 0, violation j ≤ 0), the one with better objective function value is chosen (f i < f j , solution i is dominant), • If both of the solutions are infeasible (violation i > 0, violation j > 0), the one with smaller constraint violation is chosen (violation i < violation j , solution i is dominant).
In the constrained optimization, the cost function value obtained evaluating an infeasible solution might be lower than the one obtained with a feasible solution.In the probability assignment scheme, the feasible solutions should have higher fitness values than infeasible solutions to promote feasible regions.Therefore, the probability of the feasible solutions starts from 0.5 (within the range [0.5,1])and the probability of the infeasible solutions are assigned within the range [0,0.5]based the violation of the solutions.Eq. 6 can be used for this purpose: Eq. 6 assigns higher values to the feasible solutions but the solutions with lower probability value have also chance to be chosen by the roulette wheel selection.This property provides population diversity and search ability near the boundary lines.In order to avoid feasible solutions to be discarded quickly in the scout phase, the limit checking is performed in each SP P cycles instead of each cycle.SP P is also another control parameter introduced in ABCV1.

ABCV2: Each parameter from different solution
In ABCV2, Eq. 5 is replaced with a different search operator defined by Eq 7. Eq. 5 exploits kth solution for all dimensions while Eq 7 uses a different neighbor (k j ) for each dimension so that information of more individuals are spread and more interaction can be obtained from the population.For each parameter, a random number is drawn and a random neighbor is selected.If the random number is less than M R, Eq. 7 changes this parameter using the information of the neighbor selected. x The other parts of the algorithm are retained as in ABCV1.

ABCV3: ABC algorithm utilizing individuals in a neighborhood topology
In ABCV1 and ABCV2, selected neighbors are drawn from the population in a global manner without considering any criterion between the solutions.In ABCV3, it is proposed to select the neighbors from a neighborhood topology which comprises the solutions within a predefined radius.Neighborhood of i the solution, N i , is defined by the expression given by Eq. 8: As seen from the expression, a solution x k , is assumed to be a neighbor of the current solution, x i , if the distance between them (d ik ) is less than the average Euclidian distance (d avg ).In ABCV3, Eq. 9 is used to produce a new solution: 3.4.ABCV4:ABC algorithm using a neighborhood topology in the Onlooker bee phase The quick ABC algorithm [13] is proposed to enhance the local search capability of the basic ABC algorithm.In the basic ABC algorithm, an onlooker bee performs perturbation the solution selected based on the roulette wheel selection while in quick ABC algorithm, an onlooker bee performs on the best solution of a neighborhood defined by a radius, N R.

ABCV5,ABCV6,ABCV7:ABC algorithms using the mutation and crossover operators of differential evolution algorithm
Differential Evolution algorithm [4], proposed by Storn and Price, is an iterative and populationbased optimization algorithm for optimizing the continuous functions.It is a fast, simple and easy applicable algorithm.As in the other evolutionary algorithms, it has evaluation, mutation, crossover and selection phases.In mutation phase, for each solution, a mutant solution is produced by weighing the difference of the solutions chosen randomly (Eq.10): where r1 = r2 = i and F is real valued scaling factor within the range [0,2].The mutant solution is subjected to the crossover operation with the original solution (Eq.11): where C R is crossover rate, R j is a random real value drawn within the range [0,1].New solution is evaluated using the cost function and greedy selection operator is applied to decide whether the original solution or new solution will be retained in the population.These steps are repeated until the termination criteria is satisfied.Although DE algorithm produces efficient results on some functions, the statistics related to its stability such as mean value and standard deviation are not satisfactory [9].For this reason, DE's operators are integrated with ABC algorithm in order to combine DE's success on unimodal functions and to preserve stability of the ABC algorithm.To achieve this, Eq. 5 in ABC is replaced with Equations 10 and 11.This modification is carried out only in employed bee phase in ABCV5, only is onlooker bee phase in ABCV6 and both in employed bee phase and in onlooker bee phase in ABCV7 variant.

ABCV8:ABC algorithm using the global best
In order to include the information due to the best solution into the neighborhood, Eq. 12 is introduced which also uses the weighted difference of the current solution and global best solution, gbest. x where θ ij is a random real number within the range [-1,1] drawn from uniform distribution.

ABCV9:ABC algorithm with adaptive Scout behavior
In the basic ABC algorithm, the limit value to abandon a food source is fixed for all solutions during the population evolution.In this proposed version, each food source is assigned a counter value which is proportional to its fitness value if the solution is feasible and disproportional to its constraint violation amount if the solution is infeasible.This gives more search opportunity in the locality of the high quality solutions.For this purpose, the counter of each solution is divided by the probability value defined by Eq. 6 (Eq.13) Vicinity of the better solutions have higher chance to be explored compared to the others.

Experimental study and results
In this study, different variants of the ABC algorithm are analyzed on constrained optimization test problems.The details of the thirteen test problems used are given at the end of the paper and characteristics of the problems are given in Table 1.
The common control parameters of the ABC algorithm variants are the number food sources (CS) that are exploited during search, the maximum number of cycles (M CN ) that the phases are repeated for, modification rate (M R) that control the number of parameters to be perturbed, limit that is the maximum number of exploitations a solution allowed and scout production period (SP P ) that the limit checking period and neighborhood radius (N R) for the variants that use a neighborhood topology.The values set for these parameters are given in Table 2.All implementations were developed using Delphi 7 programming language and run on a computer with 64 bit 3.06 GHz Intel processor and 8 GB of RAM.All algorithms were run 30 times with different seed numbers and statistics of the results (the best, mean, worst and standard deviation) of 30 runs are summarized in Tables 3-11 for the versions ABCV1-ABCV9, respectively.The results of the basic ABC algorithm proposed for constrained optimization (ABCV1) are taken from the study in ref. [10].ABCV1 is taken as the control algorithm to test the efficiency of the variants.The best result statistic can be used to test the efficiency while the mean and standard The results of ABCV4 in Table 6 suggest that there is no significant improvement when the selection strategy is changed in the onlooker bee phase of ABC algorithm.That means when an onlooker bee performs perturbation on the best solution in a neighborhood instead of a solution chosen using roulette wheel selection does not affect the algorithm performance on constrained optimization.However, it can be said that it has positive effect in the convergence rate of the algorithm in the earlier cycles.7-9, respectively.When the best solutions are investigated, it can be seen that on twelve problems g1-g12, these three variants reach the optimum.On   11.This modification does not provide any improvement or change in the performance of the basic algorithm.
In addition to comparing the performance of the variants with control algorithm ABCV1, an overall comparison is conducted in terms of the best results in Table 12.If an algorithm is the best among all the algorithms on a problem, it is signed with + in the table and the last row indicates the number of problems the algorithm is the best.In terms of the best results, ABC variants (ABCV5, ABCV6, ABCV7) that use DE operator in employed bee and onlooker bee phases seem to be superior over the other versions.
In order to compare the algorithms, ANOVA statistical test is conducted to determine whether there is variation within or among different variants of ABC algorithm.If ANOVA test responds as there is significant difference, multiple comparisons are performed to find out which variants differ from the control algorithm, ABCV1.α value to decide an algorithm is significantly different was 0.05.F and P values produced by ANOVA are presented in Table 13.In Table 13, if the variant is significantly better than the control algorithm based on ANOVA and multiple comparisons, it is indicated by (+), else if it is significantly worse than the control algorithm, it is indicated by (−), otherwise it is reported as Based on ANOVA test on g01, g04, g08, g11 and g12, there is no significant difference between the variants.On g02, ABCV7 is significantly worse than the control algorithm.On g03, ABCV4 and ABCV9 are worse than ABCV1.On g05 problem, ABCV5, ABCV6 and ABCV7 which are proposed based on DE operators, are worse than ABCV1.On g06, ABCV4 and ABCV8 perform worse compared to the control algorithm.On g07, ABCV2, ABCV5, ABCV6, ABCV7 and ABCV9 differ from the control algorithm ABCV1.Among them, ABCV2 and ABCV9 are worse than ABCV1 while ABCV5, ABCV6 and ABCV7 are better than ABCV1.Similarly, on g09, ABCV5, ABCV6 and ABCV7 are better than ABCV1 while ABCV2 and ABCV4 are worse than ABCV1.On g10 problem ABCV1 shows better performance compared to ABCV2 while ABCV5, ABCV6 and ABCV7 produc better results compared to ABCV1.On g13 problem, ABCV2, ABCV4, ABCV5, ABCV6 and ABCV7 variants are better than ABCV1.
Based on these observations, it can be noted that ABCV5, ABCV6 and ABCV7 retain stability and robustness of the basic ABC algorithm and have shown the efficiency of the DE operator.It should be noted that ABC framework and basic operator has an important effect on the stability.The most stable versions are ABCV6, ABCV2 and ABCV1, respectively.Changing neighborhood topology of the basic ABC operator or making the scouts adaptive based on the fitness does not have significant effect on the performance of the algorithm.
In terms of computational cost, because ABCV2 changes the parameters based on the information each one chosen from a different neighbor, its computational cost is slightly higher than ABCV1.In each operation of ABCV3, a distance matrix is calculated based on the distances between all solution pairs and average distance is computed from the matrix.Therefore computational cost of ABCV3 is higher than ABCV1 and ABCV2.In onlooker phase of ABCV4, in order to produce a mutant solution, the best solution in a neighborhood topology which is constructed based on distances of the solutions and a radius is employed.Its computational cost is close to ABCV3 but higher than ABCV1 and ABCV2.ABCV5, ABCV6 and ABCV7 do not employ additional procedure compared to the basic algorithm but only replaces the new solution production equation.Hence, their computational cost is close to the basic algorithm.ABCV8 uses the best solution information in its solution production.Since the best solution information is stored in a variable in all variants, it does not introduce more computational cost.In ABCV9, the counters of the solutions are divided by their probability to leave better solutions in the populations for more iterations.It is achieved by only one division operation, so it is computational cost can be assumed to be the same with the ABCV1.The ABC algorithm is a simple optimization algorithm that can be used for constrained optimization without requiring a priori knowledge.Another advantage of ABC algorithm is that it considers both feasible solutions and infeasible solutions in the population and this provides diversity in the population.In this study, for all variants, the selection strategy kept as simple as possible and Deb's rules are employed as constraint handling method instead of the greedy selection proposed for unconstrained optimization.However, the performance would change with a different constraint handling method.Analyzing the effect of selection strategies remains as a future work.

Conclusion
In this study, ABC algorithm originally proposed for unconstrained optimization has been analyzed on constrained Different variants of the algorithm have been proposed and compared in terms of efficiency and stability.Depending on the results when DE operators were integrated into ABC algorithm's onlooker phase and the employed bee phase was retained as in ABC algorithm, an improvement in the performance was gained in terms of the best solution and stability.
The food source population of ABC algorithm can have both feasible solutions and infeasible solutions, so this provides diversity in the population.

Table 1 .
Characteristics of the test problems used in the experiments.D:Dimension of the problem, LI: Linear inequality, NI: Nonlinear inequality, LE: Number of linear equalities, NE: Number of nonlinear equalities, rho: the ratio of feasible region over the search space [17].

Table 2 .
Values of the control parameters used in the experiments

Table 3 .
[10]results of ABCV1[10].Because the genotypes of the solutions in a local neighborhood resemble each other in later cycles, choosing the parameters from different neighbors does not have significant effect compared to choosing all the parameters from the same solution.
ABCV2 uses a global neighborhood while ABCV3 chooses the neighbors in a local topology.It is seen that the results in Table5are similar to the results in Table3.

Table 4 .
The results of ABCV2 variant

Table 5 .
The results of ABCV3 variant

Table 6 .
The results of ABCV4 variant into employed bee, onlooker bee and both phases and the results are presented in Tables

Table 7 .
The results of ABCV5 variant

Table 8 .
The results of ABCV6 variant

Table 9 .
The results of ABCV7 variant The results of ABCV8 in which the global best solution is exploited are presented in Table10.In terms of the best results in the table, the results

Table 10 .
The results of ABCV8 variant

Table 11 .
The results of ABCV9 variant

Table 12 .
An overall comparison of the algorithms in terms of the best results

Table 13 .
ANOVA Table and multiple comparisons to evaluate the results statistically.Control Algorithm is ABCV1 and α value is 0.05.
2003.Available in the Constraint Handling Techniques in Evolutionary Algorithms Repository at http://www.cs.cinvestav.mx/˜constraint/.