资源简介

人工蜂群算法解决函数优化问题代码,内含Sphere,rastrigin,rosenbrock等标准测试函数 /* Artificial Bee Colony (ABC) is one of the most recently defined algorithms by Dervis Karaboga in 2005, motivated by the in

资源截图

代码片段和文件信息

function ObjVal = ackley(Chromswitch1);

Dim=size(Chrom2);
   
% Compute population parameters
   [NindNvar] = size(Chrom);


      A = 1/Dim;
      Omega = 2 * pi;
      sum1=A.*sum((Chrom .* Chrom)‘)‘;
      %sum1=A.*sum(Chrom .* Chrom);
      sum2=A.*sum((cos(Omega * Chrom))‘)‘;
      ObjVal = -20*exp(-0.2*sqrt(sum1))-exp(sum2)+20+exp(1);

  

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件         73  2008-06-05 10:32  Sphere.m

     文件        365  2009-09-01 15:41  ackley.m

     文件        182  2008-06-09 20:54  calculateFitness.m

     文件        202  2006-04-27 12:32  griewank.m

     文件        578  2006-04-27 12:32  rastrigin.m

     文件        602  2006-04-27 12:32  rosenbrock.m

     文件       8910  2011-07-04 10:11  runABC.m

     文件        447  2006-04-27 12:32  schwefel.m

----------- ---------  ---------- -----  ----

                11359                    8


评论

共有 条评论