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

📄 defines.h

📁 使用遗传算法解决tsp问题,vc++6.0实现
💻 H
字号:
#ifndef DEFINES_H
#define DEFINES_H

/////////////////////////////////////////////////////////////////////////
//
//		File: defines.h
//
//		Author: Mat Buckland
//
//		Desc: defines for the TSP
//
/////////////////////////////////////////////////////////////////////////


#define WINDOW_WIDTH		600
#define WINDOW_HEIGHT		600

#define NUM_CITIES			100
#define AREA_RADIUS			250
#define CITY_SIZE			  3
				
#define	MUTATION_RATE		0.2
#define	CROSSOVER_RATE	0.7
#define	POP_SIZE			  200

//used as cT in CgaTSP::AlternativeTournamentSelection
#define CTOURNAMENT     0.75

//number of genomes to randomly choose and compare in
//standard tournament selection
#define NUM_TO_COMPARE  5


//used to rectify precision errors
#define EPSILON				0.000001

//used in Boltzmann selection
#define BOLTZMANN_MIN_TEMP    1
#define BOLTZMANN_DT          0.05

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -