这是一个由VC编写的遗传算法解决TSP问题的源代码,希望能初学者有所帮助!-everyone! This is a VC prepared by the Genetic Algorithm for the Traveling Salesman Problem source code, hope to help beginners!
模拟退火算法求解TSP问题 #include #include #include #include #include using namespace ::std; const int MAX_CITY_SIZE = 100;//最大城市个数 int n; //城市个数 int dist[MAX_CITY_SIZE][MAX_CITY_SIZE];//距离矩阵 int cur_path[MAX_CITY_SIZE];//当前解 int exd_path[MAX_CITY_SIZE];/