登录
首页 » Matlab » 蚁群算法求解TSP

蚁群算法求解TSP

于 2022-04-25 发布 文件大小:2.58 kB
0 24
下载积分: 2 下载次数: 2

代码说明:

%蚁群算法求解TSP问题的matlab程序 clear all close all clc %初始化蚁群 m=31;%蚁群中蚂蚁的数量,当m接近或等于城市个数n时,本算法可以在最少的迭代次数内找到最优解 C=[1304 2312;3639 1315;4177 2244;3712 1399;3488 1535;3326 1556;3238 1229;4196 1004;    4312 790;4386 570;3007 1970;2562 1756;2788 1491;2381 1676;1332 695;3715 1678;    3918 2179;4061 2370;3780 2212;3676 2578;4029 2838;4263 2931;3429 1908;3507 2367;    3394 2643;3439 3201;2935 3240;3140 3550;2545 2357;2778 2826;2370 2975];%城市的坐标矩阵 Nc_max=200;%最大循环次数,即算法迭代的次数,亦即蚂蚁出动的拨数(每拨蚂蚁的数量当然都是m) alpha=1;%蚂蚁在运动过程中所积累信息(即信息素)在蚂蚁选择路径时的相对重要程度,alpha过大时,算法迭代到一定代数后将出现停滞现象 beta=5;%启发式因子在蚂蚁选择路径时的相对重要程度 rho=0.5;%0

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • subband_spectral_entropy_used_in_speech_endpoint_d
    在读研期间自己写的基于子带频谱墒的语音端点检测程序,绝对正确,并且好用!(in during the sub-band spectrum of soil moisture based on voice activity detection procedures, absolutely correct, and easy to use!)
    2009-05-01 17:38:21下载
    积分:1
  • psat
    a combined solution for all power system related programs in matlab
    2011-12-02 13:13:47下载
    积分:1
  • particlefilter
    % % set some variables in the workspace to control behaviour: % % graphicsMode 0 no graphics, % 1 graphics, particles, beacons, ground truth % 2 graphics, as above + range circles % % perfect 0 use beacon range data % 1 use ground truth range data % clear a( Set some variables in the workspace to control behaviour: graphicsMode 0 no graphics, 1 graphics, particles, beacons, ground truth 2 graphics, as above+ Range circles perfect 0 use beacon range data 1 use ground truth range data clear a)
    2007-09-30 10:38:28下载
    积分:1
  • csp2
    说明:  脑电信号分析中的空间滤波器,分析节律信号非常有效。(EEG analysis of the spatial filter, analyze rhythm signal is very effective.)
    2011-02-28 23:05:11下载
    积分:1
  • turboedit方法探测去除周跳程序
    自己编写的基于turboedit方法探测修复周跳程序,具体输入输出函数中有注释介绍,本程序可以准确探测出两周及两周以上的周跳,修复周跳可以根据程序中的注释修改参数来达到一个相对比较好的效果
    2022-02-24 19:29:42下载
    积分:1
  • LMS自适应滤波噪声源代码。
    lms source code for adaptive filtering the acoustic noise.
    2022-03-13 04:53:43下载
    积分:1
  • 2DGabor+pca+Svm
    采用二维Gabor小波变换对图像进行多尺度多方向分析,将图像数据映射到高维数据空间,再利用pca降维方法对高维数据进行降维,降维后的数据具有很好的可分性,在模式识别与分类阶段,才用基于遗传算法自动搜索数据的最优的分类参数,后的svm的训练参数,这套代码实现了很好的分类效果。
    2023-02-07 14:00:06下载
    积分:1
  • 支持向量机的Matlab实现,支持多分类,据有GUI操作界面,简单易懂,其中包括输入输出数据。...
    支持向量机的Matlab实现,支持多分类,据有GUI操作界面,简单易懂,其中包括输入输出数据。-Support Vector Machines Matlab realize, support multi-classification, as far as the operation has GUI interface, easy-to-read, including the input and output data.
    2023-05-13 21:45:03下载
    积分:1
  • cascadicmultigridfornonlinearproblem
    用于求解半线性椭圆问题的瀑布型多网格算法,可以求解到很高的精度,(Used to solve semi-linear elliptic problem Falls Multi-grid method, you can solve to a high precision,)
    2010-03-07 21:31:18下载
    积分:1
  • matlab-3d-reconstruction
    由图像的灰度,恢复三维物体的形状,包括源程序和图片(By the gray scale image to restore the shape of three-dimensional objects, including source code and pictures)
    2011-06-14 22:16:53下载
    积分:1
  • 696524资源总数
  • 103843会员总数
  • 49今日下载