-
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,
- 2023-05-19 17:45:04下载
- 积分:1
-
随机化算法
随机化算法-Randomized Algorithms
- 2022-05-17 07:40:54下载
- 积分:1
-
计算器的java代码
Calculator java code
- 2022-06-28 06:51:46下载
- 积分:1
-
背包问题的C++ 实现
背包问题的 求解代码,自己用C++实现,里面包括0-1背包问题 和 单位质量的背包问题,包括如下几个关键的函数:void vwComp(Item*item,int n) ;void vwSort(Item*item,int n);int getMaxValue(Item*item,int n, int p,int cvs,int cws);double frackKnapsack(Item*item,int n,double *chs);void zeroOneKnapsack(Item*item,int n,int &fv,int &fw,int *fch)
- 2022-10-14 21:55:03下载
- 积分:1
-
AT24c04读写程序
AT24c04测试用代码,串口打印,方便查看,使用STC单片机,模拟I2C总线,对于初学者有点一定帮助作用,可以同时了解I2C和串口通信
- 2022-12-12 08:55:03下载
- 积分:1
-
LZ77算法的原代码
信息论是通信专业的基础课程,这里讲述了很多算法,用于信息编码,lz77是其中一种。这是lz77的c编码。
- 2023-05-13 10:20:03下载
- 积分:1
-
人脸和眼睛识别
Use the CascadeClassifier class to detect objects in a video stream. Particularly, we will use the functions:
– load to load a .xml classifier file. It can be either a Haar or a LBP classifer
– detectMultiScale to perform the detection.
- 2022-03-07 04:36:53下载
- 积分:1
-
高斯消元法解n阶线性方程组 这里是数学方法中常用的计算程序...
高斯消元法解n阶线性方程组 这里是数学方法中常用的计算程序-Gauss elimination method for n-linear equations here is the mathematical methods used in calculation procedures
- 2022-07-07 19:04:25下载
- 积分:1
-
两个大整数相乘(位数相同)
两个大大整数(位数相同)相乘,比如50多位。
- 2023-08-31 03:45:03下载
- 积分:1
-
算法设计与分析 哈夫曼树及哈夫曼编码 贪心算法
一个记录字符及出现频率的文件如下所示:huffman.haf7a,45b,13c,12d,16e,89f,34g,20试编写一个读取此种格式文件类CHuffman, 内部机制采用优先队列,用于建立Huffman树及进行Huffman编码输出,其用法可以如下所示: CHuffman hm("hu
- 2022-03-10 07:52:22下载
- 积分:1