本文主要是介绍2023年最新智能优化算法之——切诺贝利灾难优化器Chernobyl Disaster Optimizer (CDO),附MATLAB代码和文献,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
切诺贝利灾难优化器Chernobyl Disaster Optimizer (CDO)是H. Shehadeh于2023年提出的新型智能优化算法,参考文献如下:
H. Shehadeh.Chernobyl Disaster Optimizer (CDO): A Novel Metaheuristic Method for Global Optimization, Neural Computing and Applications. DOI: https://dx.doi.org/10.1007/s00521-023-08261-1
该方法是受到切尔诺贝利核反应堆堆芯爆炸而来的启发。在CDO方法中,放射性的发生是由于核的不稳定性,核爆炸会发出不同类型的辐射。这些辐射中最常见的种类被称为伽马、贝塔和阿尔法粒子。算法主要围绕三种粒子的更新方式展开。
经作者查阅文献发现,该方法其实与灰狼算法有很大的相似性,大家可以作为参考。接下来线上结果:
从几个单峰函数中测试可以看到,效果还是可以的。
这里直接上CDO算法最关键的核心代码:
% CDO函数,该算法与灰狼算法很像
function [Alpha_score,Alpha_pos,Convergence_curve]=CDO(SearchAgents_no,Max_iter,lb,ub,dim,fobj)% initialize alpha, beta, and gamma particle positions (search radiations (Agents))
Alpha_pos=zeros(1,dim);
Alpha_score=inf; %change this to -inf for maximization problemsBeta_pos=zeros(1,dim);
Beta_score=inf; %change this to -inf for maximization problemsGamma_pos=zeros(1,dim);
Gamma_score=inf; %change this to -inf for maximization problems%Initialize the positions of search radiations (Agents)
Positions=initialization(SearchAgents_no,dim,ub,lb);Convergence_curve=zeros(1,Max_iter);l=0;% Loop counter% Main loop
while l<Max_iterfor i=1:size(Positions,1) % Return back the search radiations (Agents) that go beyond the boundaries of the search spaceFlag4ub=Positions(i,:)>ub;Flag4lb=Positions(i,:)<lb;Positions(i,:)=(Positions(i,:).*(~(Flag4ub+Flag4lb)))+ub.*Flag4ub+lb.*Flag4lb; % Calculate objective function for each search radiations (Agents)fitness=fobj(Positions(i,:));% Update Alpha, Beta, and Gamma - search radiations (Agents)if fitness<Alpha_score Alpha_score=fitness; % Update alphaAlpha_pos=Positions(i,:);endif fitness>Alpha_score && fitness<Beta_score Beta_score=fitness; % Update betaBeta_pos=Positions(i,:);endif fitness>Alpha_score && fitness>Beta_score && fitness<Gamma_score Gamma_score=fitness; % Update gammaGamma_pos=Positions(i,:);endenda=3-l*((3)/Max_iter); % a decreases linearly from 3 to 0 Equation(9)a1 = ((log10((16000-1)*rand(1,1)+16000)));a2 = ((log10((270000-1)*rand(1,1)+270000)));a3 = ((log10((300000-1)*rand(1,1)+300000))); % Update the Position of search radiations (Agents)for i=1:size(Positions,1)for j=1:size(Positions,2) %------------------- alpha------------------------------ r1=rand(); % r1 is a random number in [0,1]r2=rand(); % r2 is a random number in [0,1]pa=pi*r1*r1/(0.25*a1)- a*rand() ; % Equation (23)C1=r2*r2*pi; D_alpha=abs(C1*Alpha_pos(j)-Positions(i,j)); va=0.25*(Alpha_pos(j)-pa*D_alpha); % Equation (22)%------------------- Beta------------------------------ r1=rand();r2=rand();pb=pi*r1*r1/(0.5*a2)- a*rand() ; % Equation (17)C2=r2*r2*pi; D_beta=abs(C2*Beta_pos(j)-Positions(i,j)); vb=0.5*(Beta_pos(j)-pb*D_beta); % Equation (16) %------------------- Gamma ------------------------------ r1=rand();r2=rand(); py=(pi*r1*r1)/a3- a*rand() ; % Equation (11)C3=r2*r2*pi; D_gamma=abs(C3*Gamma_pos(j)-Positions(i,j));vy=Gamma_pos(j)-py*D_gamma; % Equation (10) Positions(i,j)=(va+vb+vy)/3;% Equation (28)endendl=l+1; Convergence_curve(l)=Alpha_score;
end
下方小卡片回复关键词:2023,免费获取2023年智能优化算法合集matlab代码。
后续会继续发布2023年其他最新优化算法,敬请关注。
这篇关于2023年最新智能优化算法之——切诺贝利灾难优化器Chernobyl Disaster Optimizer (CDO),附MATLAB代码和文献的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!