File Exchange

image thumbnail

The Whale Optimization Algorithm

version 1.0.0.0 (230 KB) by Seyedali Mirjalili
WOA is a new algorithm for solving single-objective optimization problems

114 Downloads

Updated 22 May 2018

View License

The Whale Optimization Algorithm (WOA) is a new optimization technique for solving optimization problems. This algorithm includes three operators to simulate the search for prey, encircling prey, and bubble-net foraging behavior of humpback whales.
This is the source codes of the paper:
S. Mirjalili, A. Lewis, The Whale Optimization Algorithm, Advances in Engineering Software , in press, 2016, DOI: http://dx.doi.org/10.1016/j.advengsoft.2016.01.008

Link: http://www.sciencedirect.com/science/article/pii/S0965997816300163

A Matlab toolbox for this algorithm can be found here: http://au.mathworks.com/matlabcentral/fileexchange/55670-whale-optimization-algorithm-toolbox

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). The Whale Optimization Algorithm (https://www.mathworks.com/matlabcentral/fileexchange/55667-the-whale-optimization-algorithm), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (18)

matlab24

ممنون از مقاله خوبتون . این کد بصورت رایگان در متلب24 منتشر شد ، همچنین اسلاید آماده فارسی به همراه ترجمه فارسی مقاله نیز در لینک زیر قابل دریافت است http://matlab24.ir/category/ta/woa

Zhanchao Li

Nguyen Thieu

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

salwa elsayed

syed musthafa

how can i use this coding for tuning pid controllers

djim djim

Thanks for sharing

cui

tanfeng

Is there any binary version of WOA?

hello all
i have applied this technique in LFC problem.
iam geeting the error as
??? Subscript indices must either be real positive integers or logicals.

Error in ==> GWO at 50
fitness=fobj(Positions(i,:));
can any one resolve my error so that it will be helpful for me

Alex

Hi Dr. Mirjalili,

Thank you very much for sharing with us the code for this amazing optimization algorithm. I would like to use it on my research for structural optimization, just as you did in your paper. My question is , the code you shared with us contain examples of optimizing objective function with explicit expressions, can you shed me some light on how to modify the code so that it works for an optimization problem without an explicit expression. For example, I build a parametric finite element model of a structure, then I would like to optimize the structural parameters setting the maximum stress as the objective function. Can you share with us the code for one of the examples of truss optimization in your paper?

Seyedali Mirjalili

@ Ahmad: Yes, you have to use penalty or barrier functions. I have covered this here: https://www.udemy.com/optimisation/?couponCode=MATHWORKSREF
@ Heba: Yes, you have to use penalty or barrier functions. I have covered this here: https://www.udemy.com/optimisation/?couponCode=MATHWORKSREF
@ Weihua: Have you tried to fine tune the parameters of the WOA algorithm (e.g. maximum number of iterations, number of whales, etc.)
@ Ali Sameer: Yes you can. I have got several publications and source codes in the area of training ANN. Please check my website: http://www.alimirjalili.com

Ali sameer

Thanks for your efforts
Dear sir, I want to know if it is possible to utilize your grate algorithm to train Artificial Neural Network

Weihua Zheng

Sir, it seems that there are some problems with the codes, e.g, when dealing with the function 'F3' the optimal value found by WOA is between 40000 and 60000

Heba Elazab

Dear sir, I want to know can we access the program for constrained objective optimization.thanks in advance.

Ahmadi Mike

Dear sir, I want to know can we access the program for constrained multi-objective optimization. Thank you!

mohamed abu eita

Thanks, I have tested it on image binarization,
it's promising result.
for further info
m.abdelfatah@egyptscience.net
m_abdelfatah@ymail.com

thanks

Seyedali Mirjalili

You are right SAllee. It seems that I have forgotten to amend some of the comments. I will fix them soon. Thanks :)

SAIlee

sir,The last two lines in WOA.m should be 'The best solution obtained by WOA is' , you still write the 'The best solution obtained by GWO is' , you maybe forget to change,haha~~~

Updates

1.0.0.0

Links added:
https://www.udemy.com/optimisation/?couponCode=MATHWORKSREF
https://www.udemy.com/geneticalgorithm/?couponCode=MATHWORKSREF

1.0.0.0

A few comments have been amended in the main.m file.

1.0.0.0

A link to the toolbox has been added to the descriptions.

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