1 / 11
文档名称:

蚁群算法源代码.pdf

格式:pdf   大小:237KB   页数:11页
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

文档介绍:Evaluation Warning : The document was created with Spire.PDF .

view plainco
{61,33}, {62,42}, {62,63}, {63,69}
};
//----------上面参数是固定的,下面的参数是可变的-----------
//蚂蚁数量
#define M 50
//最大循环次数 NcMax
int NcMax = 1000;
//信息启发因子,期望启发式因子,全局信息素挥发参数,局部信息素挥发参数, 状态转移
公式中的 q0
double alpha = 2, beta = 4, rou = 0.1, alpha1 = 0.1, qzero = 0.01;
//-----------问题二结束------------------------------------------------------------------------
*/

//----------(3)问题三:Elion75 城市 TSP 问题 best_length = 542.31;
//该程序最好的结果是 542.309,可运行多次获得
//城市节点数目
#define N 75
//城市坐标
double C[N][2]={
{6,25}, {7,43}, {9,56}, {10,70}, {11,28},
{12,17}, {12,38}, {15,5}, {15,14}, {15,56},
{16,19}, {17,64}, {20,30}, {21,48}, {21,45},
{21,36}, {22,53}, {22,22}, {26,29}, {26,13},
{26,59}, {27,24}, {29,39}, {30,50}, {30,20},
{30,60}, {31,76}, {33,34}, {33,44}, {35,51},
{35,16}, {35,60}, {36,6}, {36,26}, {38,33},
{40,37}, {40,66}, {40,60}, {40,20}, {41,46},
{43,26}, {44,13}, {45,42}, {45,35}, {47,66},
{48,21}, {50,30}, {50,40}, {50,50}, {50,70},
{50,4}, {50,15}, {51,42}, {52,26}, {54,38},
{54,10}, {55,34}, {55,45}, {55,50}, {55,65},
{55,57}, {55,20}, {57,72}, {59,5}, {60,15},
{62,57}, {62,48}, {62,35}, {62,24}, {64,4},{65,27}, {66,14}, {66,8}, {67,41}, {70,64}
};
//----------上面参数是固定的,下面的参数是可变的-----------
//蚂蚁数量
#define M 75
//最大循环次数 NcMax
int NcMax =1000;
//信息启发因子,期望启发式因子,全局信息素挥发参数,局部信息素挥发参数, 状态转移
公式中的 q0
double alpha = 2, beta = 5, rou = 0.1, alpha1 = 0.1, qzero = 0.1;
//-----------问题三结束------------------------------------------------------------------------


//=====================================================================
======================================
//局

分享好友

预览全文

蚁群算法源代码.pdf

上传人:1606449910 8/10/2022 文件大小:237 KB

下载得到文件列表

蚁群算法源代码.pdf

相关文档