我主要有这个:
#define N 23
start-time=clock();
readData(c); // just read a matrix of integer size N (in this case matrix 23*23)
lp (c,d); // resolve it by cplex with a time limit cplex command 1h 30
final-time=clock();
time = (final_time -start-time) *0.001;
printf("\n CPU = %f sec\n\n", time);
问题显示:
Default row names c1, c2 ... being created.
solution status is Feasible
obj. value: 5557
gap : 1.1697
CPU = 10800.494141 sec
为什么时间这么大? main()花了另外1小时来读取矩阵大小23 * 23 !!!!!!