This repository contains the Harris Hawks Optimization code (matlab M-file) for optimizing the benchmark function:
.
├── img
| ├── convergence-2d.png
| ├── convergence-50d.png
| ├── logo.jpg
| ├── schwefel_222.gif
| └── trajectory.png
├── _config.yml
├── hho.m —— [function of harris hawks optimization]
├── LICENSE
├── README.md
└── test.m —— [a test for 'hho.m']
[fbst, xbst, performance] = hho ( objective, d, lmt, n, T, S )where
objectiveis the function handle of the objective functiondis the dimension of the design variablelmtis the limit of the design variable; is a matrix withdrows and 2 column, and the first column contains lower limits of all dimension while the second upper ones.nis the population size of the particle swarmTis the maximum iteration times.fbstis the fitness of the optimal solutionxbstis the optimal solutionperformanceis contains the best fitness value, the average fitness value and the standard deviation.
For instance, a benchmark Schwefel 2.22 is chosen for a test:
Here, this benchmark is coded as a function handle
schwefel_222 = @(x) sum(abs(x))+prod(abs(x));where x is a d-by-n matrix.
To run the test by executing
test.mThe test including two runs:
-
30-
dbenchmarkThe results includes an optimal solution, its fitness and an execution time. Also, a plot of the convergence curve of fitness is shown.
-
2-
dbenchmarkThe results includes an optimal solution, its fitness and an execution time. Also, a plot of the convergence curve of fitness, a plot of the trajectory of global optimal are shown.
[1] Article: Harris hawks optimization: Algorithm and applications
[2] Repo: BenchmarkFcns



