简单的蚁群算法求解TSP问题,可随时拓展我要分享

Simple ant colony algorithm for TSP, can be expand

matlab 算法 tsp 简单 蚁群 求解 问题 随时 拓展

关注次数: 336

下载次数: 0

文件大小: 1.36 kB

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明: 考虑到TSP问题的特点,采用一种受贪婪算法启发的贪婪交叉算子和贪婪倒位变异算子,实验证明,该算法能够极大地提高了算法的收敛速度又保证了最优解的得到,而且具有较好的鲁棒性。下面遗传算法求解TSP的基本步骤: (1)种群初始化。个体编码方法有二进制编码和实数编码,在解决TSP问题过程中个体编码方法为实数编码。对于TSP问题,实数编码为1-n的实数的随机排列,初始化的参数有种群个数M、染色体基因个数N(即城市的个数)、迭代次数C、交叉概率Pc、变异概率Pmutation。 (2


English Description:

Taking into account the characteristics of TSP problem, using an algorithm inspired by greed greed greed crossover and mutation operator inversion, experiments show that the algorithm can greatly improve the convergence rate and ensures the optimal solution, but also has better robustness. The following basic steps Genetic Algorithm for TSP:  (1) Population initialization. Individual coding methods are encoded binary coding and real, in the process of solving the TSP individual coding method for real-coded. For the TSP, the real number is encoded as a random arrangement of 1-n real numbers, the number of initialization parameters are populations M, chromosome number N (ie, the number of cities), the number of iterations C, crossover probability Pc, mutation probability Pmutation.  (2) The fitness function. In the TSP problem, for the distance D (i, j) between any two cities are known, each chromosome (ie, random permutation of n cities) to calculate the total di


代码预览