【智能优化算法】反对流定向算法MATLAB代码

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

⛄ 内容介绍

反对流定向算法MATLAB代码

⛄ 部分代码

% Opposition Flow Direction Algorithm (OFDA) source Code Version 1.0

%

% Developed in MATLAB R2018b

%

% Author and programmer: 

% Dr Manoj Kumar Naik

% Faculty of Engineering and Technology, Siksha O Anusandhan, Bhubaneswar, Odisha ?751030, India 

%_____________________________________________________________________________________________________           

% Please cite to the main paper:

% R. Panda, M. Swain, M. K. Naik, S. Agrawal, and A. Abraham, 

% 揂 Novel Practical Decisive Row-class Entropy-based Technique for Multilevel Threshold Selection 

% Using Opposition Flow Directional Algorithm,?IEEE Access, p. 1, 2022, doi: 10.1109/ACCESS.2022.3215082.

%

% This program using the framework of FDA by SEYEDALI MIRJALILI

% https://seyedalimirjalili.com/projects

%_____________________________________________________________________________________________________

clearvars

close all

clc

disp('The OFDA is tracking the problem');

alpha=30; % Number of flow

Function_name='F3' % Name of the test function that can be from F1 to F23 

MaxIT=500; % Maximum number of iterations

[lb,ub,dim,fobj]=Get_Functions_details(Function_name); % Function details

Times=11; %Number of independent times you want to run the OFDA

display(['Number of independent runs: ', num2str(Times)]);

for i=1:Times

[Destination_fitness(i),bestPositions(i,:),Convergence_curve(i,:)]=OFDA(alpha,MaxIT,lb,ub,dim,fobj);

display(['The optimal fitness of OFDA is: ', num2str(Destination_fitness(i))]);

end

[bestfitness,index]=min(Destination_fitness);

disp('--------Best Fitness, Average Fitness, Standard Deviation and Best Solution--------');

display(['The best fitness of OFDA is: ', num2str(bestfitness)]);

display(['The average fitness of OFDA is: ', num2str(mean(Destination_fitness))]);

display(['The standard deviation fitness of OFDA is: ', num2str(std(Destination_fitness))]);

display(['The best location of OFDA is: ', num2str(bestPositions(index,:))]);

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(index,:),'LineWidth',3);

xlabel('Iterations');

ylabel('Best fitness obtained so far');

legend('OFDA');

box on;

axis tight;

grid off;

⛄ 运行结果

⛄ 参考文献

R. Panda, M. Swain, M. K. Naik, S. Agrawal, and A. Abraham,  Novel Practical Decisive Row-class Entropy-based Technique for Multilevel Threshold Selection Using Opposition Flow Directional Algorithm,?IEEE Access, p. 1, 2022, doi: 10.1109/ACCESS.2022.3215082.

⛄ 完整代码

❤️部分理论引用网络文献,若有侵权联系博主删除

❤️ 关注我领取海量matlab电子书和数学建模资料

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

matlab科研助手

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值