1 简介
作为物理-元启发式算法中的一种,ASO 最早在 2018 年由赵卫国提出并将其应用于地下水分散系数估计。ASO 的灵感来自于基本的分子动力学,自然界中所有的物质都是由原子组成,原子具备质量和体积,在一个原子系统中,所有原子都是相互作用并且处于恒定的运动状态,其微观相互作用十分复杂。随着科学技术的发展,近些年来分子动力学发展迅速,已经可以使用计算机模拟原子和分子的物理运动规律。




2 部分代码
%--------------------------------------------------------------------------
% GSA code v1.0.
%Inputs:
% Atom_Num:Number of atoms.
% Max_Iteration: Maximum number of iterations.
%Fun_Index: The index of the test function.
%Outputs:
%X_Best: Best solution (position) found so far.
% Fit_XBest: Best result corresponding to X_Best.
% Functon_Fitness: The fitness over iterations.
%clear all;clc
tic;
Atom_Num=50;
Max_Iteration=1000;
Fun_Index=1;
Fun_name='F1';
aa=(1:20)*5;bb=0.05:0.05:1;
for i=1:length(aa)
for j=1:length(bb)
[X_Best,Fit_XBest,Functon_Fitness]=ASO(aa(i),bb(j),Fun_Index,Atom_Num,Max_Iteration);
display(['Fun_Index=', num2str(Fun_Index)]);
display(['The best solution is: ', num2str(Fit_XBest)]);
%plot(Functon_Fitness,'r','LineWidth',2);
%xlabel('Iterations');
%ylabel('Fitness');
%title(['F',num2str(Fun_Index)]);
f(i,j)=Fit_XBest;
end
end
figure
surfc(aa,bb,f,'LineStyle','none');
img =gcf; %获取当前画图的句柄
print(img, '-dpng', '-r600', './运行结果.png') %即可得到对应格式和期望dpi的图像
figure('Position',[300 300 660 290])
%Draw search space
subplot(1,2,1);
fun_plot(Fun_name);
title('Parameter space')
xlabel('x_1');
ylabel('x_2');
zlabel([Fun_name,'( x_1 , x_2 )'])
%Draw objective space
subplot(1,2,2);
plots=semilogy(Functon_Fitness,'Color','g');
set(plots,'linewidth',2)
title('Objective space')
xlabel('Iterations');
ylabel('Best score');
axis tight
grid on
box on
3 仿真结果

4 参考文献
[1]洪欣. 基于原子搜索优化算法的结构参数识别[D]. 深圳大学, 2019.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
本文介绍了赵卫国于2018年提出的原子搜索优化算法(ASO),该算法受到分子动力学的启发,用于地下水分散系数的估计。ASO通过模拟原子系统的动态行为来寻找最优解。代码示例展示了ASO在不同参数下的运行过程,并给出了仿真结果。此外,文章还提及了ASO在结构参数识别中的应用。
316

被折叠的 条评论
为什么被折叠?



