1.问题描述:
头脑风暴优化算法是一种模拟人脑思维活动和头脑风暴会议所提出的新群智能优化算法,实验结果表明了其在单目标优化问题中的可行性和有效性。对于目前越来越受到人们关注的多目标优化问题,在原BSO算法的基础上进行分析改进,再用改进后的两种算法分别来解决多目标优化问题,并用MATLAB语言对其进行仿真实现,分析其各自的优缺点,最后总结得到的结论。
2.部分程序:
% bso test
clc
clear all
close all
%funStr = 'rastrigin'; %output worksheet name
%funName = @rastrigin; % fitness function name
%n_p = 500; % population size
%n_d = 2; % dimension
%n_c = 5; % number of clusters
%rang_l = -100; % left of dynamic range
%rang_r = 100; % right of dynamic range
%max_iteration = 50; % maximal number of iterations
warning off all
n_p = 100; % population size
n_d = 30; % dimension
n_c = 5; % number of clusters
funStr = 'sphere30D5C'; %output worksheet name
funName = @sphere; % fitness function name
rang_l = -100; % left of dynamic range sphere
rang_r = 100; % right of dynamic range
%funStr = 'rastrigin10D5C'; %output worksheet name
%funName = @rastrigin; % fitness function name
%rang_l = -5.12; % left of dynamic range rastrigin
%rang_r = 5.12; % right of dynamic range
max_iteration = 200; % maximal number of iterations
for idx = 1:50 % run times
idx
fit = bso2(funName,n_p,n_d,n_c,rang_l,rang_r,max_iteration); %run BSO one time
% if idx <27
% str = native2unicode(idx + 64);
% else % assume idx <53
% str =['A',native2unicode(idx + 38)];
% end
% xlswrite('bso2.xls',fit,funStr, [str,'1']); % output best fitness over generation to EXCEL worksheet for each BSO run
% ['run', num2str(idx)]
fit1=fit';
fits(idx,1:max_iteration)=fit1(1,1:max_iteration);
end
fits=sum(fits)/idx;
plot(fits,'-.');
3.仿真结论:
C78