98年全国大学生数学建模竞赛B题“水灾巡视问题”,是一个推销员问题,本题有53个点,所有可能性大约为exp(53),目前没有好方法求出精确解,既然求不出精确解,...
代码说明:
98年全国大学生数学建模竞赛B题“水灾巡视问题”,是一个推销员问题,本题有53个点,所有可能性大约为exp(53),目前没有好方法求出精确解,既然求不出精确解,我们使用模拟退火法求出一个较优解,将所有结点编号为1到53,1到53的排列就是系统的结构,结构的变化规则是:从1到53的排列中随机选取一个子排列,将其反转或将其移至另一处,能量E自然是路径总长度。具体算法描述如下:步1: 设定初始温度T,给定一个初始的巡视路线。步2 :步3 --8循环K次步3:步 4--7循环M次步4:随机选择路线的一段步5:随机确定将选定的路线反转或移动,即两种调整方式:反转、移动。步6:计算代价D,即调整前后的总路程的长度之差步7:按照如下规则确定是否做调整:如果D0,则按照EXP(-D/T)的概率进行调整步8:T*0.9-->T,降温-98 National Mathematical Contest in Modeling B and that the "flood inspections", is a salesman problem, and that is 53 points, all possibilities about exp (53), there is no good way to get accurate solutions, since no exact solution for, we used simulated annealing France obtained an optimum solution to all nodes to a number of 53 to 53.1 is with the system structure, changes in the structure of the rules is : from 1-53 with a randomly selected with a son, to reverse or to move it to another, the energy E is the natural path length. The specific algorithm is described as follows : Step 1 : The initial set temperature T,
下载说明:请别用迅雷下载,失败请重下,重下不扣分!