# Dragonfly Algorithm (DA) to solve Numerical Optimization Problem

1. Introduction

The main inspiration of the Dragonfly Algorithm (DA) algorithm proposed in 2015 originates from static and dynamic swarming behaviours. These two swarming behaviours are very similar to the two main phases of optimization using meta-heuristics: exploration and exploitation. Dragonflies create sub swarms and fly over different areas in a static swarm, which is the main objective of the exploration phase. In the static swarm, however, dragonflies fly in bigger swarms and along one direction, which is favourable in the exploitation phase [1]. For simulating the swarming behaviour of dragonflies, three primitive principles of swarming in insects proposed by Reynold as well as two other new concepts have been utilized: separation, alignment, cohesion, attraction to food source, distraction from enemies. These five concepts allow us to simulate the behaviour of dragonflies in both dynamic and static swarms. The DA algorithm is developed based on the framework of the Particle Swarm Optimization (PSO) algorithm, so there are two main vectors: step vector and position vector. These vectors store the movement directions/speed and position of dragonflies, respectively. Solving a multi-objective problem using a meta-heuristic require special considerations [2]. In contrary to single-objective optimization, there is no single solution when considering multiple objectives as the goal of the optimization process. In this case, a set of solutions, which represents various trade-offs between the objectives, includes optimal solutions of a multi-objective problem. Before 1984, mathematical multi-objective optimization techniques were popular among researchers in different fields of study such as applied mathematics, operation research, and computer science. Since the majority of the conventional approaches (including deterministic methods) suffered from stagnation in local optima, however, such techniques were not applicable as there are not nowadays. This is the reason why stochastic optimization algorithms are reliable alternative due the high local optima avoidance. In order to solve multi-objective problems using meta-heuristics, an archive (repository) is widely used in the literature to maintain the Pareto optimal solutions during optimization. Two key points in finding a proper set of Pareto optimal solutions for a given problem are convergence and coverage. Convergence refers to the ability of a multi-objective algorithm in determining accurate approximations of Pareto optimal solutions. Coverage is the distribution of the obtained Pareto optimal solutions along the objectives. Since most of the current multi-objective algorithms in the literature are of a posteriori type, the coverage and number of solutions are very important for decision making after the optimization process. The ultimate goal for a multi-objective optimizer is to find the most accurate approximation of true Pareto optimal solutions (convergence) with uniform distributions (coverage) across all objectives [3].

2. Life Cycle of DragonFly

A dragonfly has a life span of more than a year, but very little of that life is actually as an adult dragonfly. There are three stages of the dragonfly life cycle, the egg, the nymph, and the adult dragonfly. Most of the life cycle of a dragonfly is lived out in the nymph stage and you don’t see them at all, unless you are swimming underwater in a lake or pond with your eyes opened, of course. A male and a female dragonfly will mate while they are flying in the air [4]. After two dragonflies mate, the female dragonfly will lay her eggs on a plant in the water, or if she can’t find a suitable plant she will just drop them into the water.

Once the dragonfly eggs hatch, the life cycle of a dragonfly larva begins as a nymph. A nymph looks like a little alien creature. It hasn’t grown its wings yet and has what looks like a crusty hump hanging onto its back. Dragonfly nymphs live in the water while they grow and develop into dragonflies [5]. This portion of the dragonfly life cycle can take up to four years to complete, and if the nymph cycle is completed in the beginning of the wintertime, it will remain in the water until spring when it is warm enough to come out. Dragonfly nymphs live in ponds or marshy areas because the waters are calmer than in a stream or river. Sometimes they can be found in the calmer backwaters of rivers, too. Dragonfly nymphs may eat smaller dragonfly nymphs as they develop.

Once the nymph is fully grown, and the weather is right, it will complete the metamorphosis into a dragonfly by crawling out of the water up the stem of a plant. The nymph will shed its skin onto the stem of the plant and will then be a young dragonfly. The skin that the nymph left behind is called the exuvia and you can find the exuvia still stuck to the stem for a long time after the dragonfly has left it. Once the dragonfly leaves the exuvia it is a full grown dragonfly. The dragonfly will hunt for food and begin to look for a mate. Once the dragonfly finds a mate, the female will find a body of calm water that will be a good place to lay her eggs, and the life cycle of the dragonfly begins all over again. Adult dragonflies only live about two months [6].

3. Dragonfly Algorithm (DA)

