Abstract
Nowadays, the existence of continuous optimization problems has led researchers to come up with a variety of methods to solve continues optimization problems. The metaheuristic algorithms are one of the most popular and common ways to solve continuous optimization problems. Firefly Algorithm (FA) is a successful metaheuristic algorithm for solving continuous optimization problems; however, although this algorithm performs very well in local search, it has weaknesses and disadvantages in finding solution in global search. This problem has caused this algorithm to be trapped locally and the balance between exploration and exploitation cannot be well maintained. In this paper, three different approaches based on the Dragonfly Algorithm (DA) processes and the OBL method are proposed to improve exploration, performance, efficiency and information-sharing of the FA and to avoid the FA getting stuck in local trap. In the first proposed method (FADA), the robust processes of DA are used to improve the exploration, performance and efficiency of the FA; and the second proposed method (OFA) uses an Opposition-Based Learning (OBL) algorithm to accelerate the convergence and exploration of the FA. Finally, in the third approach, which is referred to as OFADA in this paper, a hybridization of the hybrid FADA and the OBL method is used to improve the convergence and accuracy of the FA. The three proposed methods were implemented on functions with 2, 4, 10, and 30 dimensions. The results of the implementation of these three proposed methods showed that OFADA approach outperformed the other two proposed methods and other compared metaheuristic algorithms in different dimensions. In addition, all the three proposed methods provided better results compared with other metaheuristic algorithms on small-dimensional functions. However, performance of many metaheuristic algorithms decreased with increasing the dimensions of the functions. While the three proposed methods, in particular the OFADA approach, have been able to make better converge with the higher-dimensional optimization functions toward the target in comparison with other metaheuristic algorithms, and to show a high performance.
Keywords
Introduction
Continuous optimization problems occur in many various fields. Many researches have been done in these cases and important subject includes developing optimization methods. Generally, optimization procedures can be divided into two various classes: accurate and inaccurate methods. Accurate methods confirm that the result acquired by researchers are the optimal solution; although, accurate methods, such as the Lagrange and Simplex methods, have complex and difficult calculations. Hence, there are difficulties in solving complex problems. Inaccurate methods, such as numerical methods, heuristic and metaheuristic methods, comprise easier computations; even though they cannot obtain an optimal solution, but can detect a near-optimal solution. As the complexity of a problem develops, inaccurate methods are more appropriate than accurate methods [1, 2]. The utilization of metaheuristic algorithms has amazingly enhanced for solving different problems of search and discrete and continuous optimizations. Due to the increasing complexity of continuous and discrete optimization problems as well as the inability of traditional and mathematical methods to provide an optimal solution for such problems, the meta-heuristic algorithms are considered to provide a suitable solution for complex continuous and discrete optimization problems.
Mathematical methods solve many scientific and engineering problems and they act in a very wide range of various subjects. Of course, despite the accurate efficiency and performance of mathematical methods in solving continuous optimization problems, they have big difficulties. The efforts made by researchers and research carried out by various researchers in the field of meta-heuristic algorithms have led to the development of algorithms inspired by natural phenomena [3, 4, 5, 6, 7, 8, 9, 10]. Besides meta-heuristic algorithms inspired by nature, other meta-heuristic algorithms have also been developed for solving continuous optimization problems so far [11, 12, 13, 14].
In order to create a hybrid optimization method, scientists combine a metaheuristic algorithm with another optimization algorithm and this suitable hybridization could show a more strong behaviour and represent significant flexibility against complex and difficult issues [2, 15, 16]. The original motivation of the hybridization of various algorithms is to utilize the supplementary feature of various optimization strategies that means; hybrids to profit from the cooperation. Indeed, selecting a sufficient combination of complementary algorithmic meanings can be the important guidance for attaining high performance in solving many difficult continuous optimization problems [17, 18]. Generally, expanding an impressive hybrid procedure is a difficult task that requires skills and experiences from various levels of optimization. In addition, the available papers display that it is significant to generalize, namely; a defined hybrid might perform well for particular problems, but it might work inappropriately for other issues. However, there is different hybridization that has called as an efficient approach for many applications. They may guide and manage novel developments [19].
The FA is one of the successful algorithms for optimization [4]. Its main idea is inspired by the flashing behavior of fireflies for intercommunication. In the original version of this algorithm, each member of a group of fireflies moves toward a firefly that is lighter than itself. Due to the shortcomings of the original version of this algorithm, a variety of hybrid and modified versions are presented in [20, 21, 22, 23]. In fact, this algorithm performs well in local search but has weaknesses and disadvantages in finding solution in global search. This problem has caused this algorithm to be trapped locally and the balance between exploration and exploitation not to be well maintained. Therefore, three different approaches are presented in the paper to eliminate the shortcomings of this algorithm.
Initially, this paper has combined the strong processes of the two firefly and dragonfly algorithms to improve the exploration and exploitation of the firefly algorithm and then, in order to accelerate the convergence and the ability to explore the firefly algorithm, an opposition-based learning firefly algorithm has been presented. Finally, considering that the opposition-based method has improved the OFA, the opposite-based learning method along with the combination mode of these two algorithms have been used in the OFADA to improve the convergence and accuracy. As a result, in this paper, we have shown that the combination of the process of two powerful meta-heuristic algorithms and the proper use of the opposition-based method to produce better solutions and improve convergence will provide a secure and efficient method than other non-combinatorial algorithms.
The rest of the paper is presented as follows: Section 2 introduces the works of hybridizing and improving the FA. Section 3 describes the FA and DA as well as the OBL method, and Section 4 proposes three various approaches to improve the FA in solving continuous optimization problems. Section 5 shows experimental results. Conclusions and future researches are presented in Section 6.
Related works
To solve optimization problems, different meta-heuristic algorithms have been presented so far that we cannot discuss all of them here. In this section, our goal is to further investigate hybrid meta-heuristic algorithms in solving optimization problems as well as several multi-objective algorithms will be explained in this section. A novel hybrid optimization approach named hybrid evolutionary FAGA [24] which is inspired by social manner of fireflies and the phenomenon of bioluminescent relationships. This method incorporates the discrete FA with the GA. It is allocated to the exact explanation of the issue, as well as an adaptation of the algorithm. The elementary results show that the presented method accomplishes the same approach as CPLEX for minor problems (due to insignificant gap), and is suitable for big-scale problems. Moreover, as a relatively simple concept, the FA can be corrected to solve multi-target and bi-level optimization problems. Padmavathia and Ramakrishnab suggested a method for the discovery of Bundle Branch Block (BBB) using hybrid FA and PSO (FFPSO) procedure in hybridization with Levenberg Marquardt Neural Network (LMNN) classifier [25]. BBB is extended when there is an obstacle along the electrical impulses trip in order to make heart to pulse. The hybrid procedure FFPSO incorporates the meanings of FF algorithm and PSO and makes novel individuals. In addition, the FFPSO technique performs the local search via the improved light severity attraction phase with PSO agent. It is obvious that hybrid FFPSO approach performs better than two other methods in terms of precision and convergence speed. The FFPSO algorithm was evaluated and then was compared with the FFA and PSO for all examined data. The FFPSO technique was displayed to present superior results than main FFA and PSO for all the examined data. A new hybrid algorithm named ACO-FA [26] is suggested by Rizk-Allah et al. which incorporate ACO with FA to solve continuous optimization problems. At first, they initialize the algorithm via a population of random ants that ramble (prowl) via the search space. During this roaming an evolution of these ants are accomplished by incorporating ACO and FA, where FA acts as a local search to correct the positions detected by the ants. Secondly, the efficiency of FA is modified by decreasing the randomization index, thus, it reduces slowly as the optima are approaching. The comparisons of numeric consequences display that there is a domain of research in hybridizing swarm intelligence techniques to dissolve complex continuous optimization problems. As a result, in order to solve continuous optimization problems, they suggest hybrid ACO-FA as a promising and worth tool.
Srikanta Mahapatra et al. presented a new hybrid FA and Pattern Search (PS) (h-FAPS) method for a Static Synchronous Series Compensator (SSSC)-based power swing reducing controller design [21]. The suggested h-FAPS procedure uses the universal search ability of FA and local search possibility of PS. An improved signal equivalent to the remote speed deviation signal is built from the local evaluations to diminish the difficulty (problem) of the remote signal that may influence reliability of the controller. In order to demonstrate the supremacy of the presented design approach, simulation results are determined and compared with newly reported approaches such as DE and PSO. According to the obtained results, they expressed that presented controller with adjusted local input signal to illustrate a better damping efficiency in comparison to both remote and local input signals. Also, Sahu et al. presented a new hybrid (hFA-PS) method for Automatic Generation Control (AGC) of multi-zone power systems due to the Generation Rate Constraint (GRC) [27]. They have been tried for the prime time to use an hFA-PS procedure to optimize PID controller parameters for Automatic Generation Control (AGC) of multi-zone inter-linked power systems. Moreover, sensibility analysis is accomplished by changing the system parameters and operating load situations from their nominal amounts. According to the findings, they can be concluded that the presented approach certifies favorable performance of system in presence of non-linearity in the system pattern. Of course, frameworks and methods related to the hybridization need more precise categorization such as the feature of the problem domain, the fundamental algorithms, the coupling plan (program) and the predetermined zone of application.
In order to survey the efficiency of improved FAs in solving classification problems, Alweshah and Abdullah presented a procedure that hybridizes the FA with simulated annealing (defined as SFA) [28]. In order to control and manage the randomness phase inside the FA, they used simulated annealing, of course, weights of the standard PNN pattern was optimized. In addition, they developed our work by evaluating the effectiveness of Lévy flight within the FA (defined as LFA) to better discover the search space and hybridized SFA with Lévy flight (defined as LSFA); they could enhance the efficiency of the PNN. The results of a comparison between these three hybridization techniques indicated that the LSFA presented a superior overall efficiency on 11 benchmark datasets. This approach is simple while it acts effectively. Eventually, it produces a number of best outcomes that are new in comparison with other procedures in the existing papers.
Singh et al. proposed a novel and hybrid algorithm based on FA and Recursive Least Square (RLS) for power system harmonic assessment [29]. The hybrid FA-RLS algorithm is designed to estimate harmonics, inter-harmonics, and sub-harmonics from a distorted and noise destroyed power signal. The main purpose of the suggested algorithm is to integrate FA for getting the optimum primary weights for RLS algorithm that continuously updates the unfamiliar parameters (weights) of the harmonic signal. The performance of the presented FA-RLS algorithm is investigated with newly introduced ABC-LS and BFO-RLS algorithms. It is confirmed that the suggested algorithm is the best method amongst all the three algorithms in terms of precision and computational period in assessing harmonic, sub-harmonic and inter-harmonics. Moreover, the actual time examination with the presented algorithm at a solar jointed inverter system panel demonstrates the better performance of the suggested algorithm as compared to other newly presented two-hybrid algorithms.
Xiaab et al. in 2017 proposed a hybrid metaheuristic optimizer based on FA and PSO. In the recent suggested algorithm, called FAPSO, the population is divided into two sub-populations with the identical size. During the optimization stage, the two sub-populations select PSO and FA as their original algorithm to accomplish the search operator simultaneously. In order to use the competencies of PSO and FA, the two sub-populations share their own optimal solutions if one of them has stagnated more than threshold generations. Moreover, a science-based discovering operator and a local search operator are presented to reduce the contrast between explorative and exploitative abilities. Immense simulations upon various functions prove that FAPSO outperforms the two fundamental algorithm, namely, FA and PSO, also it outmatches some ultra-modern variants of FA and PSO, and two hybrid algorithms, too [30].
According to the global reports, heart illnesses are the main reason of death in the universe. Efficiency of diagnostic support system was extended and improved using Hybrid FA and was compared with GA and PSO methods in 2017 [31]. The suggested system presented best classification performance with 99.3% precision, 99.97% sensibility, and 98.7% clarity by LMNN classifier. In fact, the suggested system prepares a credible and precise discovery MI (great classification efficiency). Moreover, the method used in the present study, is cost-effective and rapid as compared to other cardiac diagnostic imaging instruments like Intravascular Ultrasound (IVUS), Magnetic Resonance Imaging (MRI) and coronary angiogram etc. An inventive random CDSS search optimizer using hybridization of FA and GA in a limited divergence space (RDFG_CDQO) was proposed by Sharma et al. in 2018 [32]. It is empirically distinguished that the results generated using RDFG_CDQO are 13%, 10%, 7% and 3.5% higher than the consequences of the other CDSS query optimizers planned by easy, new, limited and entropy-based constricted GA respectively.
In addition, various multi-objective meta-heuristic algorithms have been proposed for solving the optimization problem. Of course, these algorithms benefit from different operators due to several targets. One of the most basic multi-objective algorithms is called Non dominated Sorting Genetic algorithm (NSGA), which have a high computational cost, and then its advanced version, called NSGA-II, was presented by Deb et al. [33].
Zitzler et al. have provided a modified version of the SPEA algorithm called the Strength Pareto Evolutionary Algorithm (SPEA-II) [34], which unlike the NSGA uses an external population called the Archives. This external population contains a limited number of dominant false solutions that have been generated by the algorithm during the optimization phase. There is another multi-objective algorithm called MOEA that has presented by Deb et al. in order to ensure the diversity of solutions obtained with lower computational costs in 2005 [35] and another version namely multi-objective evolutionary algorithm based on decomposition (MOEA/D) has also been presented in 2007 [36]. Of course, some researchers have presented versions of swarm intelligence of metaheuristic algorithms including multi-objective bat algorithm [37], multi-objective artificial bee colony algorithm [38], multi-objective FA [39], multi-objective teaching learning-based optimization algorithm [40], multi-objective discrete cooperative swarm intelligence algorithm [41].
Material and method
FA algorithm
The FA was presented by Xin She Yang in 2007 at the University of Cambridge based on the flashing behavior and patterns of fireflies in nature [42, 43]. The FA is a collective intelligent method and a kind of meta-heuristic algorithm inspired by nature, which is applied in almost all kinds of engineering and NP-hard optimization problems. The FA at its lowest level focuses on generating solutions within a search space and selecting the best solution for survival. A stochastic search avoids getting trapped in local optima. For meta-heuristic algorithms, exploration means the process of finding various solutions within the search space, while exploitation means focusing the search process on the best neighboring solutions. This algorithm searches the optimal solution for the problem by modelling the behavior of a group of fireflies and allocating a value related to fitness of the location of each firefly as a model for luminescence pigments and updating the location of fireflies in successive iterations of the algorithm. In fact, the main phase of the algorithm includes updating pigments and the phase of motion at each iteration. The fireflies move toward other fireflies with more luminescence pigments in their neighborhood. In this way, more successive iterations will lead to a better solution. The main goal of flashings of the fireflies, which act as a signaling system, is to attract other fireflies.
In FA, a firefly’s brightness (I) relates to its location (X) which is considered as 50 possible solutions. In addition, the path and direction of the swarm can be determined as a search process. During the optimization problems of FA, a firefly tends to move towards a brighter one not only depending on (I) of the brighter firefly, however it depends on the distance (r) between the two fireflies. In the FA, I of a firefly is distinguished by X that is proportional to the amount of objective function
Where
Where, the attractiveness at
Where,
Where,
Seyedali Mirajalli suggested DA [44, 45]. This method is based on the swarming treatment of dragonflies. the parameters of discovery and utilization are designed exactly to acquire universal optimization. Dragonflies are fundamentally carnivorous insects, which predates other tiny insects like mosquitoes and butterflies as food. The life cycle of dragonflies has two phases: nymph and metamorphosis. Nymph dragonflies feed marine insects and little fishes by utilizing their high proficiency of swimming (it results in a swarm). Generally, there are two types of swarms including static and dynamic in nature. Static swarm performs hunting in which they constitute a little group and predates tiny insects limited to a small region. Dynamic swarms form as big groups and they move in one direction for lengthy distances. The major purpose of dragonflies should be absorption to the food source and confusion from an enemy.
Mirjalili [44], proved acceptable performance and efficiency of this algorithm using 19 benchmark functions. The main idea of the dragonfly algorithm is derived from the static and dynamic behaviors of dragonflies in nature. It can be said that these two behaviors are very similar to the two important phases in optimization, namely searches for prey (exploration) and attacking the prey (exploitation). In static behavior, dragonflies create small groups and fly over different areas in order to hunt insects. The main purpose at this stage is to search for prey (exploration). In dynamic behavior, dragonflies fly in large groups and in the same path. The main purpose at this stage is to attack the prey (exploitation). The ultimate goal of the creatures in nature is survival, and to do so, they try to obtain food sources and escape the enemy. The three significant steps in the swarming behavior of dragonflies are described and mathematically displayed as follows.
Separation (S) in this step the swarms are separated from other individuals, which avoids conflict with the neighbors. S is defined for this separation that is calculated by Eq. (5).
While, Alignment (A), the speed of each individual is accommodated to others. Alignment is illustrated by Eq. (6).
Where Cohesion (C) relates to the attraction of the swarm towards the center of the team of swarms Eq. (7).
Where, Attraction towards the food origin is mathematically shown by (F) shown in Eq. (8).
Where, Distraction from the enemy (E) is computed by Eq. (9).
Where,
The updated position vector is computed by Eq. (11):
The random behavior of the dragonflies can be enhanced by presenting levy flight in the determined search space thereby modifying the discovery. Updating of location of the dragonflies is shown by Eq. (12).
Where
In Eq. (13),
Yin-Yang symbol (Fig. 1) represented the elementary opposition meaning in the old Chinese philosophy [46]. This symbol illustrates the duality concept and opinion in which black and white are Yin (receptive, feminine, obscure, inactive power) and Yang (creative, masculine, luminous, active power or energetic force), respectively. OBL [47] is an efficient and impressive concept to increase different optimization procedures. The basic opinion behind OBL is the concurrent attention of corresponding opposite assessment as a second set of candidate solutions to attain a superior approximation for the prevalent candidate solution. According to the findings, we can express that an opposite candidate solution can obtain the universal optimum solution than a randomly selected candidate solution. Perceptually, the opposite numbers can be specified as follows.
Early opposite concept was mentioned in the Yin-Yang symbol [46].
Rahnamayan et al. proposed a model of OBL [48]. This procedure transforms available search space to a novel search space If
Likewise, this description can be developed to higher dimensions [49] as expressed in the Subsection 3.3.2.
Definition of opposite point is
Finally, by using the opposite point definition, the OBL is described in the following subsection [49].
Let
Proposed methods
Researchers have already developed a mix of FAs with other metaheuristic algorithms to improve it [28, 42, 43, 44]. In [42], the hybridization of FA and DE was tested. The results showed that the convergence rate of the proposed method was significantly improved in comparison with that of the DE and FA as well as other metaheuristic algorithms. Another research [50] investigated the improved accuracy of searching and information-sharing in FA in the form of a hybrid algorithm. The accuracy of finding the best solution and the convergence rate function of the proposed hybrid method was increased significantly. To improve global searches and to avoid getting stuck in several local optimizations, the GA is introduced for exploring the search space and finding better and new solutions. In [51] the OBL method has been used to overcome the problem of early convergence and to avoid the FA getting stuck in the local optima. In this research, OBL has been only used to generate the primary population. As a result, it can be said that the FA has weak points that can be overcame when combined with other methods to improve the FA.
In our proposed method, we tried to provide three different approaches to solve the continuous optimization problems using FA, DA and OBL method. In the FADA, the robust processes of DA are used to improve the exploration and efficiency of the FA (FADA), which is fully described in Subsection 4.1. In the OFA, to accelerate the convergence rate and improve exploration process of the FA, a FA based on the OBL method (OFA) is proposed, which is explained in details in Subsection 4.2. Finally, in the OFADA , the OBL method along with the hybrid algorithm, which is named as OFADA in this paper and separately explained in Subsection 4.3, is used to improve the convergence rate and accuracy of the proposed hybrid algorithm. In the following, we try to examine the main reason for the improvement of the FA along with some valid scientific references and then present these three proposed methods in three separate sections.
FADA
In this subsection, we need an algorithm with strong natural processes for exploration and efficiency to improve the FA and the effective use of exploration and efficiency. Since the DA is a new metaheuristic algorithm with strong processes for exploration and efficiency in solving continuous optimization problems, we use its processes to improve the FA. The FADA in this subsection is presented in Figs 2 and 3. Pseudo code of the FADA for improving the FA with the processes of DA is divided into four separate sections for solving continuous optimization problems, as shown in Fig. 2.
Pseudo code of the FADA.
According to the pseudo code, the FADA consists of four main parts. We describe each of these four main parts of the FADA step-by-step. Of course, we illustrated the flowchart of the FADA in Fig. 3 in order to better understand it.
Flowchart of the FADA.
In the first phase, the initialization of the parameters and the population and the division of the search space are carried out as in the case of other metaheuristic algorithms. Of course, there is a difference in the proposed method. That is, we divided the search space between the processes of FA optimization algorithms, so that some solutions are randomly placed in the search space of the FA and the rest of the solutions are randomly placed in the search space of the DA. In the second phase, the main process of the FA is applied to the fireflies in its search space. The third phase is the use of the static and dynamic processes of DA. At this phase, we considered a separate population for dynamic processes of efficiency and static processes of exploration. By doing so, we ensure that the DA can improve generation of some new solutions with its robust natural exploration and efficiency processes. In the final phase of the FADA, the main population must be updated by the populations of the FA and the population of the DA. Of course, this update is slightly different as we have two populations from two FA and DA. The important point at this phase is the main population that is updated on the basis of two different populations, and then the populations of the FA and DA are again randomly selected from the main population. In each iteration, the population of DA is randomly selected from and updated on the basis of the whole population. We move the solutions between the two algorithms and, by doing so we ensure that the algorithm has an appropriate convergence rate and also rarely gets stuck in the local trap. As a result, updating the populations of the FA and DA at each iteration will improve the solutions of the FA.
In this subsection, the proposed second approach is described, in which we present an OBL with FA (OFA) to accelerate the convergence rate and improve the exploration ability of the FA. The FA has shown that it performs well in solving various optimization problems. However, all metaheuristic algorithms, including the FA, begin with a random population and, in each iteration; attempt to improve random initial solutions. The search process ends when the end condition is met. Therefore, these algorithms begin with random guesses to create initial solutions. If a FA starts randomly with an inappropriate population, it may not have a significant performance in terms of exploration until the end; however, we can improve the exploration performance of the FA using near-optimal solutions by an opposite search space. In this way, at the beginning of initialization, a set of random solutions is created and then their opposites are calculated; after that the initial population is selected from among the most appropriate solutions from both sets. In fact, by increasing exploration based on OBL, the FA can escape getting stuck in the local trap and improve exploration. Hence, an OBL has a high potential to improve convergence rate and the exploration ability of the FA.
In [38], there is also an opposition-based method to improve the FA, which is stated to decrease the population diversity of the FA over time and result in the early convergence of the FA. Therefore, there will be a reduction in the exploration. The authors of that article have used the opposition-based method only to overcome this shortcoming of the FA by replacing the worst firefly, while we will use the opposition-based method for all the fireflies because the population diversity is preserved to some extent by replacing the worst solution, and it may get trapped in local optima after some iterations, and therefore, the FA may suffer early convergence. In the following, we will explain how to apply the opposition-based method to modify the FA.
Flowchart of the OFA.
Of course, in addition to the OBL method of primary population generation, there is another way to use the OBL method to improve the FA. In this way, in each iteration, the FA is performed with a given probability of a jump to the opposite search space which is similar to the randomized initialization scheme and the opposite search space. Generation jump can generate a main population and an opposite population in any desired generation, and ultimately the most appropriate solutions are selected from both sets. The uses of a generation jump by the FA are controlled by a potential parameter called P. The exploration will increase with an increase in the likelihood of using the OBL method in the FA. Consequently, in order to maintain the balance between exploration and efficiency and to prevent late convergence, the value of P in this paper is 0.5. In order to better understand the OFA, in this section, we express it as the Eq. (17):
In Eq. (17),
In Eq. (18),
In Subsection 4.1, we presented the proposed method for hybridization the FA and DA. In this subsection, we will present a final approach to cover the possible weaknesses of the hybrid approach presented in Subsection 4.1 as the new approach. In our first approach, we used the DA to improve the FA, but both algorithms may not work well with the random initial population and do not have a proper exploration from the beginning. For the FADA, in order to have a better population from the beginning and to improve the convergence rate and accuracy of the hybrid algorithm, we propose an OBL method for generating a better initial population in the hybrid method in this paper, as shown in Fig. 5.
Flowchart of OFADA.
Therefore, in order to increase the accuracy and exploration of the proposed first approach, we proposed a hybridization of OBL, FA, and DA, as shown in Fig. 5. The final proposed method ensures that the FA will search solutions with a high accuracy, and it can certainly be said that the final proposed method has a proper convergence in solving continuous optimization problems. In the next section, all three proposed methods will be compared with other metaheuristic algorithms, and we will show that each of the three proposed methods outperforms other metaheuristic algorithms in low-, medium- and high-dimension continuous optimization problems.
Then, we tried to explain the proposed method with mathematical relations. The proposed algorithm starts randomly with creation of the initial population and tries to move towards the optimal solution. This state is called the population initialization stage, which is initialized by the Eq. (22)
In Eq. (19), PopMain is the initial population of the proposed algorithm that the first time has been randomly generated by the xrand function at a certain interval. The xrand function has also been defined according to Eq. (19) and in this equation, Min represents the minimum possible value for a variable and Max represents the maximum possible value for a variable, and also D is the dimension of the optimization problem. After generating an initial population randomly, the population is divided into two algorithms. Then, according to a hybrid algorithm, the processes of the two algorithms are applied to their population and the update stage of original population is done, which has been described in Subsection 4.1. In the next step, the opposition-based method should be used during the repetition of the proposed method and according to Eqs (15) and (16); the method of producing opposition-based solutions has been described that an opposition-based population can be defined according to Eq. (21).
In Eq. (21), OPopMain represents the opposition-based the population, which has been generated according to the random population and each opposition-based member related to the solution has been calculated with xop. Moreover, the xop variable has been defined according to Eq. (21). Therefore, in the following, we will use the opposition-based method during the repetition. Thus, we define the proposed method by using a variable called the JOP during the repetition to use the opposition-based method in the form of Eq. (22):
In Eq. (22), the JOP variable represents the percentage of the use of the opposition-based method during the repetition, which initially the proposed algorithm accepts the number between zero and one.
The three proposed methods and other compared algorithms in this paper are simulated in the MATLAB on a system with a 5-core Intel processor with 2.30 GHZ processing power and 12 GB working memory. To evaluate the three proposed methods, they were run on 20 benchmark functions introduced in Subsection 5.1. In addition, to compare three proposed methods with other basic metaheuristic algorithms including DE and ABC, FA and DA were run on benchmark functions and the results of comparing these algorithms with the three proposed methods have been shown in a chart. We also initialized the primary settings and parameters of each algorithm in Subsection 5.2 and tried that all the algorithms have equal and proper conditions for comparison. In this subsection, we performed the experiment in two ways. In the first experiment, in each iteration, we showed the best solution found by the algorithms mentioned in the literature graphically and separately for each function. In the second experiment, the three proposed methods and other algorithms are shown for comparison in terms of the best and the worst values of the target function, the average of the target function of the population and other statistical criteria in a table.
In all these experiments, our hypothesis is that does the combination of processes of two algorithms affect improvement of exploration and exploitation. On the other hand, by adding an opposition-based method, a new hypothesis is proposed that what is the effect of an opposition-based method during repetition to improve the convergence and accuracy of the hybrid algorithm. Therefore, in order to demonstrate the convergence rate of proposed algorithms and for designing experiments in Section 5, we have shown the best answer in each generation graphically and on the other hand, we used statistical methods to investigate the accuracy of proposed algorithms.
Standard test functions
Standard mathematical functions, i.e. benchmark functions, are used to evaluate and review all optimization and metaheuristic algorithms. These functions are useful for evaluating the features of new algorithms and the hybrid and improved version of metaheuristic algorithms, including accuracy and precision, convergence rate, capability, and overall efficiency . The number of these functions is increasing day by day so that a metaheuristic algorithm could be investigated from different aspects. In [46], about 175 standard benchmark functions are introduced in details that can be used to evaluate the three proposed methods. To evaluate and compare the efficiency of the three proposed methods with other metaheuristic algorithms, 20 benchmark functions are used; in most studies on meta-heuristic methods, about 20 main functions are selected to evaluate the proposed algorithm. Of course, we chose the functions in different multimodal/unimodal and separable/non-separable modes so that the proposed algorithm is tested on a variety of possible states. On the other hand, we have considered different dimensions to test the exact extent of convergence of the proposed algorithm in functions with small, medium, and large dimensions.
Table 1 gives a general description of each of these functions and their numerical range. If fewer benchmark functions were used, the results of the experiments may have been biased, since the objective diversity of the problem has been limited and in this case it will be difficult to obtain compelling results. Therefore, the efficiency and performance of the three proposed methods are tested and examined using 20 standard benchmark functions in the field of optimization, and the results are recorded and displayed in separate graphs. The list of test functions used for evaluation of the three proposed methods, along with their mathematical model, is given in Table 1. It should be noted that the test functions introduced in this subsection are used for minimization problems and also regarding the benchmark functions,
Initial parameters
In this subsection, we will initialize the primary parameters of the three proposed methods and other compared metaheuristic algorithms. In order to have a better evaluation, we consider the equal number of population and for a more accurate evaluation, the number of function calls was considered to be the same; the number of evaluations of all algorithms in the simulation and comparison of subsection (Subsection 5.3) was 2500. Of course, all the parameters of other basic metaheuristic algorithms such as DE and ABC, as well as the FA and DA are initialized in this subsection. In this section, we used basic algorithms such as DE and ABC for comparison because of being basic and successful in solving a variety of continuous optimization problems, and also, since FA and DA have been proposed as a hybrid approach, the standard original version of these two algorithms are used for comparison with the three proposed methods.
Therefore, the initial parameters for the three proposed methods and other algorithms are given in Table 2. All algorithms in Table 2 are basic versions of algorithms.
Evaluation of the three proposed methods
In this subsection, we will evaluate the three proposed methods and other metaheuristic algorithms. We use the 20 benchmark functions described in Subsection 3.4 to evaluate the performance of each of the metaheuristic algorithms. Therefore, we will implement the three proposed methods and other metaheuristic algorithms on the 20 benchmark functions and will show the results as the best solution
Standard benchmark functions for evaluating the three proposed methods
Standard benchmark functions for evaluating the three proposed methods
found for each algorithm graphically. Of course, in this section, to compare the three proposed methods with other metaheuristic algorithms such as DE, ABC, FA, and DA, these were implemented on the benchmark functions and the results of all the algorithms will be compared with the three proposed methods in the form of a graph. In general, we run three proposed methods on two, four, ten, and thirty-dimensional functions to show how the three proposed methods performs on smaller, medium, and larger dimensions. Of course, in order to better differentiate the results of the three proposed methods, we will study each result obtained on different dimensions in separate subsections and will show the results in charts. In addition, the lowest value among the three proposed methods and other algorithms that are presented graphically for making a comparison among several generations and the extent of optimization of the algorithm. For a more accurate evaluation in Subsection 5.3.4, the best value of the target function, the worst value of the target function, the average of the target function of the population and other statistical parameters of three proposed methods and other algorithms are shown in Table 3. Therefore, in order to better evaluate the results, the three proposed methods are presented graphically and also in the form of statistical parameters in tables.
An important point in comparing the metaheuristic algorithms is that all algorithms should be implemented in equal conditions, so that we can make an accurate comparison between the compared algorithms. In this paper, the total population of all the compared algorithms and the three proposed methods, we considered equal to 20. In some references, the metaheuristic algorithms are compared in terms of the number of generation iterations and the number of evaluations of functions; while the number of generation iterations cannot be a fair evaluation among algorithms, because some algorithms change all the solutions in the population and others change only some of the solutions in the population. As a result, the best method for a fair evaluation of metaheuristic algorithms is the number of evaluations of the target function. In this paper, we have considered the number of evaluations of the target function, equal to 2000 for the Subsections 5.3.1 to 5.3.4, and 1500 for the subsection of the statistical comparison.
Initialization of the parameters of three proposed methods and other algorithms
In this subsection, three proposed methods and other metaheuristic algorithms are implemented on two-dimensional functions, and the results of each function are represented as a graph. According to Table 1, the number of two-dimensional functions is equal to 8, which are considered for evaluating the three proposed methods. Therefore, the three proposed methods as well as other basic metaheuristic algorithms including DE, ABC, FA, and DA are implemented on 8 two-dimensional benchmark functions for comparison and the results are presented in the form of graphs. The results of the implementation of the three proposed methods and other basic algorithms on the 8 benchmark functions are shown in Figs 6 and 7, respectively.


