File Exchange

image thumbnail

A mayfly optimization algorithm

version 2.6 (3.36 KB) by Konstantinos Zervoudakis
Mayfly Algorithm for global optimization

52 Downloads

Updated 12 Jan 2021

View Version History

View License

This simplified Matlab demo code shows how to use the new Mayfly Algorithm to solve global optimization problems.

Cite As

Konstantinos Zervoudakis (2021). A mayfly optimization algorithm (https://www.mathworks.com/matlabcentral/fileexchange/76902-a-mayfly-optimization-algorithm), MATLAB Central File Exchange. Retrieved .

Zervoudakis, K., & Tsafarakis, S. (2020). A mayfly optimization algorithm. Computers & Industrial Engineering, 145, 106559. https://doi.org/10.1016/j.cie.2020.106559

Zervoudakis, K., & Tsafarakis, S. (2020), “Mayfly optimization Algorithm - Matlab code”, Mendeley Data, v1. http://dx.doi.org/10.17632/5w58s8hhz2.1

Comments and Ratings (14)

Xiaoma Liu

Benjamin Bohan

k kundu

sir, i have came across with ur another paper on Linear antenna array synthesis using Mayfly Algorithm.Can you please help me in getting code for that.my mail id 1sonu1986@gmail.com.

Lee Jiang Wei

@Sadiq Akbar
ProblemSize=[1 50] is the dimension of your solution vector.
Your objective function needs a solution to evaluate. What is the dimension of this solution? E.g. [1 5]? [3 2]? etc...

Sadiq Akbar

@konstantinos! I downloaded the code, but it gives error. Can you tell me what do you mean by ProblemSize=[1 50]; When I run it, it gives me the following error:
Subscripted assignment dimension mismatch.
Error in fun2sn0 (line 11)
[~, ix1(ix)] = sort(b); % temp stores the randomly generated vector "best" by algorithm
Error in MA>@(x)fun2sn0(x)
Error in MA (line 71)
Mayfly(i).Cost=ObjectiveFunction(Mayfly(i).Position);

伟 张

伟 张

All functions are included in one file, it's hard to understand the code like this.

omima bakry

@konstantinos Ok think you

@onima bakra. Yes. In case where your problem is a discrete one, you need to convert the continuous values to discrete ones.

omima bakry

@konstantinos Ok think you
can i use mayfly for solving opf problem for ieee 33 bus system

@onima bakra. The problem probably stems from the R2014a version of Matlab, since the Mayfly Algorithm code was created with R2019a. Considering that in line 229 the functions start to appear, you should move all functions to separate files.

omima bakry

I download and made run but there are error in line 229 column 1 i used matlab R2014a

Nick Rdrm

MATLAB Release Compatibility
Created with R2019a
Compatible with R2018a and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!