⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 global.h

📁 使用蚁群算法解决旅行商问题
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -