2025最新智能优化算法:野燕麦优化算法(Animated Oat Optimization Algorithm, AOO),MATLAB代码

野燕麦优化算法(Animated Oat Optimization Algorithm, AOO)是2025年提出一种新型元启发式优化算法,其灵感源于自然界中野燕麦种子独特的传播行为。野燕麦是一种一年生草本植物,隶属于禾本科和燕麦属,其种子具有吸湿性和较长的休眠期,能耐受恶劣环境。

该算法精准模拟了野麦种子的三种典型传播机制,具体如下:

三种传播机制

  • 自然扩散 :部分不实野燕麦种子从植物上脱落后,借助风、水或动物等自然因素进行传播。这种传播模式具有显著随机性,可在广泛的解空间中进行探索,为算法的全局搜索能力奠定基础。
  • 吸湿滚动 :不实野燕麦种子在吸湿运动影响下,其主芒会发生扭曲与旋转,进而驱动整个种子滚动传播。此过程可使种子在无障碍物的区域高效移动,扩大搜索范围,增强算法的局部开发能力
  • 遇阻推进 :当种子在滚动传播过程中遇到障碍物时,会储存能量,并在满足特定条件时触发推进机制,实现进一步扩散。这一特性有助于算法在复杂环境中跳脱局部最优解,提升全局优化性能

算法优势及应用

AOO算法的核心机制聚焦于 "种子分布 --- 能量积蓄 --- 滚动推进" 的耦合搜索策略,其数学建模巧妙地平衡了解空间中的探索与开发能力,确保了算法在解空间中的强探索能力与稳定收敛性能。在实际应用中,AOO算法展现出了显著优势,成功解决了诸多复杂优化问题,尤其在无线传感网络节点定位及工程设计优化等实际应用场景中具有广阔的应用前景

部分MATLAB代码:

复制代码
clc
clear
close all
% Number of search agents (population size in optimization algorithms)
SearchAgents_no = 30;  
% Dimension of the problem (number of decision variables)
dim = 20;  
% Objective function: 'cec22_func' (CEC 2022 benchmark function)
fhd = str2func('cec22_func');  
% Function number (specific benchmark function in CEC 2022 suite)
Fnum = 12;  
% Maximum number of iterations (stopping condition)
Max_iteration = 1000;  
% Lower bound of the search space (for each variable)
lb = -100;  
% Upper bound of the search space (for each variable)
ub = 100;  
%% optimization algorithm
for i = 1:12
Function_name = i;
[Best_score,Best_pos,cg_curve,search_history,ave_fit,x_1st] = AOOv4(fhd,dim,SearchAgents_no,Max_iteration,lb,ub,Function_name);
Best_score
%% plot
figure(i);
set(gcf, 'Position', [150, 350, 1500, 300]);
subplot_width = 1500 / 5;  
subplot_height = 300 / 1;   
padding = 0.05;  
effective_width = (1 - padding * 4) / 5.5;
effective_height = 0.7 ;
left_positions = 0.04 + (0:4) * (effective_width + padding);
adjustedColormap = parula;
colormap(adjustedColormap);
subplot('Position', [left_positions(1), padding*3, effective_width, effective_height]);
func_plot(Function_name);
title(strcat('F', num2str(Function_name)));
xlabel('x_1');
ylabel('x_2');
zlabel('fitness');
set(gca, 'Box', 'on', 'BoxStyle', 'full', 'LineWidth', 0.25);
view(3);
grid on;
% search history
subplot('Position', [left_positions(2), padding*3, effective_width, effective_height]);
grid off;
func_plot_2(Function_name);
hold on;
scatter(search_history(:,1), search_history(:,2), '.');
hold on;
scatter(Best_pos(:,1), Best_pos(:,2), 'r.');
title('Search history');
xlabel('x_1');
ylabel('x_2');
xlim([lb, ub]);
ylim([lb, ub]);
set(gca, 'color', 'none');
grid on;
% average fitness
subplot('Position', [left_positions(3), padding*3, effective_width, effective_height]);
semilogy(ave_fit, 'Linewidth', 1);
grid on;
title('Average fitness');
xlabel('Function calls');
ylabel('Fitness');
xlim([0, Max_iteration ]);
set(gca, 'XTickLabel', arrayfun(@(x) num2str(x), 0:6000:30000, 'UniformOutput', false), 'FontAngle', 'normal');
% Trajectory of 1st dimension
subplot('Position', [left_positions(4), padding*3, effective_width, effective_height]);
plot(x_1st(:,1), 'Linewidth', 1);
title('Trajectory of 1st dimension');
grid on;
xlabel('Function calls');
ylabel('value');
xlim([0, Max_iteration]);
set(gca, 'XTickLabel', arrayfun(@(x) num2str(x), 0:6000:30000, 'UniformOutput', false), 'FontAngle', 'normal');
% 收敛曲线图
subplot('Position', [left_positions(5), padding*3, effective_width, effective_height]);
semilogy(cg_curve, 'Linewidth', 1);
title('Convergence curve');
xlabel('Function calls');
ylabel('Best score');
axis tight;
grid on;
box on;
legend('AOO', 'fontsize', 6, 'location', 'best');
set(gca, 'color', 'none');
xlim([0, Max_iteration]);
set(gca, 'XTickLabel', arrayfun(@(x) num2str(x), 0:6000:30000, 'UniformOutput', false), 'FontAngle', 'normal');
saveas(gcf, sprintf('F%d.eps', Function_name), 'epsc'); % 保存为 EPS
saveas(gcf, sprintf('F%d.svg', Function_name), 'svg');  % 保存为 SVG
Dive_Explor_Exploit(SearchAgents_no,Max_iteration,dim,Function_name,search_history)
end

部分结果

相关推荐
Tasiorh10 小时前
数学建模预测模型汇总
数学建模
数模竞赛Paid answer1 天前
2025年深圳杯数学建模B题LED显示屏颜色转换设计与校正解题全过程文档及程序
数学建模·数据分析·深圳杯
Tasiorh1 天前
《SVM支持向量机》在数学建模中实际运用
算法·机器学习·支持向量机·数学建模·svm
算法黑哥1 天前
2026数学建模Latex快速全局精讲
数学建模
维度攻城狮3 天前
基于状态空间方程的倒立摆控制方法详解——从数学建模到Python仿真实现
python·数学建模·倒立摆·状态空间
Tasiorh3 天前
《熵权法》在数学建模中实际运用
数学建模·topsis·熵权法·美赛·评价类
NoteStream9 天前
从数学建模到电子信息:我的编程学习路线规划与成长记录
c语言·数据结构·c++·学习·数学建模
逻辑君10 天前
The Null Epoch 游戏研究报告(4)
人工智能·深度学习·游戏·机器学习·数学建模
2301_7644413311 天前
用动力学系统(微分方程)为 Kernberg 的客体关系单元提供数学化的操作定义,把“自体—客体“这对心理结构建模成一个二维耦合系统
数据结构·python·算法·数学建模
slandarer13 天前
MATLAB | 泰勒图绘制,支持各种角度范围
开发语言·数学建模·matlab·nature·顶刊·泰勒图