Originally posted by: Lessi
I use the callback function to estimate how long a solution is found. Without the callback function, it took about 100 secs, and with the callback function, it took more than 5 minutes. What should I do to obtain the similar performance to the one without the callback function.
Another question, I set the optimal gap is 1%, so why the solver stopped with the gap 9.36%. There are other runs with other instances that the gaps were 0.0%
This is the callback function
IloNum bestSolnTime;
ILOINCUMBENTCALLBACK0(BestSolnCPUTimeCallback)
{
bestSonTime = cplex.getTime();
}
Without callback function
39298 6818 2568.0000 11 2650.0000 2402.0000 380691 9.36%
39299 6818 2568.0000 10 2650.0000 2402.0000 380694 9.36%
Elapsed time = 98.84 sec. (51366.20 ticks, tree = 8.45 MB, solutions = 3)
Cover cuts applied: 2
Flow cuts applied: 4
Mixed integer rounding cuts applied: 3
Gomory fractional cuts applied: 1
Root node processing (before b&c):
Real time = 0.88 sec. (306.66 ticks)
Sequential b&c:
Real time = 100.13 sec. (52188.00 ticks)
------------
Total (root+branch&cut) = 101.00 sec. (52494.65 ticks)
Objective value:2650
With callback function
185848 152322 2506.0000 8 2650.0000 2241.0000 2050007 15.43% z_1.638 D 185848 185847 449
185849 152323 2506.0000 8 2650.0000 2241.0000 2050009 15.43% z_1.642 D 185849 185848 450
Elapsed time = 321.80 sec. (142953.75 ticks, tree = 170.72 MB, solutions = 3)
.....
Thanks,
Lessi
#CPLEXOptimizers#DecisionOptimization