本文主要是介绍【优化求解】基于野马算法求解单目标优化问题附matlab代码,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1 简介
Nowadays, the design of optimization algorithms is very popular to solve problems in various scientifc felds. The optimization algorithms usually inspired by the natural behaviour of an agent, which can be humans, animals, plants, or a physical or chemical agent. Most of the algorithms proposed in the last decade inspired by animal behaviour. In this article, we present a new optimizer algorithm called the wild horse optimizer (WHO), which is inspired by the social life behaviour of wild horses. Horses usually live in groups that include a stallion and several mares and foals. Horses exhibit many behaviours, such as grazing, chasing, dominating, leading, and mating. A fascinating behaviour that distinguishes horses from other animals is the decency of horses. Horse decency behaviour is such that the foals of the horse leave the group before reaching puberty and join other groups. This departure is to prevent the father from mating with the daughter or siblings. The main inspiration for the proposed algorithm is the decency behaviour of the horse. The proposed algorithm was tested on several sets of test functions such as CEC2017 and CEC2019 and compared with popular and new optimization methods. The results showed that the proposed algorithm presented very competitive results compared to other algorithms
2 部分代码
% _____________________________________________________
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
close all
clc
N=30; % Number of search agents
Function_name='F12'; % % Name of the test function that can be from F1 to F13 and cec01 to cec10
Max_iter=500; % Maximum number of iterations
% Load details of the selected benchmark function
[dim,fobj,ub, lb] = Select_Functions(Function_name);
[Convergence_curve,gBest,gBestScore]=WHO(N,Max_iter,lb,ub,dim,fobj);
figure('Position',[269 240 660 290])
%Draw search space
subplot(1,2,1);
func_plot(Function_name);
title('Parameter space')
xlabel('x_1');
ylabel('x_2');
zlabel([Function_name,'( x_1 , x_2 )'])
%Draw objective space
subplot(1,2,2);
semilogy(Convergence_curve,'Color','r')
title('Objective space')
xlabel('Iteration');
ylabel('Best score obtained so far');
axis tight
grid on
box on
legend('WHO')
display(['The best location of WHO is: ', num2str(gBest)]);
display(['The best fitness of WHO is: ', num2str(gBestScore)]);
gBestScore
3 仿真结果
4 参考文献
Naruei, Iraj, and Farshid Keynia. “Wild Horse Optimizer: a New Meta-Heuristic Algorithm for Solving Engineering Optimization Problems.” Engineering with Computers, Springer Science and Business Media LLC, June 2021, doi:10.1007/s00366-021-01438-z.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
这篇关于【优化求解】基于野马算法求解单目标优化问题附matlab代码的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!