资源简介
CLPSO 算法的matlab代码,基于文章而来,非得凑五十个字吗

代码片段和文件信息
%modified by Tang 2007-05-14 at Tongji University
function [gbest_tgbestval_tfitcount]= CLPSO(fhdMax_GenMax_FESParticle_NumberDimensionVRminVRmax)
%[gbestgbestvalfitcount]= CLPSO_new_func(‘f8‘35002000003030-5.125.12)
rand(‘state‘sum(100*clock));
%=============================================================
me=Max_Gen;
ps=Particle_Number;%population size
D=Dimension;
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))); %Learning proportion Pc which determines how many dimensions are chosen to learn from other particles‘ pbests.
Pc=0.05+0.45.*(exp(t)-exp(t(1)))./(exp(t(ps))-exp(t(1)));
% Pc=0.5.*ones(1ps);
dm=3*ones(ps1); %m dimensions are randomly chosen to learn from the gbest. Some of the remaining D-m dimensions are randomly chosen to learn from some randomly chosen particles‘ pbests and the remaining dimensions learn from its pbest
iwt=0.9-(1:me)*(0.7/me);%inertia weight
% iwt=0.729-(1:me)*(0.0/me);
cc=[1.49445 1.49445]; %acceleration constants
if length(VRmin)==1
VRmin=repmat(VRmin1D);
VRmax=repmat(VRmax1D);
end
mv=0.2*(VRmax-VRmin);%max velocity
VRmin=repmat(VRminps1);
VRmax=repmat(VRmaxps1);
Vmin=repmat(-mvps1);
Vmax=-Vmin;
pos=VRmin+(VRmax-VRmin).*rand(psD); %initialize the position value
for i=1:ps;
e(i1)=feval(fhdpos(i:)); %initialize the fitness value
end
fitcount=ps;
vel=Vmin+2.*Vmax.*rand(psD); %initialize the velocity of the particles
pbest=pos; %initialize the pbest (psXD)
pbestval=e; %initialize the pbest‘s fitness value
[gbestvalgbestid]=min(pbestval); %initialize the gbest‘s fitness value
gbestval_t(1)=gbestval; %initialize the pbest‘s fitness value
gbest=pbest(gbestid:); %initialize the gbest value (1XD)
gbestrep=repmat(gbestps1);
gbest_t(1:)=gbest; %
stay_num=zeros(ps1);
ai=zeros(psD);
f_pbest=1:ps;f_pbest=repmat(f_pbest‘1D);
for k=1:ps
ar=randperm(D);%??????????
ai(kar(1:dm(k)))=1;
fi1=ceil(ps*rand(1D));
fi2=ceil(ps*rand(1D));
fi=(pbestval(fi1)=pbestval(fi2))‘.*fi2;
bi=ceil(rand(1D)-1+Pc(k));
if bi==zeros(1D)
rc=randperm(D);
bi(rc(1))=1;
end
f_pbest(k:)=bi.*fi+(1-bi).*f_pbest(k:);
end
stop_num=0;
i=1;
while i i=i+1;
for k=1:ps;
if stay_num(k)>=5 %????????????
% if round(i/10)==i/10%|stay_num(k)>=5
stay_num(k)=0;
ai(k:)=zeros(1D);
f_pbest(k:)=k.*ones(1D);
ar=randperm(D);
ai(kar(1:dm(k)))=1;
fi1=ceil(ps*rand(1D));
fi2=ceil(ps*rand(1D));
fi=(pbestval(fi1)=pbestval(fi2))‘.*fi2;
bi=ceil(rand(1D)-1+Pc(k));
if bi==zeros(1D)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5242 2009-05-23 18:52 CLPSO\CLPSO.m
文件 1090 2010-11-30 18:30 CLPSO\FitnessFunc.m
文件 2530 2010-12-06 10:33 CLPSO\main.m
目录 0 2011-03-15 19:07 CLPSO
----------- --------- ---------- ----- ----
8862 4
- 上一篇:Mayr电弧模型
- 下一篇:最大似然估计的MATLAB代码
相关资源
- 粒子群算法优化pid源码 matlab仿真.ra
- pso解决单目标优化问题
- 基本粒子群算法,MATLAB文件的M文件编
- matlab粒子群算法PSO实现函数极值优化
- PSO负载均衡算法-matlab实现
- l粒子群算法工具箱psot
- PSO_LSSVM程序代码及LSSVM工具箱
- libsvm-3.1-[FarutoUltimate3.1
- PSO优化模糊控制器进行电动汽车能量
- 多目标粒子群社团检测算法MODPSO
- PSO优化SVM参数matlab
- 蜂群SVMABC-SVM遗传算法SVMGA-SVM粒子群
- 遗传粒子群优化算法-GAPSO.rar
- pso优化bp神经网络代码
- MATLAB 多目标粒子群算法源代码
- 粒子群算法应用在路径规划matlab
- MOPSO+
- 粒子群算法matlab含注释
- pso-bp代码
- 基于权重改进的PSO
- PSO优化PID参数
- pso工具箱 matlab
- 智能优化算法及其MATLAB第2版-书中的
- MOPSO多目标优化程序MATLAB代码.zip
- 基于粒子群算法的优化模型matlab程序
- psot工具箱及使用说明.zip
- matlab 2D椭圆和3D椭球拟合
- 灰狼算法GWO和粒子群算法PSO的matlab源
- PSO_GD.m粒子群求解多目标优化
- 粒子群优化CLPSO的MATLAB源代码
评论
共有 条评论