1 简介
✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
更多Matlab仿真内容点击👇
2 部分代码
clearvars
close all
clc
N=30; % Number of Squirrel
Function_name='F11'; % Name of the test function that can be from F1 to F24
max_iter=500; % Maximum number of iterations
[lb,ub,dim,ObjectiveFunction]=Get_Functions_details(Function_name); % Function details
Times=1; %Number of independent times you want to run the DSSA
display(['Number of independent runs: ', num2str(Times)]);
[global_pop,fit_global, minc]=PFA(N ,dim ,max_iter,lb,ub,ObjectiveFunction);
figure;
subplot(121)
func_plot(Function_name);
title(Function_name)
xlabel('x_1');
ylabel('x_2');
zlabel([Function_name,'( x_1 , x_2 )'])
subplot(122)
semilogy(minc,'LineWidth',3);
xlabel('Iterations');
ylabel('Best fitness obtained so far');
legend('PFA');
box on;
axis tight;
grid off;
3 仿真结果
4 参考文献
[1]张小萍, 谭欢. 基于改进探路者算法求解0-1背包问题[J]. 邵阳学院学报:自然科学版, 2022, 19(1):7.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
————————————————
版权声明:本文为优快云博主「Matlab科研工作室」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.youkuaiyun.com/qq_59747472/article/details/124696341