帝国竞争算法(imperialist competitive algorithm, ICA )详解+Java代码
/**
* Returns the fitness of one country
* @param individual the solution to evaluate
* @return the fitness
*/
public double getFitnessValue(double[] individual)
{
double fitness = 0;
// Sphere function
for(int i=0; i<individual.length; i++)
{
fitness = fitness + Math.pow(individual[i],2);
}
// // Rastrigin function
// for(int i=0; i<individual.length; i++)
// {
// fitness = fitness + (Math.pow(individual[i],2)-10*Math.cos(2*Math.PI*individual[i]));
// }
// fitness = 10*dimension + fitness;
// // Rosenbrock function
// for(int i=0; i<individual.length-1; i++)
// {
// fitness = fitness + 100*Math.pow((Math.pow(individual[i],2)-individual[i+1]),2) + Math.pow((individual[i]-1),2);
// }
// // Ackley function
// double a = 20;
// double b = 0.2;
// double c = 2*Math.PI;
// double s1 = 0;
// double s2 = 0;
// for(int i=0; i<individual.length; i++)
// {
// s1 = s1 + Math.pow(individual[i],2);
// s2 = s2 + Math.cos(c*individual[i]);
// }
// fitness = -a * Math.exp( -b * Math.sqrt(1/individual.length*s1)) - Math.exp(1/individual.length*s2) + a + Math.exp(1);
nbEvals++;
return fitness;
}
参考资料
[1] 基于改进帝国主义竞争算法的城市轨道交通乘客路径选择方法技术
[2] 郭婉青,叶东毅.帝国竞争算法的进化优化[J].计算机科学与探索,2014,8(4):473-482

最新活动更多
-
3月27日立即报名>> 【工程师系列】汽车电子技术在线大会
-
4月1日立即下载>> 【村田汽车】汽车E/E架构革新中,新智能座舱挑战的解决方案
-
即日-4.22立即报名>> 【在线会议】汽车腐蚀及防护的多物理场仿真
-
4月23日立即报名>> 【在线会议】研华嵌入式核心优势,以Edge AI驱动机器视觉升级
-
4月25日立即报名>> 【线下论坛】新唐科技2025新品发布会
-
5月15日立即下载>> 【白皮书】精确和高效地表征3000V/20A功率器件应用指南
发表评论
请输入评论内容...
请输入评论/评论长度6~500个字
暂无评论
暂无评论