Originally posted by: mkadem
Thank you Mr Rubin for your reply.
First, adding cuts to force fractional values for integer variables strikes me as a bad idea. They would seem to cut off feasible (possibly even optimal?) solutions. If you want to branch on variables with integer values, I'm pretty sure you can engineer that in a BranchCallback without the extra cuts.
>In fact, i tried to branch on X variables using branchcallBack, but, i wanted to give Cplex the hand to choose the right variable. i m adding cuts only if X variables have integer values and for the set A of X that aren't fixed and have 1 as value, i added the constraint sum_{X in A }(X)<=|A|-1. In this case, Cplex will give factional value to X variable and cplex will branch on it.
Neither of those has anything to do with the order in which callbacks are called. AFAIK the branch callback is always the last callback invoked at each node, so my best guess is that your code is incorrectly determining the order in which the callbacks are invoked. If you are checking/printing node IDs to determine the order, are you using the getNodeId() method in each callback to get the node ID (and immediately printing it)?
> i m printing the variables that are fixed by cplex at each callBack and the variable that i'm going to branch on (version without cuts and i m using BranchCallback to engineer the branching). i find that cut callback is the first to be called than branch call back and finally heuristicCallback. Moreover, when branch callback announces the variable that he will branch on, in heuristic callback it is not printed as fixed.
#CPLEXOptimizers#DecisionOptimization