1 简介
基于矮猫鼬优化算法求解单目标优化问题
2 部分代码
%_______________________________________________________________________________________%
% Dwarf Mongoose Optimization Algorithm source codes (version 1.0) %
%
clear all
clc
Solution_no=20;
F_name='F2';
M_Iter=1000;
[LB,UB,Dim,F_obj]=Get_F(F_name);
[Best_FF,Best_P,conv]=DMOA(Solution_no,M_Iter,LB,UB,Dim,F_obj);
figure('Position',[454 445 694 297]);
subplot(1,2,1);
func_plot(F_name);
title('Parameter space')
xlabel('x_1');
ylabel('x_2');
zlabel([F_name,'( x_1 , x_2 )'])
subplot(1,2,2);
semilogy(conv,'Color','r','LineWidth',2)
title('Convergence curve')
xlabel('Iteration#');
ylabel('Best fitness function');
axis tight
legend('DMOA')
display(['The best-obtained solution by DMOA is : ', num2str(Best_P)]);
display(['The best optimal values of the objective funciton found by DMOA is : ', num2str(Best_FF)]);