Originally posted by: frangio
Sorry to re-ignite this old posting, but we have an issue. Similarly to another thread, we have an alternative LB computation (a Lagrangian one, as you may guess) that we can potentially use to fathom nodes. As suggested in the threads I could find here, we tried to implement this in a branchcallback.
Now, the suggestion in the threads basically boils down to this: in the branchcallback, do
if( my bound is > than the incumbent value ) {
nodecnt = 0;
*useraction_p = CPX_CALLBACK_SET;
}
else
*useraction_p = CPX_CALLBACK_DEFAULT;
Unfortunately, this does not work for us (at least on Cplex 12.4): we got an Error 1006 when the branchcallback returns, which we don't know how to interpret.
Yet, at least one thing is clear: setting
nodecnt = 0;
makes no sense at all, since this is a change to a local variable that is not "seen" outside. Is the idea instead that we should call
int CPXbranchcallbackbranchbds( CPXCENVptr env , void *cbdata , int wherefrom ,
double nodeest , int cnt , const int * indices ,
const char *lu , const int *bd , void *userhandle ,
int *seqnum_p )
within our branchcallback with cnt = 0? Is it because we don't do that that we get the error 1006?
Thanks in advance
Antonio Frangioni
#CPLEXOptimizers#DecisionOptimization