xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 2KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-05-15
  • 語言: Matlab
  • 標(biāo)簽: HS??和聲??

資源簡(jiǎn)介

和聲搜索(Harmony Search, HS)算法是一種新穎的智能優(yōu)化算法。類似于遺傳算法對(duì)生物進(jìn)化的模仿、模擬退火算法對(duì)物理退火的模擬以及粒子群優(yōu)化算法對(duì)鳥群的模仿等,和聲算法模擬了音樂演奏的原理。

資源截圖

代碼片段和文件信息

%?Harmony?Search?Algorithm
%By?Sajjad?Yazdani
%
%?base?on:
%?[1]:
clc;clear?all;close?all
%%?Problem?Prametters
Dim=2;?%?problem?Dimention
Low=[-10?-10];?%?Low?Boundry?of?Problem
High=[10?10];?%?High?Boundry?of?Problem

Min=1;?%?Minimaization?or?maximaiz?of?Fun??if?Min=1?it?will?be?minimaze?the?function?and?if?Min=0?it?will?be?maximized?the?function.

%%?Harmony?Search?Parametters

HMS=100;%Harmony?Memory?Size?(Population?Number)
bw=0.2;
HMCR=0.95;%[1]?Harmony?Memory?Considering?Rate
PAR=0.3;%[1]?Pitch?Adjustment?Rate

MaxItr=10000;%?Maximum?number?of?Iteration

%%?Initialization
HM=zeros(HMSDim);
HF=zeros(HMS1);
for?i=1:HMS
????HM(i:)=Low+(High-Low).*rand(1Dim);
????HF(i1)=MyFun(HM(i:));
end

if?Min==1
????[WorstFitWorstLoc]=max(HF);
else
????[WorstFitWorstLoc]=min(HF);
end


%%?Iteration?Loop
for?Itr=1:MaxItr
????HarmonyIndex=fix(rand(1Dim)*HMS)+1;%?Random?Selection?of?Ha

評(píng)論

共有 條評(píng)論