% 种群多样性分析,30个cec算法,独立运行50次,两个算法对比。仿真图保存为svg格式,30张图
variables_no = 30; % 可选 2, 10, 30, 50, 100
pop_size=30; %种群数
max_iter=500; %最大迭代次数
run = 50;
for number=1:30
[lower_bound,upper_bound,variables_no,fobj]=Get_Functions_cec2017(number,variables_no); % [lb,ub,D,y]:下界、上界、维度、目标函数表达式
dbo = []; ssa = [];
for r = 1:run
%% DBO
[DBO_Best_score,~,DBO_curve,DBO_dis]=DBO(pop_size,max_iter,lower_bound,upper_bound,variables_no,fobj);
dbo(r,:) = DBO_dis;
display(['The best optimal value of the objective funciton found by DBO for ' [num2str(number)],' is : ', num2str(DBO_Best_score)]);
%% SSA
[S
% 种群多样性分析,30个cec算法,独立运行50次,两个算法对比。仿真图保存为svg格式,30张图
于 2024-03-06 00:31:20 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)