For solving multi-objective problems using the DA algorithm, it is first equipped with an archive to store and retrieve the best approximations of the true Pareto optimal solutions during optimization. The updating position of search agents is identical to that of DA, but the food sources are selected from the archive [7]. In order to find a well-spread Pareto optimal front, a food source is chosen from the least populated region of the obtained Pareto optimal front, similarly to the Multi-Objective Particle Swarm Optimization (MOPSO) algorithm in the literature. To find the least populated area of the Pareto optimal front, the search space should be segmented. This is done by finding the best and worst objectives of Pareto optimal solutions obtained, defining a hyper sphere to cover all the solutions, and dividing the hyper spheres to equal sub hyper spheres in each iteration. After the creation of segments, the selection is done by a roulette-wheel mechanism [8]. This mechanism allows the MODA algorithm to have higher probability of choosing food sources from the less populated segments. Therefore, the artificial dragonflies will be encouraged to fly around such regions and improve the distribution of the whole Pareto optimal front. For selecting enemies from the archive, however, the worst (most populated) hyper sphere should be chosen in order to discourage the artificial dragonflies from searching around non-promising crowded areas. The archive should be updated regularly in each iteration and may become full during optimization. Therefore, there should be a mechanism to manage the archive. If a solution is dominated by at least one of the archive residences, it should be prevented from entering the archive [9]. If a solution dominates some of the Pareto optimal solutions in the archive, they all should be removed from the archive, and the solution should be allowed to enter the archive. If a solution is non-dominated with respect to all of the solutions in the archive, it should be added to the archive. If the archive is full, one or more than one solutions may be removed from the most populated segments to accommodate new solution(s) in the archive.

3.1. Steps for Dragonfly Algorithm (DA)

• Separation
• Alignment
• Cohesion
• Attraction to a food source
• Deflection from enemies

3.1.1. Separation

Separation is the static collision avoidance of the individuals from others in the neighbourhood. It is a strategy that dragonflies use to separate themselves from other agents [10].

3.1.2. Alignment

Alignment indicates velocity matching of individuals to the other individuals in neighbourhood. It shows how an agent will set its velocity with respect to the velocity vector of other adjacent dragonflies [11].

3.1.3. Cohesion

Cohesion refers to the tendency of individuals towards the centre of the mass of the neighbourhood.Cohesion indicates the inclination of members to move in the direction of the nearby center of mass [12]. Preserve the unity of the dragonflies to set the direction to the center of neighborhood.

3.1.4. Attraction to a food source

This study aims to explore factors affecting travellers’ food-related behaviour by focusing on the local food market. By doing so, the study contributes to the research on food experience in tourism and food-based regional development [13]. The local food phenomenon presents essential research issues from various perspectives. Seeking of the dragonflies to move towards food source [14].

3.1.5. Deflection from enemies

Seeking of the dragonflies to stay away from enemies [15].

3.2. Flow Chart of DA Algorithm

4. Numerical Methods of DF Algorithm

The mathematical formulation of the objective function along with the constraints is formulated as follows [16]:

5. Applications of DF Algorithm

• Software Design and Development
• Modernisation solution[17]
• Web Applications
• Platform Information[18]
• Mobile Applications
• Android Operating System[19]

• A set of assessment indicators is used to evaluate the proposed and compared methods over ten regression data sets from the UCI repository [20].
• It gives competitive results in terms of convergence, accuracy and search-ability when compared with the state-of-the-art algorithms [21].
• DA is a successful, well-established metaheuristic that revealed superior efficacy in dealing with various optimization problems including feature selection [22].
• DA may result in low solution accuracy, easy stagnation at local optima and an imbalance between exploration and exploitation.
• The way to attain the high quality in the education system is to determine the knowledge from the educational data and learn the attributes which influence the performance of the students [23].
• The most challenging is to protect the data bearing structures such as edges and surfaces to get good visual quality while enhancing Peak Signal to Noise Ratio (PSNR) [24].

Reference

[1] Díaz-Cortés, M., Ortega-Sánchez, N., Hinojosa, S., Oliva, D., Cuevas, E., Rojas, R. and Demin, A. (2018). A multi-level thresholding method for breast thermograms analysis using Dragonfly algorithm. Infrared Physics & Technology, 93, pp.346-361.

[2] Sambandam, R. and Jayaraman, S. (2018). Self-adaptive dragonfly based optimal thresholding for multilevel segmentation of digital images. Journal of King Saud University – Computer and Information Sciences, 30(4), pp.449-461.

[3] Xu, L., Jia, H., Lang, C., Peng, X. and Sun, K. (2019). A Novel Method for Multilevel Color Image Segmentation Based on Dragonfly Algorithm and Differential Evolution. IEEE Access, 7, pp.19502-19538.

[4] K.S., S. and Murugan, S. (2017). Memory based Hybrid Dragonfly Algorithm for numerical optimization problems. Expert Systems with Applications, 83, pp.63-78.

