The proposed Grasshopper Optimisation Algorithm (GOA) mathematically models and mimics the behaviour of grasshopper swarms in nature for solving optimisation problems.
S. Saremi, S. Mirjalili, A. Lewis, Grasshopper Optimisation Algorithm: Theory and Application, Advances in Engineering Software , in press, 2016, DOI: http://dx.doi.org/10.1016/j.advengsoft.2017.01.004
Link: http://www.sciencedirect.com/science/article/pii/S0965997816305646
A Matlab toolbox for this algorithm can be found here: (to be advised later)
If you have no access to the paper, please drop me an email at ali.mirjalili@gmail.com and I will send you the paper.
All of the source codes and extra information as well as more optimization techniques can be found in my personal website at http://www.alimirjalili.com
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”:
https://www.udemy.com/optimisation/?couponCode=MATHWORKSREF
A course on “Introduction to Genetic Algorithms: Theory and Applications”
https://www.udemy.com/geneticalgorithm/?couponCode=MATHWORKSREF
*******************************************************************************************************************************************
Seyedali Mirjalili (2021). Grasshopper Optimisation Algorithm (GOA) (https://www.mathworks.com/matlabcentral/fileexchange/61421-grasshopper-optimisation-algorithm-goa), MATLAB Central File Exchange. Retrieved .
Inspired: MOGOA: Multi-Objective Grasshopper Optimization Algorithm
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
hi, professor.
xj_xi=2+rem(Dist,2); % |xjd - xid| in Eq. (2.7)
could you please explain why the xj_xi was calculated like this? is this equation used for standardlization to the (0,4) interval?
thanks
ممنون از شما بابت انتشا کد ، این کد به رایگان در http://matlab24.ir/category/ta/goa قرار گرفت.
Hi Professor, can we use this algorithm to optimize the GLCM features.
Hello Professor,
I want to use GOA for dimensions reduction.
How can I use this optimization for dimensions reduction?
please prof
your code when i apply it to optimize an objective function with odd dimension .It gives me an error
Error in GOA (line 33)
ub = [ub; 100];
Also if i use different values for the ub, lb such as ub =[10 20 ], lb = [5 2 ]. It gives another error
Error in GOA (line 85)
s_ij=((ub(k:k+1)
-
lb(k:k+1))*c/2)*S_func(xj_xi).*r_ij_vec;
%
The
first
part
inside
the
big
bracket
in
Eq.
(2.7)
please give me solution to can apply it in any objective functions with any dimension and with any values for the upper and lower boundaries.
Thanks prof for your effort
Hi Professor, where can I download the new version? The result in Table 2 of this article is that all test function dimensions are taken 30?
You can include a penalty function in the objective function.
Hi, professor
Thank you for your code,
I want to apply this code for a constrained function, could you explain how to add the constraints.
Dear Ali,
Thanks for all your replys
in the file GOA.m exactly in these instructions,
flag=0;
if size(ub,1)==1
ub=ones(dim,1)*ub;
lb=ones(dim,1)*lb;
end
if (rem(dim,2)~=0) % this algorithm should be run with a even number of variables. This line is to handle odd number of variables
dim = dim+1;
ub = [ub; 100];
lb = [lb; -100];
flag=1;
end
When I have
ub = data(:,2);
lb = data(:,1);
There is a changement in the previous instructions or not ?
or in other words which value I must changed in This code
dim = dim+1;
ub = [ub; 100];
lb = [lb; -100];
Hi,
Why the value of l=2, not 1? , in Woa algorithm this value equal 0 , so l must = 1 , please , see the results after running the first item remain 0.
@Zohir Salimi
For maximisation, the easiest way is to multiple the objective function by -1 :)
When you minimise the negative of your objective function, you maximise it. You can also change the code, but this is easier I believe.
Hi,
I fixed the errors. Please download the new version.
Regards,
Ali
Dear Zohur Salimi
The mentioned instructions in your response are added in the algorithm and give the same error
Error using .*
Matrix dimensions must agree.
Error in GOA (line 86)
s_ij=((ub(k:k+1) -
lb(k:k+1))*c/2)*S_func(xj_xi).*r_ij_vec;
% The first part inside the big bracket
in Eq. (2.7)
try to change dim of f1 to 29 and the boundaries to lb=[-10 20];
ub=[10 10 ];
you will find where the problem
Dear dalia elkashef,
just added in your programm at GOA.m these instructions
flag=0;
if size(ub,1)==1
ub=ones(dim,1)*ub;
lb=ones(dim,1)*lb;
end
if (rem(dim,2)~=0)
dim = dim+1;
ub = [ub; 47.8];
lb = [lb; 10.6];
flag=1;
end
Regards
Dear professor for maximization a such objective function, which parapeter I will must change?
Many Thanks
Hi!
Why you compute |xjd - xid| as 2+rem(distance,2)? I can't get it...
please prof
your code when i apply it to optimize an objective function with odd dimension .It gives me an error
Error in GOA (line 33)
ub = [ub; 100];
Also if i use different values for the ub, lb such as ub =[10 20 ], lb = [5 2 ]. It gives another error
Error in GOA (line 85)
s_ij=((ub(k:k+1)
-
lb(k:k+1))*c/2)*S_func(xj_xi).*r_ij_vec;
%
The
first
part
inside
the
big
bracket
in
Eq.
(2.7)
please give me solution to can apply it in any objective functions with any dimension and with any values for the upper and lower boundaries.
Thanks prof for your effort