一、簡介
本文提出了一種新的基于自然啟發的人本優化演算法:冠狀病毒群免疫優化演算法(CHIO),
In this paper, a new nature-inspired human-based optimization algorithm is proposed which is called coronavirus herd immunity optimizer (CHIO).
CHIO的靈感來源于群體免疫概念,作為應對冠狀病毒大流行(COVID-19)的一種方法,
The inspiration of CHIO is originated from the herd immunity concept as a way to tackle coronavirus pandemic (COVID-19).
冠狀病毒感染的傳播速度取決于感染者如何與其他社會成員直接接觸,
The speed of spreading coronavirus infection depends on how the infected individuals directly contact with other society members.
為了保護其他社會成員免受疾病的侵害,健康專家建議保持社會距離,
In order to protect other members of society from the disease, social distancing is suggested by health experts.
群體免疫是一種狀態,當大多數人免疫時,人群達到這種狀態,從而防止疾病傳播,
Herd immunity is a state the population reaches when most of the population is immune which results in the prevention of disease transmission.
這些概念是根據優化理論建模的,
These concepts are modeled in terms of optimization concepts.
CHIO模仿了群體免疫策略和社會距離概念,
CHIO mimics the herd immunity strategy as well as the social distancing concepts.
群體免疫利用了三種型別的個體病例:易感、感染和免疫,
Three types of individual cases are utilized for herd immunity: susceptible, infected, and immuned.
這是為了確定如何用社會距離策略更新其基因產生的解決方案,
This is to determine how the newly generated solution updates its genes with social distancing strategies.
CHIO使用23個著名的基準函式進行評估,
CHIO is evaluated using 23 well-known benchmark functions.
首先,研究了CHIO對其引數的敏感性,
Initially, the sensitivity of CHIO to its parameters is studied.
在此基礎上,對現有的七種方法進行了比較評價,
Thereafter, the comparative evaluation against seven state-of-the-art methods is conducted.
通過對比分析,證實了CHIO與其他成熟方法相比,能夠產生非常有競爭力的結果,
The comparative analysis verifies that CHIO is able to yield very competitive results compared to those obtained by other well-established methods.
為了進一步驗證,使用了從IEEE-CEC 2011中提取的三個實際工程優化問題,
For more validations, three real-world engineering optimization problems extracted from IEEE-CEC 2011 are used.
同樣,CHIO被證明是有效的,
Again, CHIO is proved to be efficient.
總之,CHIO是一個非常強大的優化演算法,可以用來解決跨各種優化領域的許多優化問題,
In conclusion, CHIO is a very powerful optimization algorithm that can be used to tackle many optimization problems across a wide variety of optimization domains.
二、源代碼
%=======================================================================
% Coronavirus herd immunity optimizer (CHIO)
% All rights reserved.
%=======================================================================
clear all
close all
clc
PopSize=30; %/* The number of Solutions*/
MaxAge = 100;
C0 = 1; % number of solutions have corona virus
Max_iter=100000; %/*The number of cycles for foraging {a stopping criteria}*/
SpreadingRate = 0.05; % Spreading rate parameter
runs = 1;%/*Algorithm can be run many times in order to see its robustness*/
ObjVal = zeros(1,PopSize);
Age = zeros(1,PopSize);
BestResults = zeros(runs,1); % saving the best solution at each run
for funNum=7:7 % fun#1 to fun#23
if(funNum==1)
Function_name='F1';
elseif(funNum==2)
Function_name='F2';
elseif(funNum==3)
Function_name='F3';
elseif(funNum==4)
Function_name='F4';
elseif(funNum==5)
Function_name='F5';
elseif(funNum==6)
Function_name='F6';
elseif(funNum==7)
Function_name='F7';
elseif(funNum==8)
Function_name='F8';
elseif(funNum==9)
Function_name='F9';
elseif(funNum==10)
Function_name='F10';
elseif(funNum==11)
Function_name='F11';
elseif(funNum==12)
Function_name='F12';
elseif(funNum==13)
Function_name='F13';
elseif(funNum==14)
Function_name='F14';
elseif(funNum==15)
Function_name='F15';
elseif(funNum==16)
Function_name='F16';
elseif(funNum==17)
Function_name='F17';
elseif(funNum==18)
Function_name='F18';
elseif(funNum==19)
Function_name='F19';
elseif(funNum==20)
Function_name='F20';
elseif(funNum==21)
Function_name='F21';
elseif(funNum==22)
Function_name='F22';
elseif(funNum==23)
Function_name='F23';
end
% Load details of the selected benchmark function
[lb,ub,dim,fobj]=Get_Functions_details(Function_name);
for run = 1:runs
% Initializing arrays
swarm=zeros(PopSize,dim);
% Initialize the population/solutions
swarm=initialization(PopSize,dim,ub,lb);
for i=1:PopSize,
ObjVal(i)=fobj(swarm(i,:));
end
Fitness=calculateFitness(ObjVal);
%% update the status of the swarms (normal, confirmed)
%%the minmum C0 Immune rate will take 1 status which means
%%infected by corona
Status=zeros(1,PopSize);
for i=1:C0,
Status(fix(rand*(PopSize))+1)=1;
end
%===================== loop ===================================
tic
itr=0; % Loop counter
while itr<Max_iter
for i=1:PopSize,
%evaluate new solution
ObjValSol=fobj(NewSol);
FitnessSol=calculateFitness(ObjValSol);
% Update the curent solution & Age of the current solution
if (ObjVal(i)>ObjValSol)
swarm(i,:)=NewSol;
Fitness(i)=FitnessSol;
ObjVal(i)=ObjValSol;
else
if(Status(i)==1)
Age(i) = Age(i) + 1;
end
end
% change the solution from normal to confirmed
if ((Fitness(i) < mean(Fitness))&& Status(i)==0 && CountCornoa>0)
Status(i) = 1;
Age(i)=1;
end
% change the solution from confirmed to recovered
if ((Fitness(i) >= mean(Fitness))&& Status(i)==1)
Status(i) = 2;
Age(i)=0;
end
% killed the current soluion and regenerated from scratch
if(Age(i)>=MaxAge)
NewSolConst = initialization(1,dim,ub,lb);
swarm(i,:) = NewSolConst(:);
Status(i) = 0;
end
end
if(mod(itr,100)==0)
display(['Fun#',num2str(funNum),' Run#', num2str(run), ', Itr ', num2str(itr), ' Results ', num2str(min(ObjVal))]);
end
itr=itr+1;
end
toc;
% Save the best results at each iteration
BestResults(run)=min(ObjVal);
end % run
fprintf(1, '\n\n Done \n\n');
end
三、運行結果

