蚁群优化算法matlab实现
主函数:clearclcm=5;%种群规模[pop,pheromone]=initialization(m)%分别求出初始矩阵与信息素antfirstcity=firstcity(m)%每只蚂蚁随机选择出发的城市antcity=selectcity(pop,m,pheromone,antfirstcity)%每只蚂蚁每一步选择的城市newpheromone=newpheromones(m,antcity,pop,pheromone)%更新信息素函数initialization:funct
原创
2020-09-25 18:21:39 ·
920 阅读 ·
0 评论