1 内容介绍
【智能优化算法-长鼻浣熊优化算法】基于长鼻浣熊优化算法求解单目标优化问题附matlab代码
2 部分代码
%%
% Coati Optimization Algorithm: A New Bio-Inspired Metaheuristic Algorithm for Solving Optimization Problems
% Knowledge-Based Systems
% Mohammad Dehghani, Zeinab Montazeri and Pavel Trojovský1
% Department of Mathematics, Faculty of Science, University of Hradec Králové, 50003 Hradec Králové, Czech Republic
% " Optimizer"
%%
clc
clear
close all
%%
%%
Fun_name='F4'; % number of test functions: 'F1' to 'F23'
SearchAgents=30; % number of Coati (population members)
Max_iterations=200; % maximum number of iteration
[lowerbound,upperbound,dimension,fitness]=fun_info(Fun_name); % Object function information
[Best_score,Best_pos,COA_curve]=COA(SearchAgents,Max_iterations,lowerbound,upperbound,dimension,fitness); % Calculating the solution of the given problem using COA
%%
display(['The best solution obtained by COA for ' [num2str(Fun_name)],' is : ', num2str(Best_pos)]);
display(['The best optimal value of the objective funciton found by COA for ' [num2str(Fun_name)],' is : ', num2str(Best_score)]);
figure('Position',[284 214 660 290])
%Draw search space
subplot(1,2,1);
func_plot(Fun_name);
title('Test function')
xlabel('x_1');
ylabel('x_2');
zlabel([Fun_name,'( x_1 , x_2 )'])
grid off
%Draw objective space
subplot(1,2,2);
semilogy(COA_curve,'Color','b','linewidth',2)
title('Convergence curve')
xlabel('Iteration');
ylabel('Best flame (score) obtained so far');
axis tight
grid off
box on
legend('COA')
3 运行结果
4 参考文献
[1] Zeidabadi F A , Doumari S A , Dehghani M , et al. MLA:A New Mutated Leader Algorithm for Solving Optimization Problems[J]. 计算机、材料和连续体(英文), 2022(3):19.