用 C++ 和 C语言实现遗传算法 计算TSP背包问题 全部源代码.rar

上传者: 27595745 | 上传时间: 2021-09-15 10:04:12 | 文件大小: 296KB | 文件类型: RAR
#include #include #include #include #include #define cities 10 //城市的个数 #define MAXX 100//迭代次数 #define pc 0.8 //交配概率 #define pm 0.05 //变异概率 #define num 10//种群的大小 int bestsolution;//最优染色体 int distance[cities][cities];//城市之间的距离 struct group //染色体的结构 { int city[cities];//城市的顺序 int adapt;//适应度 double p;//在种群中的幸存概率 }group[num],grouptemp[num]; //随机产生cities个城市之间的相互距离 void init() { int i,j; memset(distance,0,sizeof(distance)); srand((unsigned)time(NULL)); for(i=0;i

文件下载

资源详情

[{"title":"( 21 个子文件 296KB ) 用 C++ 和 C语言实现遗传算法 计算TSP背包问题 全部源代码.rar","children":[{"title":"用 C++ 和 C语言实现遗传算法 计算TSP背包问题 全部源代码","children":[{"title":"tsp.ncb <span style='color:#111;'> 33.00KB </span>","children":null,"spread":false},{"title":"Cpp1.cpp <span style='color:#111;'> 9.74KB </span>","children":null,"spread":false},{"title":"Cpp1.plg <span style='color:#111;'> 676B </span>","children":null,"spread":false},{"title":"tsp.opt <span style='color:#111;'> 47.50KB </span>","children":null,"spread":false},{"title":"Cpp1.ncb <span style='color:#111;'> 41.00KB </span>","children":null,"spread":false},{"title":"tsp.c <span style='color:#111;'> 9.75KB </span>","children":null,"spread":false},{"title":"Cpp1.dsw <span style='color:#111;'> 514B </span>","children":null,"spread":false},{"title":"Cpp1.opt <span style='color:#111;'> 47.50KB </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"vc60.pdb <span style='color:#111;'> 44.00KB </span>","children":null,"spread":false},{"title":"Cpp1.obj <span style='color:#111;'> 14.50KB </span>","children":null,"spread":false},{"title":"Cpp1.ilk <span style='color:#111;'> 201.86KB </span>","children":null,"spread":false},{"title":"vc60.idb <span style='color:#111;'> 41.00KB </span>","children":null,"spread":false},{"title":"Cpp1.exe <span style='color:#111;'> 204.07KB </span>","children":null,"spread":false},{"title":"Cpp1.pdb <span style='color:#111;'> 385.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"tsp.exe <span style='color:#111;'> 136.66KB </span>","children":null,"spread":false},{"title":"Cpp1.dsp <span style='color:#111;'> 3.30KB </span>","children":null,"spread":false},{"title":"tsp.plg <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"tsp.dsp <span style='color:#111;'> 3.28KB </span>","children":null,"spread":false},{"title":"tsp.dsw <span style='color:#111;'> 512B </span>","children":null,"spread":false},{"title":"__Previews","children":[{"title":"Cpp1.cppPreview <span style='color:#111;'> 75.04KB </span>","children":null,"spread":false}],"spread":false},{"title":"Cpp1.exe <span style='color:#111;'> 137.21KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明