Originally posted by: qtbgo
Hi, in the following code, in the while loop, I want to break out when computing time exceed 3600s, how to do it?
thanks
/********************************************* * OPL 12.4 Model * Author: qtb * Creation Date: 2012-3-1 at 上午10:48:03 *********************************************/ using CP; main
{ ...... opl.generate(); cp.startNewSearch();
while(cp.next() )
{ writeln(
"obj = ", cp.getObjValue(),
" | time = ", cp.info.SolveTime);
// if(cp.info.SolveTime > 3600) break;
} cp.endSearch(); opl.end();
}
#CPOptimizer#DecisionOptimization