资源简介
Comprehensive Learning Particle Swarm Optimizer for Global Optimization of Multimodal Functions文章的MATLAB 代码
代码片段和文件信息
%**************************************************************************************************
%Reference: J. J. Liang A. K. Qin P. N. Suganthan and S. Baskar “Comprehensive
% learning particle swarm optimizer for global optimization of multimodal
% functions“ IEEE Trans. Evolut. Comput. vol. 10 no. 3 pp. 281–295 2006.
%
% Note: We obtained the MATLAB source code from the authors and did some
% minor revisions in order to solve the 25 benchmark test functions
% however the main body was not changed.
%**************************************************************************************************
clc;
clear all
tic
‘CLPSO‘
format long;
format compact;
% Choose the problems to be tested. Please note that for test functions F7
% and F25 the global optima are out of the initialization range. For these
% two test functions we do not need to judge whether the variable violates
% the boundaries during the evolution after the initialization.
problemSet = 1:15;
array_all_func = [];
outcome_all = [];
for k = 14
% Main body which was provided by the authors
F_index = problemSet(k)
[xminxmaxn] = f_range(F_index);
maxFES = n*10000;
me = maxFES/40;
ps = 40;
%maxFES = n*10000;
array_all=[];
outcome = [];
% The total number of runs
totalTime = 25;
for time = 1 : totalTime
rand(‘state‘ sum(100 * clock));
t = 0 : 1 / (ps - 1) : 1;
t = 5 .* t;
Pc = 0.0 + (0.5 - 0.0) .* (exp(t) - exp(t(1))) ./ (exp(t(ps)) - exp(t(1)));
m = 0 .* ones(ps 1);
iwt = 0.9 - (1 : me) * (0.7 / me);
cc = [1.49445 1.49445]; %acceleration constants
lu = [ones(1n)*xmin;ones(1n)*xmax];
mv = 0.2 * (lu(2 :) - lu(1 :));
VRmin = repmat(lu(1 :) ps 1);
VRmax = repmat(lu(2 :) ps 1);
Vmin = repmat(-mv ps 1);
Vmax = -Vmin;
pos = VRmin + (VRmax - VRmin) .* rand(ps n);
for i = 1:ps
e(i:) = f(pos(i:)F_indexn);
end;
%e = benchmark_func(pos problem o A M a alpha b);
fitcount = ps;
vel = Vmin + 2 .* Vmax .* rand(ps n); %initialize the velocity of the particles
pbest = pos;
pbestval = e; %initialize the pbest and the pbest‘s fitness value
array = [min(pbestval)];
[gbestval gbestid] = min(pbestval);
gbest = pbest(gbestid :); %initialize the gbest and the gbest‘s fitness value
gbestrep = repmat(gbest ps 1);
stay_num = zeros(ps 1);
ai = zeros(ps n);
f_pbest = 1 : ps;
f_pbest = repmat(f_pbest‘ 1 n);
for k = 1 : ps
ar = randperm(n);
ai(k ar(1 : m(k))) = 1;
fi1 = ceil(ps * rand(1 n));
fi2 = ceil(ps *
相关资源
- 多目标粒子群优化算法MATLAB
- matlab 实现粒子群优化算法代码
- 思典-粒子群优化Matlab工具箱
- 粒子群优化算法解决背包问题
- 标准粒子群优化算法-用Griewank函数测
- Matlab写的粒子群优化算法,很好用!
- 智能微电网粒子群优化算法.7z
- 粒子群优化算法源码matlab
- 基于粒子群优化的极限学习机
- 光伏发电中粒子群优化的最大功率点
- MOPSO多目标粒子群优化算法MATLAB实现可
- 粒子群优化的极限学习机matlab源代码
- 极限学习机和粒子群优化算法优化W
- 极限学习机和粒子群优化算法优化小
- 粒子群优化BPNN车位预测
- 基于MATLAB的PSO算法.pdf
- 粒子群优化算法演示及matlab源程序
- 粒子群优化算法,matlab实现程序,有
- 碳排放交易粒子群优化算法
- 基于粒子群优化算法的模糊c聚类源码
- 粒子群优化算法Matlab源程序
- 粒子群优化算法的完整函数测试
- 粒子群优化的支持向量机matlab源代码
- 二进制粒子群优化算法源码
- matlab粒子群优化算法 非线性函数极值
- 免疫粒子群优化算法整定自抗扰控制
- 细菌觅食算法与粒子群优化算法相结
- PSO SVM SVM用于分类时的参数优化
- 智能微网粒子群优化算法.zip
- PSO SampEn ApproxiEN RVM PSO:粒子群优化算
评论
共有 条评论