[5] WANG, P., MAO, Z., CHEN, J. and PAN, F. (2011). Parameter optimization algorithm for support vector machine based on predatory search genetic algorithm. Journal of Computer Applications, 31(2), pp.498-500.

[6] Peng, W., Xu, L., Li, C., Xie, X. and Zhang, G. (2019). Stacked autoencoders and extreme learning machine based hybrid model for electrical load prediction. Journal of Intelligent & Fuzzy Systems, pp.1-14.

[7] Sayed, G., Tharwat, A. and Hassanien, A. (2018). Chaotic dragonfly algorithm: an improved metaheuristic algorithm for feature selection. Applied Intelligence, 49(1), pp.188-205.

[8] Xu, J. and Yan, F. (2018). Hybrid Nelder–Mead Algorithm and Dragonfly Algorithm for Function Optimization and the Training of a Multilayer Perceptron. Arabian Journal for Science and Engineering, 44(4), pp.3473-3487.

[9] VeeraManickam, M., Mohanapriya, M., Pandey, B., Akhade, S., Kale, S., Patil, R. and Vigneshwar, M. (2018). Map-Reduce framework based cluster architecture for academic student’s performance prediction using cumulative dragonfly based neural network. Cluster Computing, 22(S1), pp.1259-1275.

[10] El-Hay, E., El-Hameed, M. and El-Fergany, A. (2018). Improved performance of PEM fuel cells stack feeding switched reluctance motor using multi-objective dragonfly optimizer. Neural Computing and Applications.

[11] Hamed, M. (1992). An Algorithm for Solving the Traveling Salesman Problem. Journal of King Abdulaziz University-Engineering Sciences, 4(1), pp.117-122.

[12] Shelke, P. and Prasad, R. (2019). DBFS: Dragonfly Bayes Fusion System to detect the tampered JPEG image for forensic analysis. Evolutionary Intelligence.

[13] Elhoseny, M. and Shankar, K. (2019). Optimal bilateral filter and Convolutional Neural Network based denoising method of medical image measurements. Measurement, 143, pp.125-135.

[14] Li, S. and Shao, L. (2013). Clustering Algorithm for Multiple Data Streams Based on Data Cloud Node. Applied Mechanics and Materials, 462-463, pp.247-250.

[15] Olberg, R., Worthington, A. and Venator, K. (2000). Prey pursuit and interception in dragonflies. Journal of Comparative Physiology A: Sensory, Neural, and Behavioral Physiology, 186(2), pp.155-162.

[16] A Video Smoke Detection Algorithm Based on Cascade Classification and Deep Learning. (2018). KSII Transactions on Internet and Information Systems, 12(12).

[17] Allam, M. and Nandhini, M. (2018). Optimal feature selection using binary teaching learning based optimization algorithm. Journal of King Saud University – Computer and Information Sciences.

[18] Olberg, R. (2012). Visual control of prey-capture flight in dragonflies. Current Opinion in Neurobiology, 22(2), pp.267-271.

[19] Migliori, S., Chiastra, C., Bologna, M., Montin, E., Dubini, G., Aurigemma, C., Fedele, R., Burzotta, F., Mainardi, L. and Migliavacca, F. (2017). A framework for computational fluid dynamic analyses of patient-specific stented coronary arteries from optical coherence tomography images. Medical Engineering & Physics, 47, pp.105-116.

[20] Kallidonis, P., Kagadis, G., Kitrou, P., Tsamandas, A., Kyriazis, I., Georgiopoulos, I., Karnabatidis, D., Tsantis, S., Liourdi, D., Al-Aown, A. and Liatsikos, E. (2014). Optical coherence tomography provides images similar to histology and allows the performance of extensive measurements of drug-eluting metal stents in animal ureters. Lasers in Medical Science, 29(4), pp.1453-1462.

[21] Huang, C., Xie, Y., Lan, Y., Hao, Y., Chen, F., Cheng, Y. and Peng, Y. (2018). A New Framework for the Integrative Analytics of Intravascular Ultrasound and Optical Coherence Tomography Images. IEEE Access, 6, pp.36408-36419.

[22] C. Kharmyssov, C., M. W. L. Ko, M. and J. R. Kim, J. (2019). Automated segmentation of optical coherence tomography images. Chinese Optics Letters, 17(1), p.011701.

[23] Ghanem, W. and Jantan, A. (2018). A Cognitively Inspired Hybridization of Artificial Bee Colony and Dragonfly Algorithms for Training Multi-layer Perceptrons. Cognitive Computation, 10(6), pp.1096-1134.

[24] Akbulut, Y., Guo, Y., Şengür, A. and Aslan, M. (2018). An effective color texture image segmentation algorithm based on hermite transform. Applied Soft Computing, 67, pp.494-504.