💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
目录
💥1 概述
📚2 运行结果
🎉3 参考文献
🌈4 Matlab代码实现
💥1 概述
相量普氏群优化(PPSO)的灵感来自数学中的相量理论。
相量粒子群优化(PPSO)是PSO的一个新的主要样本,基于对相位角(θ)的粒子控制参数进行建模,灵感来自数学中的相量理论。该相位角 (θ) 将 PSO 算法转换为自适应、三角、平衡和非参数元启发式算法。PPSO的性能在实参数优化问题上进行了测试,包括单峰和多峰标准测试函数以及传统基准函数。
粒子群优化器是一种众所周知的基于高效总体和控制参数的算法,用于对不同问题进行全局优化。本文重点介绍了一种新的PSO主要样本,该样本名为相量粒子群优化(PPSO),其基础是受数学相量理论启发的相位角(θ)粒子控制参数建模。该相位角 (θ) 将 PSO 算法转换为自适应、三角、平衡和非参数元启发式算法。PPSO的性能在实参数优化问题上进行了测试,包括单峰和多峰标准测试函数以及传统基准函数。优化结果表明,PPSO算法在实参数全局优化中表现良好、高效,特别是对于高维优化问题,与文献中其他改进的PSO算法相比。相量模型可用于扩展不同类型的PSO和其他算法。
📚2 运行结果
部分代码:
for it=1:maxit
if it==1
gbestcost(1)=inf;
for i=1:npop
velocity(i,:)=zeros(1,nvar);
delta(i)=unifrnd(0,2*pi);
position(i,:)=xmin+(xmax-xmin)*rand(1,nvar);
cost(i)=CostFunction(position(i,:));
pbest(i,:)=position(i,:);
pbestcost(i)=cost(i);
if pbestcost(i)<gbestcost(it)
gbest=pbest(i,1:nvar);
gbestcost(it)=pbestcost(i);
end
end
else
gbestcost(it)=gbestcost(it-1);
for i=1:npop
aa=2*(sin(delta(i)));
bb=2*(cos(delta(i)));
ee=abs(cos(delta(i)))^aa;
tt=abs(sin(delta(i)))^bb;
r=2.5*rand*rand;
velocity(i,:)=(ee)*(pbest(i,:)-position(i,:)) +(tt)*(gbest-position(i,:));
velocity(i,:)=min(max(velocity(i,:),-vmax),vmax);
position(i,:)=position(i,:)+velocity(i,:);
position(i,:)=min(max(position(i,:),xmin),xmax);
cost(i)=CostFunction(position(i,:));
delta(i)=delta(i)+(abs(aa+bb)*(2*pi));
vmax=(abs(cos(delta(i)))^2)*dx;
if cost(i)<pbestcost(i)
pbest(i,:)=position(i,:);
pbestcost(i)=cost(i);
if pbestcost(i)<gbestcost(it)
gbest=pbest(i,:);
gbestcost(it)=pbestcost(i);
end
end
end
end
disp(['Iteration ' num2str(it) ': Best Cost = ' num2str(gbestcost(it))]);
end
hold on;
figure(1)
it=1:50:maxit;semilogy((it),(log(gbestcost(it))),'-og','linewidth',1.4,'Markersize',3);
xlabel('\fontsize{12}\bf Iteration');
ylabel('\fontsize{12}\bf Best value');
legend('\fontsize{10}\bf PPSO');
Cost_Rsult=gbestcost(end)
🎉3 参考文献
[1]Mojtaba Ghasemi, Ebrahim Akbari, Abolfazl Rahimnejad, Seyed Ehsan Razavi, Sahand Ghavidel, and Li Li. "Phasor particle swarm optimization: a simple and efficient variant of PSO." Soft Computing 23, no. 19 (2019): 9701-9718.
[2]Ebrahim Akbari (2022). Phasor Prticle Swarm Optimization (PPSO) .