EDA365电子论坛网

标题: 冠状病毒群体免疫优化算法(CHIO) [打印本页]

作者: uperrua    时间: 2021-3-1 09:55
标题: 冠状病毒群体免疫优化算法(CHIO)
本帖最后由 uperrua 于 2021-3-1 09:56 编辑 6 H2 D. v8 l( J7 Q

7 A, A* @4 k" {% g, A' t一、简介4 Q: i0 y2 M/ g, \/ d
本文提出了一种新的基于自然启发的人本优化算法:冠状病毒群免疫优化算法(CHIO)。
8 K  t/ P( p- L  d" C
* q  f( U8 c* n& j6 vIn this paper, a new nature-inspired human-based optimization algorithm is proposed which is called coronavirus herd immunity optimizer (CHIO).5 H  B, j+ _" J% v8 a! K# `

8 T! m# V2 W2 Q8 @6 i7 W- B' n' Q* BCHIO的灵感来源于群体免疫概念,作为应对冠状病毒大流行(COVID-19)的一种方法。8 ?" }& ]: x  ]# W( C
; Z3 n- |& }) n* E
The inspiration of CHIO is originated from the herd immunity concept as a way to tackle coronavirus pandemic (COVID-19).5 w3 p% [# W. Q% f

( [: S0 a! o. L( r0 z  I' D冠状病毒感染的传播速度取决于感染者如何与其他社会成员直接接触。
+ j! _6 C  m; M
2 Y( W4 t' z0 {. o+ S) h  }  O; IThe speed of spreading coronavirus infection depends on how the infected individuals directly contact with other society members.- F5 K3 m1 r" ~" R4 p  B

9 d/ w; @) @$ }: O为了保护其他社会成员免受疾病的侵害,健康专家建议保持社会距离。
/ |( r  a2 c# f, d6 ~' _
6 H  O/ e  A  V2 {% s% w. gIn order to protect other members of society from the disease, social distancing is suggested by health experts.
8 z! H# D% [9 f* g- x3 y" ^* g. v
) f! f) |" n# Q5 K4 z群体免疫是一种状态,当大多数人免疫时,人群达到这种状态,从而防止疾病传播。
/ F2 b# |! x9 K1 r* h+ E
) j. j" i; N! V, JHerd immunity is a state the population reaches when most of the population is immune which results in the prevention of disease transmission.
" u# N' B% a( U
5 o- ^! f- ~( r这些概念是根据优化理论建模的。+ K( O' R8 @0 ^" W7 H- ]( X+ y5 O

0 |" F$ R" _, P& Z  S9 K) [2 oThese concepts are modeled in terms of optimization concepts.: F6 V5 W+ r% ~6 T6 |2 C9 w

, \1 ?' ^  E9 k3 S' ?1 SCHIO模仿了群体免疫策略和社会距离概念。
# h& ]! a) {0 U& m$ Q3 Z2 S
6 [2 _; d3 O: X/ p5 P) _CHIO mimics the herd immunity strategy as well as the social distancing concepts.
+ G: s- {2 D4 c% v1 h7 W
4 W3 [& J, V2 |; L% ~) O群体免疫利用了三种类型的个体病例:易感、感染和免疫。( Q3 R, G& u. q& ?- B
. z' D/ e6 ~: H+ b& z+ V3 ]" S( O4 u  V& B
Three types of individual cases are utilized for herd immunity: susceptible, infected, and immuned.
0 z; h0 Z  @; x
+ T  L! n0 d, ^8 k+ Y6 ]这是为了确定如何用社会距离策略更新其基因产生的解决方案。  j6 @* C% x* {# C; p$ Q

. F; U! J2 }8 k+ aThis is to determine how the newly generated solution updates its genes with social distancing strategies.
+ Z6 V7 E/ h* A1 A+ L2 P5 w8 |" w; r  o3 b5 H' O3 G3 @2 y4 b
CHIO使用23个著名的基准函数进行评估。
( A9 Z( j+ z  ~# o3 Q2 I( t
/ ?% x( F! y7 G2 `! L: b; }CHIO is evaluated using 23 well-known benchmark functions.
) L* p( g9 x2 b8 V  h' h0 Z0 T  {6 a; k) z( V" h
首先,研究了CHIO对其参数的敏感性。
& Y/ W4 A2 t3 W9 x! @# M" V1 ?* r: j) N; _+ V5 x8 M7 M& n1 f9 E
Initially, the sensitivity of CHIO to its parameters is studied.
7 u* @  s6 ?8 o! \6 D2 {0 T- J+ `/ q  d; v% b  Q1 `6 I4 X
在此基础上,对现有的七种方法进行了比较评价。
& P9 `1 m  O" [9 R
' y. E: r& W: J; H0 o" KThereafter, the comparative evaluation against seven state-of-the-art methods is conducted.
# `: y, s) P3 z6 T: {
& ?# y  m8 |4 P, T通过对比分析,证实了CHIO与其他成熟方法相比,能够产生非常有竞争力的结果。% ~; o: o8 W0 v$ ?! W
- R" N* j! e/ F& J% ^" a; b
The comparative analysis verifies that CHIO is able to yield very competitive results compared to those obtained by other well-established methods.! m, d) H5 r+ S$ c* J% T

% V9 i5 i7 F; _为了进一步验证,使用了从IEEE-CEC 2011中提取的三个实际工程优化问题。
# @6 R, U8 ?+ p# c' ]9 O: x' m# }( n  ?  q
For more validations, three real-world engineering optimization problems extracted from IEEE-CEC 2011 are used.% F! w! b* l0 V- q3 ?+ F; b

8 t" J  }5 W3 A; \7 y9 Q  l# D同样,CHIO被证明是有效的。
- O1 e9 ~* P/ S+ z+ R  J, h& Y' _% x- r, a8 L- i7 [7 I
Again, CHIO is proved to be efficient.
4 r) z; ^+ t. v) w" q2 z
7 A" [! S8 ]5 f9 q0 @4 z0 Q- F总之,CHIO是一个非常强大的优化算法,可以用来解决跨各种优化领域的许多优化问题。2 V" F  ^8 m3 T, E3 ]& I; [' X

1 T7 L1 ]; k, e, N" V9 ?) cIn conclusion, CHIO is a very powerful optimization algorithm that can be used to tackle many optimization problems across a wide variety of optimization domains.) Y9 o4 N- u1 m& I% E7 ?- d9 \
& f5 ~" u# L& Q/ W. Q2 |( I
二、源代码
9 }8 [; _6 U  k$ @: n! }# n# p6 ]' s%=======================================================================4 O% i3 g, i) X7 X+ O: ]8 D
%            Coronavirus herd immunity optimizer (CHIO)
2 k1 P$ a! @+ u# I) k: |  _  b
  S$ [! u: b1 W8 n6 f- y) L% All rights reserved.      
0 U. r( Y% k( |  Z8 j%=======================================================================
! X8 g7 D4 G" y6 A5 d4 G; I
7 V  _- |2 R. {# v0 ^' q' t
, i# }/ ]7 g  S/ q2 Uclear all! T) }$ q0 `& O& d  `' t
close all
0 G5 J+ S% Q# cclc- a' }: r( G& O; G" i8 p. x0 N5 n

6 d2 \! q! b( `5 A/ ~+ r5 M7 P3 aPopSize=30; %/* The number of Solutions*/7 c( |+ l' C6 ^* x, t

, C3 B7 F1 l) B' r: H6 l/ BMaxAge = 100;8 I2 M6 c! W0 \( B# z& H
: _5 p, Y. J! e+ x# o9 ?' O, B
C0 = 1; % number of solutions have corona virus
+ J& B2 g, ~; o 7 s3 ?# H* r. @6 ^% L) w
Max_iter=100000; %/*The number of cycles for foraging {a stopping criteria}*/
. g& r: x# b8 J
# Z  Q9 a; ?+ M$ hSpreadingRate = 0.05;   % Spreading rate parameter
/ G+ h/ w# x* f
# s' I4 g( s+ G! M+ Y7 s8 y% qruns = 1;%/*Algorithm can be run many times in order to see its robustness*/
! G7 ~( @, M2 D" m; {& [# _2 O
, D3 x; \& S1 g0 R  U7 o  D) f8 VObjVal = zeros(1,PopSize);
2 h: t% B7 Z" {9 ?  J" E- c4 T, W , e, n# F( u4 S. z9 a$ _
Age = zeros(1,PopSize);0 G# W; e# y) ]: ^4 L' j( Q& v
/ W& l" U) h& H4 i( u& z
BestResults = zeros(runs,1); % saving the best solution at each run
8 J& ~6 B! Z1 b
1 w+ ?( x: ?5 q, O$ u* H6 qfor funNum=7:7  % fun#1 to fun#23
! u) A3 a" \+ I% f5 x' m    if(funNum==1)# m# t/ [& K1 D" ?: h
        Function_name='F1';
8 O9 k8 i' Z- C9 t    elseif(funNum==2)
8 C! m2 |: D3 U  a3 g        Function_name='F2';0 Q- S6 D( R1 x: t2 d
    elseif(funNum==3)
6 j" Q& c) D8 [7 l2 e4 W, T        Function_name='F3';' \6 d3 O) M: \1 p# y$ M0 O3 @$ e
    elseif(funNum==4); C' {# ]( a( F5 v% t
        Function_name='F4';9 ~" m: [  _  E/ `# ?7 D: @
    elseif(funNum==5)$ @2 D9 j) r1 }1 w* j; w
        Function_name='F5';$ T  [1 ^0 d9 \4 A: T6 P" R
    elseif(funNum==6)" c) h5 x. |: n* U
        Function_name='F6';4 C  E' a/ y. k) h0 z; i0 J: U7 l
    elseif(funNum==7)
- D0 q' t3 b8 q: A* S7 M5 }        Function_name='F7';6 |$ `. @& r2 I+ Q3 p) O
    elseif(funNum==8)9 J5 Q& z' D0 V0 H3 C. d# K# ^
        Function_name='F8';
  v" g1 v8 G$ Y. O& I& W6 L    elseif(funNum==9)% V# L: j( m" x  H" [
        Function_name='F9';$ m6 h! W8 }0 e  X% W" y! p
    elseif(funNum==10)
! d7 {4 i. L9 Q* a# }' N        Function_name='F10';
! J# Y3 z( h( y! ^- t  V    elseif(funNum==11)& z/ C4 ^' `: f0 B$ L
        Function_name='F11';" S6 X0 k. |" ?$ C5 l; K7 x
    elseif(funNum==12)
2 ~8 K* H8 b# F+ k        Function_name='F12';
' b; @! g) Y$ `0 u) b    elseif(funNum==13)' i8 s+ P( ~# D* N1 i$ W
        Function_name='F13';
& Q1 r/ o& M- k, G! A* O" H3 y    elseif(funNum==14)/ `  |  S5 l# E5 ]- O5 Q
        Function_name='F14';) o' I$ g" S: ?3 Q, o$ m. {2 c
    elseif(funNum==15)
3 J9 p1 ~1 H. B( w- z' a2 g        Function_name='F15';0 t+ X% |1 M1 ^9 e
    elseif(funNum==16); D4 w6 |1 Z% x( M5 T# V
        Function_name='F16';
; R/ Y. p0 i9 d; w% G& W: G    elseif(funNum==17)
8 B4 B+ I5 k! m+ L4 U1 _6 e        Function_name='F17';
3 t) i, _0 _) _' h8 B    elseif(funNum==18)
* C% P& [' G: h  l9 V1 U1 P. v        Function_name='F18';
8 L6 H5 M% v: Z' {( p* M& f    elseif(funNum==19)' z6 }  Q, V2 h9 p( Y5 @
        Function_name='F19';
/ N) d! a5 X- ?5 Q8 g    elseif(funNum==20)
9 w/ E0 V) l* a. i+ }& i        Function_name='F20';
- `% `6 L% ]7 j* o' H, [9 h    elseif(funNum==21)5 l% S7 D# U4 Y, q) d
        Function_name='F21';
' w+ w- i( L! f2 e    elseif(funNum==22)
( Z6 E/ D) W( l* S# e5 i3 M        Function_name='F22';" T! F3 y* o) z8 w7 L! C; A- I
    elseif(funNum==23)( }, h/ j5 w8 S3 G: b5 I
        Function_name='F23';5 j0 ^" e1 V- q2 m6 n( s4 s7 G
    end
. v, B8 ]& j0 D / K" O7 Y  ?( T9 a3 @" b. Q
    % Load details of the selected benchmark function
1 E1 {% B5 u" g% y. ?    [lb,ub,dim,fobj]=Get_Functions_details(Function_name);
% k/ g4 K' ^% r; e
1 J+ n  Y+ E! C# x# D0 O    for run = 1: runs
) [& G9 r0 ~" k/ H: P) p3 \- d' V        % Initializing arrays# w3 B% u, J& j6 Q% @* p
        swarm=zeros(PopSize,dim);& p; T1 \( ]& _; w2 [( N1 Y7 M, i
        
2 ^& i/ \( s5 z: ?: [+ @, x* ]        % Initialize the population/solutions
! t6 I% E" e0 i" |- [+ d        swarm=initialization(PopSize,dim,ub,lb);0 L" C3 d: O( I8 L' p# B0 F$ J

; r' A8 T/ t- i4 i: V$ W& b        for i=1: PopSize,8 K+ K% n: y$ j8 @) P9 F
          ObjVal(i)=fobj(swarm(i,: ));
2 x7 N( G! `. q: F2 Z( {) j        end
8 ^( {9 p6 Q- e4 f9 _5 [$ z2 r        
5 w7 ^: @, i% D        Fitness=calculateFitness(ObjVal);
2 o9 `7 _! v& W5 X        
! d1 @* _% K5 x( `/ v" o        $ {7 O) x, H0 j! q- I
        %% update the status of the swarms (normal, confirmed)
2 `. x# |" `1 ]  D4 M) C        %%the minmum C0 Immune rate will take 1 status which means
! F& Q1 p$ A. o6 T) E4 }        %%infected by corona 3 ~. o: Z; ]* e1 ^" n) S! l# x
; ~8 v+ W/ y; S. X
        Status=zeros(1,PopSize);
' V! Y* N# f; P/ e5 Z5 z- r        6 X0 }: b3 E/ Y
        for i=1: C0,
; _& C# }/ Q$ h) B- u            Status(fix(rand*(PopSize))+1)=1;  % l0 r! E' H) Z: m% {/ F
        end
/ L; t: ^) v* B9 W4 b' n6 n; n& J        
- G3 ?* M6 q9 ?2 n7 m      %===================== loop ===================================
- R/ S9 ~/ `0 z8 G0 f      tic+ w( h0 N2 G' i2 s9 G* E# ]
      
, a5 S; ~* n2 ^' a* C- P      itr=0;   % Loop counter
7 S+ b8 T; X# U! A- L2 u( j6 S
, F) H* H/ v8 q: T) x6 D7 h      while itr<Max_iter& l8 m0 U8 t. k$ G. t2 B
          3 @% x1 _! u  r. @; {: p9 T' d
          for i=1: PopSize,( q9 O7 p* P! W8 E  y( f
           
3 N# c$ p/ \' i% A' x              %evaluate new solution: Q! [9 s% h/ h( F8 H( H5 A! A
              ObjValSol=fobj(NewSol);% j5 y) N8 `7 f# U5 d$ _
              FitnessSol=calculateFitness(ObjValSol);
" b4 {$ S$ {" V1 V              : X; K9 ~1 n! g+ D$ p
              % Update the curent solution  & Age of the current solution: h3 `! }8 X) H2 Q) q
              if (ObjVal(i)>ObjValSol)
0 \# X1 k; m  o" z5 ]+ c# z                swarm(i,: )=NewSol;
: Y3 j% a9 o* }2 v/ ]1 b                Fitness(i)=FitnessSol;  Y# |) C2 u+ V/ X+ Z" n2 ^2 g
                ObjVal(i)=ObjValSol;
1 H' e: K& a' ?' s  q              else
" h* ~0 O1 j9 l% Q. E5 f1 k                  if(Status(i)==1)/ B. z: ?3 J! l4 O3 V
                      Age(i) = Age(i) + 1;
* T1 C9 D) P8 d9 o                  end
4 j* o3 ]8 _8 \3 s              end            
+ m) N* d" l' y. B9 @                           / j' T5 X# [' v7 J3 u& @, `5 F
              % change the solution from normal to confirmed5 h: Z, I1 ?9 f
              if ((Fitness(i) < mean(Fitness))&& Status(i)==0 && CountCornoa>0); P) A2 Y. k, H( P5 K+ o% Q0 a& l
                  Status(i) = 1;
( @' A, U) `2 Q# j1 T5 X; N                  Age(i)=1;
! D7 U7 C" W( z$ ?% Z              end  B- K# `- T! V# }. `
              
* p6 B: P1 t( P8 q0 {4 @              % change the solution from confirmed to recovered. ~! w0 O/ b0 ]* U( W8 G
              if ((Fitness(i) >= mean(Fitness))&& Status(i)==1). S5 u0 ^6 x+ D! m8 @, P+ u& L) U
                  Status(i) = 2;
8 I  K9 ~1 g- F- Q, m3 z                  Age(i)=0;% z& h( k1 J" k6 ?7 C2 D
              end5 n& W! o. {3 S; {7 h2 b
              
2 g) ~" X. t8 Z8 J" b              % killed the current soluion and regenerated from scratch# ^' e5 n, R2 u8 u1 `
              if(Age(i)>=MaxAge)
5 L, J1 O0 p/ }: ?5 H/ U                  NewSolConst = initialization(1,dim,ub,lb);
$ {+ v  g5 M6 H9 B3 ~6 |  u                  swarm(i,: ) = NewSolConst(: );
; J( h$ c0 W' U( D$ d                  Status(i) = 0;
6 V, |3 m7 Z3 g. ~& V4 p" G/ }0 {              end
5 K& \* U* u# y) k2 M: h          end1 c& ~$ K2 u( H/ I' i1 q/ K- ~
                # N! y1 n! K# G7 i% c; E
          if(mod(itr,100)==0)
7 F+ w) x7 L# q- V9 T             display(['Fun#',num2str(funNum),' Run#', num2str(run), ', Itr ', num2str(itr), ' Results ', num2str(min(ObjVal))]);1 C% H" n* u" o. a& w& ?& z  ^
          end, Z. m2 D4 ~! m3 N. O6 B7 f) ~

& p2 B' q% @; d9 d# u0 [, ]. l          itr=itr+1;   
2 \" L  d; a; t3 F1 f5 o      end: n+ k9 N2 R2 B5 \
      
9 o! d8 b2 i* k5 K3 M9 `      toc;
( K3 ~! ^! l7 p' ~1 h$ ~: `% |# `    3 G; r' \" |, a) l$ D# p: ^
      % Save the best results at each iteration6 D# q7 S6 X7 j5 R
      BestResults(run)=min(ObjVal);
4 q. j" e& u" Q' M( E 0 g1 _3 s1 g* h
    end % run
) T/ j5 w! n, Z- W  , t, U$ M2 S5 {/ R0 y4 v2 e' _
    fprintf(1, '\n\n Done \n\n');
' o# i, }4 n8 M' T  O7 e8 X2 H2 f" X  6 k' s8 t6 \. g
end8 `5 Q' W+ b$ m9 S& B  q
三、运行结果
" }2 \; g/ C0 ?: {, r0 L- c
作者: regngfpcb    时间: 2021-3-1 10:54
冠状病毒群体免疫优化算法(CHIO)




欢迎光临 EDA365电子论坛网 (https://bbs.eda365.com/) Powered by Discuz! X3.2