房地產(chǎn)開發(fā)公司網(wǎng)站源碼優(yōu)化師的工作內(nèi)容
目錄
1?主要內(nèi)容
2?部分程序
3?程序結(jié)果
下載鏈接
1?主要內(nèi)容
該程序方法復(fù)現(xiàn)《改進(jìn)蟻獅算法的無線傳感器網(wǎng)絡(luò)覆蓋優(yōu)化》兩種改進(jìn)算法模型,即原始ALO算法的基礎(chǔ)上添加了兩種改進(jìn)策略:
- 改進(jìn)1:將原先的間斷性邊界收縮因子變?yōu)檫B續(xù)性邊界收縮因子,從而增強(qiáng)算法的遍歷性
- 改進(jìn)2:將原先均衡的權(quán)重系數(shù)變?yōu)閯?dòng)態(tài)權(quán)重系數(shù),平衡算法的全局搜索和局部開發(fā)能力
2?部分程序
I=(400/max_iter)*sinh(20*current_iter/max_iter); %% 改進(jìn)1:連續(xù)性邊界收縮因子% Dicrease boundaries to converge towards antlion
lb=lb/(I); % Equation (2.10) in the paper
ub=ub/(I); % Equation (2.11) in the paper % Move the interval of [lb ub] around the antlion [lb+anlion ub+antlion]
if rand<0.5lb=lb+antlion; % Equation (2.8) in the paper
elselb=-lb+antlion;
endif rand>=0.5ub=ub+antlion; % Equation (2.9) in the paper
elseub=-ub+antlion;
end% This function creates n random walks and normalize accroding to lb and ub
% vectors
for i=1:DimX = [0 cumsum(2*(rand(max_iter,1)>0.5)-1)']; % Equation (2.1) in the paper%[a b]--->[c d]a=min(X);b=max(X);c=lb(i);d=ub(i); X_norm=((X-a).*(d-c))./(b-a)+c; % Equation (2.7) in the paperRWs(:,i)=X_norm;
end
3?程序結(jié)果
仿真圖中包含改進(jìn)后的IALO算法與原始ALO算法的比較,可以看出性能提升明顯。
程序包含23種測(cè)試函數(shù),可以通過修改main函數(shù)中的“F+編號(hào)”修改測(cè)試函數(shù)并進(jìn)行驗(yàn)證。