global.h
来自「使用蚁群算法解决旅行商问题」· C头文件 代码 · 共 26 行
H
26 行
#ifndef H_GLOBAL
#define H_GLOBAL
#include <iostream>
#include <fstream>
#include <cmath>
#include <ctime>
using namespace std;
typedef struct city
{
int num;
int x;
int y;
}city;
const int iAntCount=34; //蚂蚁数目
const int iCityCount=51; //城市数目
const int iItCount=600; //最大跌代次数
const double Q=100; //蚂蚁循环一周所释放的信息素
const double alpha=1; //
const double beta=5; // 决定tao和miu重要性的参数
const double rou=0.5; //衰减系数
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?