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

  • 大小: 2KB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2021-01-03
  • 語言: Matlab
  • 標簽: 蜂群算法??

資源簡介

蜂群算法作為一種經典的群體智能算法,受到廣泛應用

資源截圖

代碼片段和文件信息

clear?all
clc
%%?初始化開始?%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ant?=?300;
Times?=?80;???????????????%%螞蟻移動次數
Rou?=?0.9;????????????????%%信息素揮發系數
P0?=?0.2;
Lower_1?=?-1;
Upper_1?=?1;
Lower_2?=?-1;
Upper_2?=?1;
%%?設置螞蟻初始位置?%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for?i?=?1:Ant
????X(i1)=(Lower_1+(Upper_1-Lower_1)*rand);
????X(i2)=(Lower_2+(Upper_2-Lower_2)*rand);
????Tau(i)=F(X(i1)X(i2));
end

step?=0.05;
f?=?‘-(x.^4+3*y^4-0.2*cos(3*pi*x)-0.4*cos(4*pi*y)+0.6)‘;

[xy]=meshgrid(Lower_1:step:Upper_1Lower_2:step:Upper_2);
z?=?eval(f);
figure(1);
subplot(121);
mesh(xyz);
hold?on;
plot(X(:1)X(:2)Tau‘k*‘)
hold?on;
text(0.10.8-0.1‘螞蟻的初始分布位置‘);
xlabel(‘x‘);ylabel(‘y‘);zlabel(‘f(xy)‘);

for?T=1:Times
????lamda?=?1/T;
????[Tau_Best(T)BestIndex]=max(Tau);
???

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-10-11?16:01??ACO\
?????文件????????2060??2016-10-11?16:01??ACO\ACO.asv
?????文件????????2060??2016-10-11?16:01??ACO\ACO.m
?????文件??????????83??2016-10-11?16:01??ACO\F.m

評論

共有 條評論