According to Figs 6 and 7, examining the results of the three proposed methods and other compared algorithms, it can be seen that all the metaheuristic algorithms and the three proposed methods have similar results. All three proposed methods fully solve the small optimization functions and generally show better efficiency and performance. Of course, all metaheuristic algorithms work very well in small scales; however, their efficiency decreases when the dimensions are increased. Thus, in next subsections, we will test the higher-dimensional functions to show the efficiency and performance of the three proposed methods.
In this subsection, three proposed methods and other metaheuristic algorithms are implemented on four-dimensional functions, and the results of each function are presented as a graph. According to Table 1, the number of four-dimensional functions is 3, which are considered for evaluating the three proposed methods. Therefore, the three proposed methods as well as other basic metaheuristic algorithms including DE, ABC, FA, and DA are implemented on 3 four-dimensional benchmark functions for comparison and the results are presented in the form of graphs. The results of the implementation of the three proposed methods and other basic algorithms on the 3 four-dimensional benchmark functions are shown in Fig. 8.

According to Fig. 8, by comparing the results of the three proposed methods and other compared algorithms, it can be seen that the metaheuristic algorithms and the three proposed methods give different results in the four-dimensional functions. In the four-dimensional functions, the OFADA approach has shown the best performance: performance of the FA have been reduced in some functions by increasing the number of evaluations. However, the OFA and FADA approaches in comparison to other algorithms have performed very well; however, these two approaches have performed weaker than the DE in the F9 function. In the next subsections, you will see that the DE will lose its efficiency by increasing the dimensions, and the three proposed methods display better results.
In this subsection, three proposed methods and other metaheuristic algorithms are implemented on ten-dimensional functions, and the results of each function are presented as a graph. According to Table 1, the number of ten-dimensional functions is 6, which are considered for evaluating the three proposed methods. Therefore, the three proposed methods as well as other basic metaheuristic algorithms including DE, ABC, FA, and DA are implemented on 6 ten-dimensional benchmark functions for comparison and the results are presented in the form of graphs. The results of the implementation of the three proposed methods and other basic algorithms on the 6 ten-dimensional benchmark functions are shown in Figs 9 and 10, respectively.


