当前位置: 首页 > news >正文

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

部分结果

相关文章:

  • HTTP协议版本的发展(HTTP/0.9、1.0、1.1、2、3)
  • 黑马点评-分布式锁Lua脚本
  • 进阶-自定义类型(结构体、位段、枚举、联合)
  • Lua基础语法
  • 在Windows平台基于VSCode准备GO的编译环境
  • Mustache 模板引擎详解_轻量、跨语言、逻辑无关的设计哲学
  • 一文讲透golang channel 的特点、原理及使用场景
  • 正则表达式:字符串模式匹配的利器
  • 历年华南理工大学保研上机真题
  • 什么是前端工程化?它有什么意义
  • 并发编程(6)
  • linux学习第15天(dup和dup2)
  • GO 语言进阶之 进程 OS与 编码,数据格式转换
  • Docker(零):本文为 “Docker系列” 有关博文的简介和目录
  • 二叉树--oj1
  • 计算机基础核心课程
  • 详解Mysql redo log与binlog的两阶段提交(2PC)
  • 2025年AI代理演进全景:从技术成熟度曲线到产业重构
  • 加密货币投资亏损后,能否以“欺诈”或“不当销售”索赔?
  • 【JAVA】线程创建方式:继承Thread vs 实现Runnable(32)
  • 济南专业做网站/一键关键词优化
  • 浅谈幼儿园网站的建设与管理制度/创意设计
  • 网站分类目录大全/今天新闻头条新闻
  • wordpress主题改字体颜色/郑州官网网站推广优化公司
  • 医疗网站建设怎么样/图片外链
  • 上海网站建设网页制作怎么样/如何获取热搜关键词