Originally posted by: SystemAdmin
I think this model runs as expected.
However you must add a call to endSearch at the end of the main function to see the end of the log.
cp.startNewSearch();
while (cp.next()) {
n++;
thisOplModel.postProcess();
writeln(thisOplModel.objective);
}
cp.endSearch(); // Addition
writeln(n," solutions ");
and now you get the full search log in OPL:
!
! Maximization problem - 11 variables, 35 constraints
! Initial process time : 0,00s (0,00s extraction + 0,00s propagation)
! . Log search space : 341,0 (before), 25,5 (after)
! . Memory usage : 331,4 KB (before), 331,4 KB (after)
! Using parallel search with 2 workers.
!
! Best Branches Non-fixed W Branch decision
* 0 3 0,00s 1 -
!
! Search terminated normally, 1 solution found.
! Best objective : 0 (optimal - effective tol. is 1,000000e-009)
! Number of branches : 6
! Number of fails : 8
! Total memory usage : 2,0 MB (1,1 MB CP Optimizer + 0,9 MB Concert)
! Time spent in solve : 0,00s (0,00s engine + 0,00s extraction)
! Search speed (br. / s) : 600,0
!
The log shows that CPO finds only one solution and that it is optimal.
Regards,
Philippe
#ConstraintProgramming-General#DecisionOptimization