💥1 概述
FDB-TLABC是一种基于健身-距离平衡和基于学习的人工蜂群的强大优化算法。
基于教学学习的人工蜂群(TLABC)是一种基于混合群体的元启发式搜索算法。它将基于教学学习的优化(TLBO)的开发与人工蜂群(ABC)的探索相结合。通过这两种自然启发的群体智能算法的混合,提出了一种鲁棒的方法来解决全局优化问题。然而,与基于群的算法一样,使用TLABC方法,有效地模拟选择过程是一项巨大的挑战。健身-距离平衡(FDB)是最近开发的一种强大的方法,可以有效地模仿自然界中的选择过程。在本研究中,使用FDB方法重新设计了TLABC算法的三个搜索阶段。通过这种方式,开发了更有效地模仿自然并具有强大搜索性能的FDB-TLABC算法。为了研究所提出的算法的开发、探索和平衡搜索能力,在标准和复杂的基准测试套件(经典、IEEE CEC 2014、IEEE CEC 2017 和 IEEE CEC 2020)上对其进行了测试。为了验证所提出的FDB-TLABC在全局优化问题和光伏参数估计问题(一个受约束的真实世界工程问题)中的性能,根据IEEE CEC标准进行了非常全面和合格的实验研究。统计分析结果证实,与其他优化方法相比,所提出的FDB-TLABC提供了最佳的最优解,并产生了更好的性能。
📚2 运行结果
主函数代码:
function []=fdb_tlabc() [popsize, D, maxFES, lbArray, ubArray] = problem_terminate(); lu = [lbArray; ubArray]; Xmin = lu(1,:); Xmax = lu(2,:); trial=zeros(1,popsize); limit = 200; CR = 0.5; X = repmat(Xmin, popsize, 1) + rand(popsize, D) .* (repmat(Xmax-Xmin, popsize, 1)); val_X = zeros(1, popsize); for i = 1 : popsize val_X(i) = problem(X(i, :)); end [val_gBest, min_index] = min(val_X); gBest = X(min_index(1),:); FES = 0; while FES<maxFES % == == == == == = Teaching-based employed bee phase == == == == == = for i=1:popsize [~,sortIndex] = sort(val_X); mean_result = mean(X); % Calculate the mean Best = X(sortIndex(1),:); % Identify the teacher TF=round(1+rand*(1)); Xi = X(i,:) + (Best -TF*mean_result).*rand(1,D); % Diversity learning r = generateR(popsize, i); F = rand; V = X(r(1),:) + F*(X(r(2),:) - X(r(3),:)); flag = (rand(1,D)<=CR); Xi(flag) = V(flag); Xi = boundary_repair(Xi,Xmin,Xmax,'reflect'); % Accept or Reject val_Xi = problem(Xi); FES = FES+1; if val_Xi<val_X(i) val_X(i) = val_Xi; X(i,:) = Xi; trial(i) = 0; else trial(i) = trial(i)+1; end end % == == == == == = Learning-based onlooker bee phase== == == == == = Fitness = calculateFitness(val_X); for k=1:popsize i = fitnessDistanceBalance( X, Fitness); j = randi(popsize); while j==i,j=randi(popsize); end if val_X(i)<val_X(j) Xi = X(i,:) + rand(1,D).*(X(i,:)-X(j,:)); else Xi = X(i,:) + rand(1,D).*(X(j,:)-X(i,:)); end Xi = boundary_repair(Xi,Xmin,Xmax,'reflect'); % Accept or Reject val_Xi = problem(Xi); FES = FES+1; if val_Xi<val_X(i) val_X(i) = val_Xi; X(i,:) = Xi; end end % == == == == == = Generalized oppositional scout bee phase == == == == == = ind = find(trial==max(trial)); ind = ind(1); if (trial(ind)>limit) trial(ind) = 0; sol = (Xmax-Xmin).*rand(1,D)+Xmin; solGOBL = (max(X)+min(X))*rand-X(ind,:); newSol = [sol;solGOBL]; newSol = boundary_repair(newSol,Xmin,Xmax,'random'); val_sol = zeros(1,2); for i = 1 : 2 val_sol(i) = problem(newSol(i, :)); end FES = FES+2; [~,min_index] = min(val_sol); X(ind,:) = newSol(min_index(1),:); val_X(ind) = val_sol(min_index(1)); end % The best food source is memorized if min(val_X)<val_gBest [val_gBest, min_index] = min(val_X); gBest = X(min_index(1),:); end end fprintf('Best Fitness: %d\n', val_gBest); disp('Best Solution:'); disp(gBest); end function r = generateR(popsize, i) % Generate index % r = [r1 r2 r3 r4 r5] r1 = randi(popsize); while r1 == i r1 = randi(popsize); end r2 = randi(popsize); while r2 == r1 || r2 == i r2 = randi(popsize); end r3 = randi(popsize); while r3 == r2 || r3 == r1 || r3 == i r3 = randi(popsize); end r4 = randi(popsize); while r4 == r3 || r4 == r2 || r4 == r1 || r4 == i r4 = randi(popsize); end r5 = randi(popsize); while r5 == r4 || r5 == r3 || r5 == r2 || r5 == r1 || r5 == i r5 = randi(popsize); end r = [r1 r2 r3 r4 r5]; end function u = boundary_repair(v,low,up,str) [NP, D] = size(v); u = v; if strcmp(str,'absorb') for i = 1:NP for j = 1:D if v(i,j) > up(j) u(i,j) = up(j); elseif v(i,j) < low(j) u(i,j) = low(j); else u(i,j) = v(i,j); end end end end if strcmp(str,'random') for i = 1:NP for j = 1:D if v(i,j) > up(j) || v(i,j) < low(j) u(i,j) = low(j) + rand*(up(j)-low(j)); else u(i,j) = v(i,j); end end end end if strcmp(str,'reflect') for i = 1:NP for j = 1:D if v(i,j) > up(j) u(i,j) = max( 2*up(j)-v(i,j), low(j) ); elseif v(i,j) < low(j) u(i,j) = min( 2*low(j)-v(i,j), up(j) ); else u(i,j) = v(i,j); end end end end end function fFitness = calculateFitness(fObjV) fFitness = zeros(size(fObjV)); ind = find(fObjV>=0); fFitness(ind) = 1./(fObjV(ind)+1); ind = find(fObjV<0); fFitness(ind) = 1+abs(fObjV(ind)); end
🌈3 Matlab代码实现
🎉4 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1]Duman, S., Kahraman, H. T., Sonmez Y., Guvenc, U., Katı, M., Aras, S. (2022) A Powerful Meta-Heuristic Search Algorithm for Solving Global Optimization and Real-World Solar Photovoltaic Parameter Estimation Problems. Engineering Applications of Artificial Intelligence, https://doi.org/10.1016/j.engappai.2022.104763.