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

蚁群算法求解TSP

于 2022-04-25 发布 文件大小:2.58 kB
0 146
下载积分: 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 个回复

  • reflectivity_of_film
    根据文献波恩的名著《光学原理》编写的,用于计算薄膜的反射率,可以自编测试文件绘出各种反射率图,为方便使用已附了一个测试文件供参考(This program s function is to calculate a reflectivity of film, which is programmed according to the classical masterpiece of the principle of optics by Born.)
    2011-05-13 11:22:14下载
    积分:1
  • DCT1
    一个基于DCT的数字水印源码想要的可以下载看看。(A DCT-based digital watermarking can download source code you want to see.)
    2010-06-02 23:59:38下载
    积分:1
  • tools
    用有限差分方法计算模式的使用模拟介质波导法(This function calculates the modes of a dielectric waveguide using the semivectorial finite difference method)
    2011-09-08 16:11:48下载
    积分:1
  • SemiBatchReactor
    半间歇反应器的matlab源程序,化工应用实例,供大家学习参考。(Semi-batch reactor matlab source, chemical application instance, for all to learn.)
    2012-10-28 11:26:27下载
    积分:1
  • uve_pls
    对一维光谱实现偏最小二乘回归进行UVE变量选择(UVE variable selection on the spectrum)
    2021-04-19 15:18:51下载
    积分:1
  • peizhunshizhan
    实现图像配准很好的一个代码,运行能通过。(peizhun code)
    2010-05-20 13:36:55下载
    积分:1
  • 37724093DoubleCloseloop
    induction generator for wind turbine
    2010-05-27 02:15:16下载
    积分:1
  • SAA-code
    模拟退火算法程序原码以及算法程序,是用MATLAB编辑好的m文件(Simulated annealing algorithm program source code and algorithm program is a good m file in MATLAB Editor)
    2012-08-06 21:24:57下载
    积分:1
  • 课程作业时的超分辨率重建实现的pocs算法matlab例程
    中介真值程度度量,基于中介真值程度度量的图像分割本程序的性能已经超过其他算法,一种流形学习算法(很好用),包含了阵列信号处理的常见算法,有小波分析的盲信号处理,matlab小波分析程序。
    2023-02-27 11:20:03下载
    积分:1
  • 1st
    Simulink工具编写代码(MATLAB Function方式),产生一单径瑞利信道,其多普勒谱为经典谱,其中移动速率为120km/h,含理论描述多普勒经典谱(Simulink tools for writing code (MATLAB Function mode) to produce a single path Rayleigh channel, the Doppler spectrum for the classical spectrum, where mobile speed of 120km/h, with the classical theoretical description of Doppler spectrum)
    2010-10-21 11:38:39下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载