-
用动态规划法实现TSP旅行商问题
资源描述
用动态规划法实现TSP旅行商问题,此算法中我们用C++语言实现。
程序输入一个文本文件,文件中有三列,每一行表示图中的一条信息,例如:
0 1 6 #表示从0节点到1节点需要花费6
1 3 4 #表示从1节点到3节点需要花费4
就这样把有向图的每一条有向边表示出来,按照这样的格式写在一个txt文件中,作为程序输入,然后再输入你从哪个城市出发,程序可以输出一条最佳路径,并算出代价。
- 2022-06-15 23:14:56下载
- 积分:1
-
操作系统同步与互斥问题之过桥
操作系统中的同步于互斥问题一直是一个难题,相对与独木桥问题而言,中间可以过两个人而两边只可以一次过一个人的问题,要更为复杂,如何让同步程度更大去实现该算法也更为不易。
- 2023-01-30 07:10:04下载
- 积分:1
-
复数据快速傅立叶变换算法
复数据快速傅立叶变换算法-Minute Data Fast Fourier Transform algorithm
- 2022-03-04 07:52:44下载
- 积分:1
-
多目标跟踪
一个基于opencv的多目标跟踪代码可以跟踪多个目标,每个目标都可以用矩形框表示,采用了基于了hog的跟踪方法。代码简单但是功能十分完整。多多指教!希望对您有帮助!
- 2023-04-18 17:00:09下载
- 积分:1
-
A program to demonstrate the optimization process of ant colony optimization for...
A program to demonstrate the optimization process of ant colony optimization for the traveling saleman problem (TSP). The cities are shown as red circles, the pheromone on the connections between them (fully connected graph) by gray lines. The darker the grey, the more pheromone is currently on the edge. During the optimization, the currently best found tour is drawn in red. To run the optimization, first create a random TSP, then create an ant colony, and finally run the optimization.
- 2022-02-19 22:51:42下载
- 积分:1
-
The cart with an inverted pendulum, shown below, is "bumped" with an impulse
f...
The cart with an inverted pendulum, shown below, is "bumped" with an impulse
force, F. Determine the dynamic equations of motion for the system, and lin
earize about the pendulum s angle, theta = Pi (in other words, assume that p
endulum does not move more than a few degrees away from the vertical, chosen
to be at an angle of Pi). Find a controller to satisfy all of the design re
quirements given below.
-The cart with an inverted pendulum, shown below, is "bumped" with an impulse force, F. Determine the dynamic equations of motion for the system, and lin earize about the pendulum s angle, theta = Pi (in other words, assume that p endulum does not move more than a few degrees away from the vertical, chosen to be at an angle of Pi). Find a controller to satisfy all of the design re quirements given below.
- 2022-03-17 02:37:20下载
- 积分:1
-
c++socket通信
c++socket通信从远方获取数据,获取数据是xml。然后解析xml数据,在这个过程用到了多线程编程,这段代码对于学习socket通信以及所线程是很好的例子,同时也是学习xml解析的例子,解析xml用到的是Dom解析,此实例是c++实例!
- 2022-02-06 14:45:53下载
- 积分:1
-
polar 码的SC译码算法
资源描述polar码,基于信道极化,分为好信道和坏信道,满足要求的好信道用于传输信息比特,坏信道用于传输冻结比特。先用BEC构造获取冻结比特位置,在此基础上传输0比特,其他位置传信息比特。输入SC译码算法为信道转移概率,译码算法属于串行译码算法。当前获得译码判决比特,用于下一比特的译码比特的判决。
- 2022-01-26 00:13:58下载
- 积分:1
-
旅行商问题的模拟退火matlab源码程序
旅行商问题的模拟退火matlab源码程序-Traveling salesman problem matlab source of the simulated annealing procedure
- 2022-06-14 01:03:47下载
- 积分:1
-
算术表达式求值的程序,用栈实现的,可以进行加、减、乘、除、乘方、求余计算,支持小数和括号 (数据结构作业)...
算术表达式求值的程序,用栈实现的,可以进行加、减、乘、除、乘方、求余计算,支持小数和括号 (数据结构作业)-arithmetic expression evaluates the procedures used stack to achieve, and can be, plus or minus, multiplication, addition, the involution, for I, support minority and brackets (data structure operations)
- 2023-04-17 03:30:03下载
- 积分:1