According to Fig. 10, by examining the results of the three proposed methods and other compared algorithms, it can be seen that the compared metaheuristic algorithms and the three proposed methods give different results for the ten-dimensional functions. In the ten-dimensional functions, the OFADA approach has shown the best performance. The three proposed methods were able to converge the optimization functions with the medium number of dimensions well toward the target. With the increase in the number of dimensions, some algorithms such as the ABC algorithm has shown weaker performance; however, the three proposed methods have still maintained their efficiency. The OFADA approach showed a very good convergence in the F16 function, and in other functions, from the very beginning, it converges very quickly towards the target and displays better results. Of course, the OFA approach has shown less efficiency since it was based on an OBL method of efficiency. The FADA approach, due to the use of robust exploration and efficiency operators of DA, has been able to show good convergence in most of the functions.
Therefore, it can be concluded that the OFA approach cannot be used in metaheuristic algorithms only because it has high exploration. It should be noted that the hybrid FADA approach may display weak exploration in some functions. Therefore, adding an OBL method to the FADA approach, as in the proposed OFADA approach, can ensure the accuracy and efficiency of the three proposed methods.
In this subsection, three proposed methods and other metaheuristic algorithms are implemented on thirty-dimensional functions, and the results of each function are presented as a graph. According to Table 1, the number of thirty-dimensional functions is 3, which are considered for evaluating the three proposed methods. Therefore, the three proposed methods as well as other basic metaheuristic algorithms including DE, ABC, FA, and DA are implemented on thirty-dimensional benchmark functions for comparison and the results are presented in the form of graphs. The results of the implementation of the three proposed methods and other basic algorithms on the 3 thirty-dimensional benchmark functions are shown in Fig. 11.
The convergence rate of the three proposed methods on thirty-dimensional Eq. (18).
According to Fig. 11, by comparing the results of the three proposed methods and other compared algorithms, it can be seen that the metaheuristic algorithms and the three proposed methods give different results for the 30-dimensional functions. In the thirty-dimensional functions, the OFADA approach has shown the best performance. The three proposed methods were able to converge the optimization functions with the medium number of dimensions well toward the target. The three proposed methods were able to converge the optimization functions with the high number of dimensions well toward the target and maintain their performance in high-dimensions. Therefore, the results show that the three proposed methods can successfully solve continuous optimization problems in small-, medium- and high-dimensions and display successful results.
The results of implementation of the three proposed methods and other metaheuristic algorithms on multi-dimensional functions in different dimensions are shown in the previous subsections in the form of graphs. In these experiments, three proposed methods are compared with the DE, ABC, FA, and DA in different dimensions. The three proposed methods are shown with black color in graphs and have been able to show a better and more robust performance than other algorithms. Here, we have carried out more tests to validate the efficiency of the three proposed methods, and the results in terms of statistical tests such as average, best, worst, and standard deviations values are presented in Tables 4 to 7. Before presenting the results of the three proposed methods in terms of statistical criteria, each of the statistical criteria is defined in Table 3.
The calculation of statistical criteria
The calculation of statistical criteria
In Table 3, statistical criteria are described with their calculation formula which Fitness is the degree of fitness of each of the solutions available in population. Population represents the population of each of the algorithms, Npop represents the total number of solutions in the population of each algorithm.
In this experiment, three proposed methods are compared with DE, ABC, FA, and DA in small, medium, and large dimensions. In this experiment, the number of evaluations of the target function is considered to be 1500, so that all algorithms are compared with the same evaluation number and we can determine which algorithm is more robust and better.
The results in Tables 4 to 7 show that the three proposed methods are statistically significant in terms of statistical criteria such as the worst, the average, and standard deviation values. These criteria indicate how the proposed method changes and converges all the solutions in the population toward the target. Therefore, the better statistical criteria suggest that the three proposed methods will improve all the existing solutions in the population and can display better efficiency and performance. In this experiment, three proposed methods have been evaluated in different dimensions in terms of statistical criteria. The results show that the three proposed methods have a better average and standard deviation in most implementations. Therefore, it can be said that the three proposed methods has been able to improve all the existing solutions. Of course, the three proposed methods have a better value than the other metaheuristic algorithms in terms of the worst and best solution with regard to the standard deviation, as shown in Tables 4 to 7.
According to the results of Figs 6 to 11 and Tables 4 to 7, it can be said that the hybrid algorithm has somewhat improved exploration and exploitation, because in the hybrid algorithm, two processes of the firefly algorithm and dragonfly algorithm are applied to two different populations. This work led us to use the power of the process of both algorithms and on the other hand, the hybrid algorithm may lose its power and efficiency in more repetitions, which the opposition-based method is used to cover it. The opposite-based learning method with the proposed algorithm in most functions, in terms of statistical criteria and the best answer in each generation increases population diversity, improves the convergence
Evaluation of three proposed methods with statistical criteria(2D)
Evaluation of three proposed method with statistical criteria(4D)
speed and accuracy, enhances the efficiency and quality of the solution, finds a better search space and produces more precise solutions in the hybrid algorithm. Of course the evaluation indicates that the proposed method works better with opposition-based method with more repetition, because the opposition-based approach during implementation can create new solutions in a symmetric space. In general, the hybrid algorithm performs better with the help of this symmetrical space.
Evaluation of three proposed methods with statistical criteria(10D)
Evaluation of proposed methods with statistical criteria(30D)
The metaheuristic algorithms, in contrast to the conventional methods of solving hard classical problems, such as mathematical and numerical computations, use random phenomena and inspirations from the nature to solve continuous optimization problems. The FA is inspired by the optical connection between fireflies. In recent years, researchers have developed different hybridizations of FA with other metaheuristic algorithms to improve its capability in solving continuous optimization problems. In this paper, three different approaches were proposed to improve the FA.
In the FADA, we used a metaheuristic algorithm called DA to improve the exploration and efficiency of FA, and thereby, presented a new hybrid FA and DA. In this method, we divided the population between two FA and DA and then used robust operators of the DA to improve the solutions of the FA and finally switched solutions between the two algorithms. In the FA, an OFA was proposed to accelerate convergence rate and improve exploration capability of the FA. In this way, in each iteration, the FA is performed with a given probability of a jump to the opposite search space which is similar to the randomized initialization scheme and the opposite search space. Generation jump can generate a main population and an opposite population in any desired generation, and ultimately the most appropriate solutions are selected from both sets. In fact, this approach, using an OBL method to increase exploration, prevents the FA from getting stuck in a local trap and thus improves the exploration of the FA. In order to have a better population from the very beginning and to improve the convergence and accuracy of the hybrid algorithm, in this paper we proposed a third approach, which uses a hybridization of the hybrid algorithm suggested in the FADA and the OBL method.
Finally, the three proposed methods were simulated and implemented on 20 benchmark functions which were previously introduced to evaluate the three proposed methods. In the simulation sections, we implemented three proposed methods and other metaheuristic algorithms on functions with different dimensions. The results of the implementation of three proposed methods and other basic metaheuristic algorithms on 8 two-dimensional benchmark functions, 3 four-dimensional benchmark functions, 6 ten-dimensional benchmark functions and 3 thirty-dimensional benchmark functions demonstrate that all three proposed methods can solve the two-dimensional optimization functions very well and, in general, have shown better efficiency and performance compared to other metaheuristic algorithms. In the four-dimensional functions, OFADA approach has shown the best performance. The performance of the FA was reduced in some functions by increasing the number of evaluations. The three proposed methods can converge optimization functions with 10 dimensions well toward the target. Note that with increasing the number of dimensions, some of the algorithms such as the ABC algorithm perform weaker, but the three proposed methods have still maintained their efficiency. The three proposed methods were able to better converge the higher-dimension optimization functions toward the target compared to other metaheuristic algorithms, and maintain their efficiency. They also had a successful performance in functions with fewer dimensions.
