#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<conio.h>
#include<float.h>
#include<time.h>
#include<graphics.h>
#include<bios.h>
#include<alloc.h>
#define maxpop 100
#define maxstring 100
struct pp {unsigned char chrom[maxstring];
float x;
};
struct pp oldpop,bestpop,lbestpop,tabupop[maxpop];
unsigned int popsize,lchroml,lchrom2,lchrom,gen,maxgen,bestgen,ltabu;
unsigned int KK;
float pw,xold,xnew,xbest,best[400];
float length [maxstring],cheight [maxstring],weight [maxstring];
int vv[maxstring];
void initdata();
void initpop();
float decode(); *
void vehicle();
int hillclimb();/* 禁忌搜索操作 */
/*main*/
main()
{ unsigned int k,j,tt,iijj[maxstring];
char fname[20];
float ttt;/*计算时间*/
- 1
- 2
- 3
前往页