91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 12KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-28
  • 語言: 其他
  • 標簽:

資源簡介

鳥群算法源代碼,可以直接下載使用,里面包含了基本的算法測試函數和應用框架,在研究生期間研究算法的同學可以嘗試下載。

資源截圖

代碼片段和文件信息

%?------------------------------------------------------------------------
%?Bird?Swarm?Algorithm?(BSA)?(demo)
%?Programmed?by?Xian-Bing?Meng
%?Updated?at?Jun?19?2015.????
%?Email:?x.b.meng12@gmail.com
%
%?This?is?a?simple?demo?version?only?implemented?the?basic?idea?of?BSA?for????????
%?solving?the?unconstrained?problem?namely?Sphere?function.??
%
%?The?details?about?BSA?are?illustratred?in?the?following?paper.????
%?Xian-Bing?Meng?et?al?(2015):?A?new?bio-inspXred?optimisation?algorithm:?
%?Bird?Swarm?Algorithm?Journal?of?Experimental?&?Theoretical
%?Artificial?Intelligence?DOI:?10.1080/0952813X.2015.1042530
%
%?The?parameters?in?BSA?are?presented?as?follows.
%?FitFunc????%?The?objective?function
%?M??????????%?Maxmimal?generations?(iterations)
%?pop????????%?Population?size
%?dim????????%?Number?of?dimensions?
%?FQ?????????%?The?frequency?of?birds‘?flight?behaviours?
%?c1?????????%?cognitive?accelerated?coefficient
%?c2?????????%?social?accelerated?coefficient
%?a1?a2?????%two?paramters?which?are?related?to?the?indirect?and?direct?
%?????????????effect?on?the?birds‘?vigilance?bahaviors.
%
%?Using?the?default?value?BSA?can?be?executed?using?the?following?code.
%?[?bestX?fMin?]?=?BSA
%?------------------------------------------------------------------------
?
%?Main?programs

function?b?=?BSA?%?function?[?bestX?fMin?]?=?BSA(?FitFunc?M?pop?dim?FQ?c1?c2?a1?a2?)
%?Display?help
%??help?BSA.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?set?the?default?parameters

%?if?nargin?%???FitFunc?=?@Sphere;?%函數句柄
????M?=?1000;???
????pop?=?30;??
%?????dim?=?20;
????dim?=?4;?
????FQ?=?10;???
????c1?=?1.5;
????c2?=?1.5;
????a1?=?1;
????a2?=?1;
%?end

%?set?the?parameters
lb=?-100*ones(?1dim?);???%?Lower?bounds
ub=?100*ones(?1dim?);????%?Upper?bounds
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Initialization

for?i?=?1?:?pop
????x(?i?:?)?=?lb?+?(ub?-?lb)?.*?rand(?1?dim?);?%i個體?x位置???i行20列
%?????y(?i?:?)?=?lb?+?(ub?-?lb)?.*?rand(?1?dim?);
????fit(?i?)?=?f(?x(?i?:?));?%i?個體適應度值
%?????fit(?i?)?=?f(?x(?i?:?)y(?i?:?));
end
%?初始種群適應度值??個體
pFit?=?fit;?%?The?individual‘s?best?fitness?value?個體以往最優適應度值
pX?=?x;?????%?The?individual‘s?best?position?corresponding?to?the?pFit?
%?pY?=?y;?????????????????%?個體以往最優適應度值對應的位置x
%?全局
[?fMin?bestIndex?]?=?min(?pFit?);
%?[?fMin?bestIndex?]?=?min(?fit?);??%?fMin?denotes?the?global?optimum(全局最優解)
???????????????????????????????????%?選出最小的適應度值(全局最優解)?返回最小的適應度函數值和最優位置指標
bestX?=?pX(?bestIndex?:?);?
%?bestY?=?pY(?bestIndex?:?);?
%?bestX?=?x(?bestIndex?:?);???%?bestX?denotes?the?position?corresponding?to?fMin
?????????????????????????????%?全局最小適應度值對應的位置x
I?=?1;
b(1)?=?fMin;?????????????????????????????
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?Start?the?iteration.

%?for?I?=?1?:?M??%iteration?改為?I
while?I?<=?M-1
????prob?=?rand(

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????11002??2017-11-26?11:08??改進鳥群算法源碼\BSA.m

?????文件???????9508??2017-10-30?20:06??改進鳥群算法源碼\CSO.m

?????文件???????9337??2017-11-26?11:15??改進鳥群算法源碼\f.m

?????文件???????1093??2017-11-26?11:08??改進鳥群算法源碼\PSO.m

?????文件???????1465??2017-11-26?11:02??改進鳥群算法源碼\runtest.m

?????文件??????11970??2017-11-26?11:08??改進鳥群算法源碼\UBSA.m

?????目錄??????????0??2018-01-28?20:59??改進鳥群算法源碼

-----------?---------??----------?-----??----

????????????????44375????????????????????7


評論

共有 條評論

相關資源