Originally posted by: DeFersen
Hi,
Thanks for your answer,
I give you my three classes without the content of the model but i can tell you that it is an not-optimized model of a optimization problem which take a lot of time to find an optimal solution (that is exactly what i wanted to test the abortSearch functionality)
I let 20 sc before aborting the search so it is sure that the model has found a solution (but not the optimal one), as you can observe on this output :
! ----------------------------------------------------------------------------
! Search terminated by abort, 4 solutions found.
! Best objective : 4
! Number of branches : 72 962
! Number of fails : 24 184
! Total memory usage : 391,9 MB (352,1 MB CP Optimizer + 39,9 MB Concert)
! Time spent in solve : 20,83s (15,50s engine + 5,33s extraction)
! Search speed (br. / s) : 4 706,3
! ----------------------------------------------------------------------------
On retourne vraie
Solution(MAIN) :ilog.concert.cppimpl.IloSolution@33e5ccce
ilog.concert.IloException: IloSolution::getValue - saved domain not bound
at ilog.concert.cppimpl.concert_wrapJNI.IloSolution_getValue__SWIG_2(Native Method)
at ilog.concert.cppimpl.IloSolution.getValue(IloSolution.java:311)
at ilog.concert.cppimpl.IloSolution.getValue(IloSolution.java:64)
at Main.main(Main.java:57)
An interesting thing is that for only one execution, i could see the value of the variables i had in the IloSolution without any errors...
It seems that i made mistakes with the order of the instruction so, even if you can't execute my code, could you give me the good structure (or a page which to talk about this) to make an abortSearch with a Thread an to store the solution into an IloSolution object (to display the value after) ?
Best regards,
DeFersen.
#DecisionOptimization#OPLusingCPOptimizer