Originally posted by: UdoKrehler
Hi,
I use CP Optimizer 2.3 under C# in Microsoft Visual Studio 2010.
I wonder whether I do understand the concept of CP.IntInfo.FailStatus correctly: I use CP Optimizer under a given time limit and I simply want to check at the end whether CP Optimizer has found an optimal solution or whether it stopped due to the given time limit. My code looks as follows:
if (cp.Solve()) { int terminationState = cp.GetInfo(CP.IntInfo.FailStatus); if (terminationState == CP.ParameterValues.SearchHasNotFailed.Value) { // possibility 1 } else if (terminationState == CP.ParameterValues.SearchHasFailedNormally.Value) { // possibility 2 } else if (terminationState == CP.ParameterValues.SearchStoppedByLimit.Value) { // possibility 3 } } else { // ... } Now, I would like to ask about the meaning of these three possible cases: In my opinion, we should end up in "possibility 3" if the search was terminated due to the time limit. That works. But I'm not sure about the first two possibilities.
a) Shouldn't we always end up in possibility 1 because at that time, the search always did not fail (otherwise we would never reach this code fragment)?
b) According to my knowledge, "SearchHasFailedNormally" means that the entire search space has been seen but NO feasible solution has been found. In other words: It states that the program is infeasible (there does not exist a single feasible solution). Is this correct? Because in my example, CP Optimizer ends up in this part ("possibility 2") of my code, but it found not only a feasible, but even an optimal solution (which CP Optimizer also claims to be optimal)! This would be a contradiction to my interpretation above.
Thank you very much for your help, Udo.
#CPOptimizer#DecisionOptimization