Originally posted by: SystemAdmin
Shahin,
>
> typically when one switches the heurfreq to -1 the heuristic must stop, no matter which kind of heuristic.
There is a separate parameter (RINSheur) that controls the frequency of the RINS heuristic, and another one (LBHeur) that controls the local branching heuristic (but this one is apparently off by default). I'm not sure whether probing can generate an incumbent -- you might need to turn that off as well. AFAIK, there is no single "master switch" to shut off all heuristics.
> That is not what is happenning and I still get solutions which are found by heuristic and are not available in cutcallback.
> Is there any way to enforce "all" integer solution pass through the cutcallback.
> of course there is a possibility to send incumbents by programming tricks but it has alot of overhead as the number of such variables is quite big and the memory is restrictive.
I don't like to turn off the heuristics, since they frequently generate a good solution sooner than straight branch-and-cut would find it. My solution involves a branch callback (as well as the incumbent and cut callbacks). I maintain a queue of new cuts in my program memory. If the incumbent callback (which is called for any incumbent, no matter how found) dislikes an incumbent, it queues one or more cuts and rejects the incumbent. If the cut callback sees a nonempty queue, it adds all the cuts in the queue and purges and purges the queue. If the branch callback sees an empty queue, it lets CPLEX handle branching. If it sees a nonempty queue, that means an incumbent was rejected after the cut callback was done. In that case, the branch callback creates a single child node by adding the cuts in the queue, but does not purge the queue (because those cuts are local to the subtree, and I want the cut callback to add them globally). So the result is an "only child" node that is essentially identical to what the current node would look like if the cut callback had been called there one more time.
I don't typically bother with a node callback, which would be necessary if I wanted CPLEX to process the new node first. I let CPLEX decide whether to work on the new child or defer it until later based on bound.
HTH,
Paul
Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
#CPLEXOptimizers#DecisionOptimization