File Exchange

image thumbnail

SSA: Salp Swarm Algorithm

version 1.0.0.0 (109 KB) by Seyedali Mirjalili
SSA is a novel algorithm for solving single-objective optimization problems

51 Downloads

Updated 22 May 2018

View License

The main inspiration of SSA is the swarming behaviour of salps when navigating and foraging in oceans. Read this webpage to know more about the inspiration: https://en.wikipedia.org/wiki/Salp

This is the source codes of the paper:

S. Mirjalili, A.H. Gandomi, S.Z. Mirjalili, S. Saremi, H. Faris, S.M. Mirjalili, Salp Swarm Algorithm: A bio-inspired optimizer for engineering design problems, Advances in Engineering Software, in-press, DOI: http://dx.doi.org/10.1016/j.advengsoft.2017.07.002

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
*******************************************************************************************************************************************

Cite As

Seyedali Mirjalili (2020). SSA: Salp Swarm Algorithm (https://www.mathworks.com/matlabcentral/fileexchange/63745-ssa-salp-swarm-algorithm), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (20)

matlab24

thanks for free code. this code shared in http://matlab24.ir/salp-swarm.
اسلاید فارسی، ترجمه مقاله و انجام پروژه با الگوریتم Salp نیز توسط تیم ما قابل انجام است

Check out my github, I implemented this algorithm in Python (Numpy) for better performance.
https://github.com/thieunguyen5991/metaheuristics

Benchmark 17 is showing error. I mean dimensions are not matching. See the Matlab reply...
Error using >
Matrix dimensions must agree.
Error in SSA (line 87)
Tp=SalpPositions(i,:)>ub';Tm=SalpPositions(i,:)<lb';SalpPositions(i,:)=(SalpPositions(i,:).*(~(Tp+Tm)))+ub'.*Tp+lb'.*Tm;
Error in main (line 47)
[Best_score,Best_pos,SSA_cg_curve]=SSA(SearchAgents_no,Max_iteration,lb,ub,dim,fobj);

Thanks for your nice comment Quoc.

The code works perfectly.
Thank you for your great work!

Thank you for your advice. @Seyedali Mirjalili

Thanks Kacjer, I noticed updating more than one solution better solve some problems. Try to do some experiments to see which method suits your problem best.

Besides, I have another question. Don't we need to update the leader according to the fitness comparison after every iteration? Thank you so much.

Thank you for your excellent contribution. I wondered why half the swarms are chosen as the leader to update their position. Thank you again!

@ sush mhatugade: you have to add constraints in the objective function.
@ Mohammed: you have to add constraints in the objective function.
@ Premkumar: It is difficult for me to debug your code given this short description. Please use the Matlab debugger and run the code line by line until you find the error.

James Too

Mai I know the reason for the SSA algorithm to use " if i <= N/2 " , but not "i==1" for the leader salp to update? Thank you

I thought of using this algorithm for detecting global peak (Solar PV MPPT). While running the code, it is showing that "N" is Undefined function or variable 'N', Undefined function or variable 'newindex' and Undefined function or variable 'Sorted_salps'. The first assignment to a local variable determines its class. Please help me in this regard.

How to add constraints in the code?

how do we enter equality constraints in the code?

I am working on other projects now.

Weimin Xiao

would you consider evaluating the SI with cec2013 or later benchmark functions?

Yes, it is a swarm intelligence technique

is this algorithm comes under the category of PSO?

Updates

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