2023年智能优化算法---能量谷优化器 Energy valley optimizer(EVO),附MATLAB代码和文献...

2023年智能优化算法---能量谷优化器 Energy valley optimizer(EVO),附MATLAB代码和文献..._第1张图片

↖加关注这种话银家怎么好意思说的出口嘛---

简介

能量谷优化器(EVO)是一种新的元启发式算法,它的算法是受到了关于稳定性和不同粒子衰变模式的先进物理原理的启发。在文献中,作者与CEC函数中最先进的算法进行了比较,并且证明该算法确实很强劲。算法原理大家请参考文献。

e82903fdb6eb8ceadf0ed7b5eb0b40fc.png

01

结果展示

bdb6278781b9ca08faf7075112872a13.gif

2023年智能优化算法---能量谷优化器 Energy valley optimizer(EVO),附MATLAB代码和文献..._第2张图片

在CEC2005函数中结果展示:

2023年智能优化算法---能量谷优化器 Energy valley optimizer(EVO),附MATLAB代码和文献..._第3张图片

2023年智能优化算法---能量谷优化器 Energy valley optimizer(EVO),附MATLAB代码和文献..._第4张图片

2023年智能优化算法---能量谷优化器 Energy valley optimizer(EVO),附MATLAB代码和文献..._第5张图片

79b3ed463d859f83f4bc5d20e52a46bb.png

2023年智能优化算法---能量谷优化器 Energy valley optimizer(EVO),附MATLAB代码和文献..._第6张图片

e62928d5419e8b71460a85903449bc84.png

02

代码展示

a2959053df89602bcb6453c067000f12.gif

function [Best_score,Best_Pos,Conv_History]=EVO(nParticles,MaxFes,lb,ub,VarNumber,fobj)
 
%% Problem Information
CostFunction = fobj;          % @ Cost Function
VarMin = lb *ones(1,VarNumber);        % Lower bound of variable;
VarMax = ub *ones(1,VarNumber);         % Upper bound of variable;
 
%% Counters
Iter=0;   % Iterations
FEs=0;    % Function Evaluations
 
%% Initialization
Particles=[]; NELs=[];
for i=1:nParticles
    Particles(i,:)=unifrnd(VarMin,VarMax,[1 VarNumber]);
    NELs(i,1)=CostFunction(Particles(i,:));
    FEs=FEs+1;
end
 
% Sort Particles
[NELs, SortOrder]=sort(NELs);
Particles=Particles(SortOrder,:);
BS=Particles(1,:); 
BS_NEL=NELs(1);
WS_NEL=NELs(end);
 
%% Main Loop
while FEsEB   
           if SB>SL         
               AlphaIndex1=randi(VarNumber);
               AlphaIndex2=randi([1 VarNumber], AlphaIndex1 , 1);
               NewParticle(1,:)=Particles(i,:);
               NewParticle(1,AlphaIndex2)=BS(AlphaIndex2);               
               GamaIndex1=randi(VarNumber);
               GamaIndex2=randi([1 VarNumber], GamaIndex1 , 1);
               NewParticle(2,:)=Particles(i,:);
               NewParticle(2,GamaIndex2)=X_NG(GamaIndex2);           
               NewParticle = max(NewParticle,VarMin);
               NewParticle = min(NewParticle,VarMax);  
               NewNEL(1,1)=CostFunction(NewParticle(1,:));
               NewNEL(2,1)=CostFunction(NewParticle(2,:));               
               FEs=FEs+2;    
           else               
               Ir=unifrnd(0,1,1,2); Jr=unifrnd(0,1,1,VarNumber);
               NewParticle(1,:)=Particles(i,:)+(Jr.*(Ir(1)*BS-Ir(2)*X_CP)/SL);
               Ir=unifrnd(0,1,1,2); Jr=unifrnd(0,1,1,VarNumber);
               NewParticle(2,:)=Particles(i,:)+(Jr.*(Ir(1)*BS-Ir(2)*X_NG));  
               NewParticle = max(NewParticle,VarMin);
               NewParticle = min(NewParticle,VarMax);
               NewNEL(1,1)=CostFunction(NewParticle(1,:));
               NewNEL(2,1)=CostFunction(NewParticle(2,:)); 
               FEs=FEs+2;   
           end    
       else 
           NewParticle(1,:)=Particles(i,:)+randn*SL*unifrnd(VarMin,VarMax,[1 VarNumber]);         
           NewParticle = max(NewParticle,VarMin);
           NewParticle = min(NewParticle,VarMax);
           NewNEL(1,1)=CostFunction(NewParticle(1,:));   
           FEs=FEs+1;
       end
   NewParticles=[NewParticles ; NewParticle];    
   NewNELs=[NewNELs ; NewNEL];
   end
   NewParticles=[NewParticles ; Particles];    
   NewNELs=[NewNELs ; NELs]; 
   
   % Sort Particles
   [NewNELs, SortOrder]=sort(NewNELs);
   NewParticles=NewParticles(SortOrder,:);
   BS=NewParticles(1,:); 
   BS_NEL=NewNELs(1); 
   WS_NEL=NewNELs(end);
   Particles=NewParticles(1:nParticles,:);
   NELs=NewNELs(1:nParticles,:);
 
   % Store Best Cost Ever Found
   BestCosts(Iter)=BS_NEL;
   
   % Show Iteration Information
   disp(['Iteration ' num2str(Iter) ': Best Cost = ' num2str(BestCosts(Iter))]);
end
 
Eval_Number=FEs;
Conv_History=BestCosts;
Best_Pos=BS;
Best_score=BestCosts(end);
end
%% Calculate the Euclidean Distance
function o = distance(a,b)
for i=1:size(a,1)
    o(1,i)=sqrt((a(i)-b(i))^2);
end
end

03

参考文献

acbcb2c7070b286ff30075b461af4af9.gif

[1] Azizi M ,  Aickelin U ,  Khorshidi H A , et al. Energy valley optimizer: a novel metaheuristic algorithm for global and engineering optimization[J]. Scientific Reports.

04

关键词回复

8b3d973aa61016ff742d6df22148f19e.gif

d7135a84c3f7b52e3adf61305ecec6ba.gif

代码获取方式

0adfd119cfd5560332f757193c2fc431.gif

8bd0142e7552aa40e5d07e93f08ade1f.png

4c679632b2a35ac54ba863b7eaefef69.png

后台回复关键词:2023

免费获取2023年智能优化算法合集matlab代码。

76eed4f5d8ec18181da00611f895062f.png

459a2180ebc25d222d71c0fb79296b19.png

ec7814297b014563c707396b63a75dfd.gif

2d9a116480b603022b6b18f685949a54.gif

2023年智能优化算法---能量谷优化器 Energy valley optimizer(EVO),附MATLAB代码和文献..._第7张图片

Easily Search Code

你可能感兴趣的:(算法,matlab,开发语言)