【黏菌优化算法】基于自适应对抗粘菌优化算法求解单目标优化我问他 (AOSMA)含Matlab源码

1 简介

黏菌优化算法(Slime mould algorithm,SMA)由 Li等于 2020 年提出,其灵感来自于黏菌的扩散和觅食行为,属于元启发算法。具有收敛速度快,寻优能力强的特点。黏菌优化算法用数学模型模仿黏菌觅食行为和形态变化, SMA 包括三个阶段,分别为接近食物阶段、包围食物阶段和抓取食物阶段。​

2 部分代码

% Adaptive Opposition Slime Mould Algorithm (AOSMA) source Code Version 1.0%clearvarsclose allclcdisp('The AOSMA is tracking the problem');N=30; % Number of slime mouldFunction_name='F1'; % 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 detailsTimes=21; %Number of independent times you want to run the AOSMAdisplay(['Number of independent runs: ', num2str(Times)]);for i=1:Times[Destination_fitness(i),bestPositions(i,:),Convergence_curve(i,:)]=AOSMA(N,MaxIT,lb,ub,dim,fobj);display(['The optimal fitness of AOSMA 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 AOSMA is: ', num2str(bestfitness)]);display(['The average fitness of AOSMA is: ', num2str(mean(Destination_fitness))]);display(['The standard deviation fitness of AOSMA is: ', num2str(std(Destination_fitness))]);display(['The best location of AOSMA is: ', num2str(bestPositions(index,:))]);figure('Position',[269   240   660   290])%Draw search spacesubplot(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 spacesubplot(1,2,2);semilogy(Convergence_curve(index,:),'Color','r','linewidth',2.5);title('Objective space')xlabel('Iteration');ylabel('Best score obtained so far');legend('AOSMA');axis tightgrid onbox on

3 仿真结果

4 参考文献

[1]郭雨鑫,刘升,张磊,黄倩.精英反向与二次插值改进的黏菌算法[J/OL].计算机应用研究:1-7

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

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

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

matlab科研助手

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

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

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

打赏作者

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

抵扣说明:

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

余额充值