Originally posted by: VKV7_Anulark_Naber
I now applied an IncumbentCallback to use the information (objective function value) of a new incumbent to update the parameters that will be used in UserCutCallback, so the cuts will be tighter. In the documentation, it says "The user-written callback will be called each time a new incumbent solution has been found, including when solutions are provided by the user's heuristic callback routine." However, it does not seem that the incumbent callback is called everytime a new solution is found. As you can see in the log output of running 1 thread shown below, there is some delay until it is invoked. How can I force cplex to invoke incumbentcallback every time, or shouls I use any other callback to do the job? This model does have lazy constraints (in a table), and the new incumbent should satisfy the lazy constraints.
I also need to mention that when I interrupted solve() when a new incumbent is found, the incumbent callback was not invoked when the last solution is found either. I do not prefer this interruption, because when restart, cplex thows out all cuts, and therefore I changed to implement the above incumbentcallback.
* 1259+ 828 45.3522 41.2124 33900 9.13%
Table: 3
Found incumbent of value 45.352156 after 1.81 sec. (1495.45 ticks)
1259 828 45.5000 0 45.3522 41.2124 33900 9.13% ChangeRes#16 U 1259 1256 48
Table: 4
-------------Update Parameters with 45.3522
* 1369 774 integral 0 45.2893 41.2124 35896 9.00% ChangeRes#13 D 1369 1368 54
Table: 4
Found incumbent of value 45.289336 after 15.92 sec. (3477.92 ticks)
1686 977 44.7893 18 45.2893 41.2124 41656 9.00% AfterStop#44 D 1686 1684 18
1915 1093 42.8032 20 45.2893 41.2124 48136 9.00% AfterStop#34 D 1915 1914 16
Table: 2
2790 1625 41.6561 49 45.2893 41.2124 74035 9.00% AfterStop#44 D 2790 2789 15
Elapsed time = 17.13 sec. (4912.57 ticks, tree = 14.04 MB, solutions = 2)
-------------Update Parameters with 45.2893
* 2978 881 integral 0 43.2783 41.2124 77404 4.77% AfterStop#11 U 2978 2975 52
Table: 11
Found incumbent of value 43.278333 after 19.58 sec. (5462.15 ticks)
-------------Update Parameters with 43.2783
* 3078+ 892 43.1734 41.2124 79312 4.54%
Found incumbent of value 43.173413 after 20.42 sec. (5594.19 ticks)
-------------Update Parameters with 43.1734
* 3078+ 871 43.0237 41.2124 79312 4.21%
Found incumbent of value 43.023718 after 25.59 sec. (6433.54 ticks)
-------------Update Parameters with 43.0237
* 3078+ 780 42.8476 41.2124 79312 3.82%
Found incumbent of value 42.847564 after 28.27 sec. (6935.46 ticks)
3078 782 42.2583 19 42.8476 41.2124 79312 3.82% AfterStart#95 D 3078 3077 11
Table: 2
4139 1415 42.2583 18 42.8476 41.2124 103480 3.82% AfterStart#36 D 4139 4138 22
5244 2176 42.2583 7 42.8476 41.2124 127335 3.82% AfterStart#58 U 5244 5243 18
6417 2974 41.9856 24 42.8476 41.2124 150945 3.82% ChangeRes#3 D 6417 6416 16
Table: 6
#CPLEXOptimizers#DecisionOptimization