double q;
int d,e,tem[20];
位置
//用于存一个 0 到 1 的随机数
//d 存放从 1 到 19 的一个随机整数,用来确定交叉的
//e 存放从 0 到 M 的一个随机且与当前 P[i]中 i 不同的整数,用来确定交叉的对
//运算 M 次,避免产生群体中某个体与自己交叉的情况
//随机确定交叉对象
//不能重复
//随机确定交叉位置
象
srand(time(0));
for(po=t;po
//dit=(U(max)-U(min))/n-1
dit=4.096/(n-1);
for(po=t;po