File Exchange

image thumbnail

BDA: Binary Dragonfly Algorithm

version (370 KB) by Seyedali Mirjalili
The binary version of the Dragonfly Algorithm (DA) for solving binary optimization problems


Updated 22 May 2018

View License

This is the binary version of the recently proposed DA algorithm. The main inspiration of the DA algorithm originates from the static and dynamic swarming behaviours of dragonflies in nature. Two essential phases of optimization, exploration and exploitation, are designed by modelling the social interaction of dragonflies in navigating, searching for foods, and avoiding enemies when swarming dynamically or statistically.
This is the source codes of the paper:
Seyedali Mirjalili, "Dragonfly Algorithm: A New Meta-heuristic Optimization Technique for Solving Single-objective, Discrete, and Multi-objective Problems " , Neural Computing and Applications, in press, 2015, DOI:

If you have no access to the paper, please drop me an email at and I will send you the paper.

More information can be found in:

I have a number of relevant courses in this area. You can enrol via the following links with 95% discount:

A course on “Optimization Problems and Algorithms: how to understand, formulation, and solve optimization problems”:

A course on “Introduction to Genetic Algorithms: Theory and Applications”

Comments and Ratings (5)

eric githua

@ Pradeep: in binary optimization, the up and lb are defined by the number of bits that you allocated to your number/
@ Shimaa: because the global optimum of the objective function used is at the (0,0,0,...,0)
@ Haidy: it is fine because we add elements in this vector in the loop. However, you are correct and it would be more efficient if we first define x and then use it in the loop.


haidy (view profile)

i think there is a missing code line, that define the x data!

Shimaa Said

Why all values in result equal zero
And how I can give each solution index


How to used binary DA for ub and lb boundary problem.


Links added:

Descriptions have been updated.

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor