帝国竞争算法(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
最新活动更多
-
4月30日免费下载 >> SPM31智能功率模块助力降低供暖和制冷能耗,打造可持续未来!
-
4月30日限时免费下载>> 高动态范围(eHDR)成像设计指南
-
5月10日立即下载>> 【是德科技】精选《汽车 SerDes 发射机测试》白皮书
-
5月28日立即观看>> 【在线研讨会】Ansys镜头点胶可靠性技术及方案
-
5月31日立即报名>> 【线下论坛】新唐科技2024未来创新峰会
-
6月18日立即报名>> 【线下会议】OFweek 2024(第九届)物联网产业大会
推荐专题
发表评论
请输入评论内容...
请输入评论/评论长度6~500个字
暂无评论
暂无评论