四、備注
完整代碼或者代寫添加QQ2449341593,
往期回顧>>>>>>
【優化求解】基于matlab粒子群優化灰狼演算法【含Matlab原始碼 006期】
【優化求解】基于matlab多目標灰狼優化演算法MOGWO 【含Matlab原始碼 007期】
【優化求解】基于matlab粒子群演算法的充電站最優布局【含Matlab原始碼 012期】
【優化求解】基于matlab遺傳演算法的多旅行商問題【含Matlab原始碼 016期】
【優化求解】基于matlab遺傳演算法求最短路徑【含Matlab原始碼 023期】
【優化求解】基于matlab遺傳和模擬退火的三維裝箱問題【含Matlab原始碼 031期】
【優化求解】基于matlab遺傳演算法求解車輛發車間隔優化問題【含Matlab原始碼 132期】
【優化求解】磷蝦群演算法【含matlab原始碼 133期】
【優化求解】差分進化演算法【含Matlab原始碼 134期】
【優化求解】基于matlab約束優化之懲罰函式法【含Matlab原始碼 163期】
【優化求解】基于matlab改進灰狼演算法求解重油熱解模型【含Matlab原始碼 164期】
【優化求解】基于matlab蟻群演算法配電網故障定位【含Matlab原始碼 165期】
【優化求解】基于matalb遺傳演算法求解島嶼物資補給優化問題【含Matlab原始碼 172期】
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/255601.html
標籤:其他
上一篇:付費專欄排行榜
下一篇:藍橋杯單片機學習之矩陣鍵盤
