Originally posted by: Vgoel77
I have a CP model built with the scheduling functionality. Interestingly, I find that the model reports a solution with objective 1757 as optimal. However, I know there is a better solution (with objective 1509; I am minimizing) that I can generate with my MIP model. When I add constraints to the CP model that fix the variables to that different solution, CP "finds" that solution and reports that as optimal.
Why does CP not find this better solution and why does it think that the worse solution is optimal? In fixing the solution, all I am doing is setting PresenceOf select intervals to 1, setting startOf these intervals appropriately, and setting HeightAtEnd for some intervals based on the solution.
Here is the log from the solve with the variables free !
! Minimization problem - 5574 variables, 6067 constraints, 1 phase
! Preprocessing : 2555 extractables eliminated
! DefaultInferenceLevel = Low
! LogVerbosity = Verbose
! LogPeriod = 1
! SearchType = Restart
! Workers = 1
! TimeLimit = 300
! Initial process time : 0.09s (0.06s extraction + 0.03s propagation)
! . Log search space : 39511.9 (before), 29903.4 (after)
! . Memory usage : 18.4 MB (before), 26.2 MB (after)
! . Variables fixed : 1310
! Using sequential search.
...
!
! Search terminated normally, 1 solution found.
! Best objective : 1757.35 (optimal - effective tol. is 0.175735)
! Number of branches : 9331
! Number of fails : 3916
! Total memory usage : 47.5 MB (39.6 MB CP Optimizer + 7.9 MB Concert)
! Time spent in solve : 7.73s (7.67s engine + 0.06s extraction)
! Search speed (br. / s) : 1215.7
!
Found solution
Here is the log from the solve with the variables fixed !
! Minimization problem - 5574 variables, 6577 constraints, 1 phase
! Preprocessing : 2729 extractables eliminated
! DefaultInferenceLevel = Low
! LogVerbosity = Verbose
! LogPeriod = 1
! SearchType = Restart
! Workers = 1
! TimeLimit = 300
! Initial process time : 0.10s (0.06s extraction + 0.04s propagation)
! . Log search space : 39511.9 (before), 0.0 (after)
! . Memory usage : 18.6 MB (before), 27.8 MB (after)
! . Variables fixed : 5574
! Using sequential search.
!
! Best Branches Non-fixed Branch decision
1 9223372036854775807 -
2 9223372036854775807 -
* 1509.14281808 2 0.14s -
1509.14281808 3 0 F -
!
! Search terminated normally, 1 solution found.
! Best objective : 1509.14 (optimal - effective tol. is 0.150914)
! Number of branches : 3
! Number of fails : 2
! Total memory usage : 44.4 MB (36.4 MB CP Optimizer + 8.0 MB Concert)
! Time spent in solve : 0.15s (0.09s engine + 0.06s extraction)
! Search speed (br. / s) : 32.1
!
Found solution
That does not make sense to me. Any help will be appreciated#CPOptimizer#DecisionOptimization