前言
榛子树搜索(HST),用于解决数值和工程优化问题。HST 是一种多智能体算法,可模拟在森林中寻找最佳榛子树的搜索过程。该算法由三个主要执行器组成:生长、果实散播和根系传播。在成长阶段,树木在共享资源上相互竞争,以成长并提高其健康度。在水果散播阶段,HTS 在动物和啮齿动物的帮助下,通过模拟榛子在森林周围的运动来进行探索。在根传播中,HTS 通过对周围树木的根传播机制进行建模来执行利用。在多变量无约束数值优化基准和约束工程问题上评估了所提出算法的性能。将所提出的算法与其他一些优化算法进行比较,可以看出 HTS 在解决问题的成功率和在大多数基准问题上找到全局最优值方面的优越性。
代码实现
MATLAB
rootSpreading.m
function [Population] = rootSpreading(Population, AlgorithmParams, ProblemParams,alpha,ChaosVec)
temp=nan;
temp=Population(:,1:end-1);ProblemParams.VarMin;
ProblemParams.VarMax;% r=exp(-AlgorithmParams.year/AlgorithmParams.NumOfYears);
r=alpha;
ch=ChaosVec(AlgorithmParams.year);costs=Population(:,end);
[costs,sortInd] = sort(costs);
Population = Population(sortInd,:);
temp=Population(1,1:end-1);
bestCost=Population(1,end);for i=1:ProblemParams.NPartemp(:,i