Originally posted by: SystemAdmin
>
> The reason why I want to add it to the node lp before solving it is , I already have this cut immediately after a binary is fixed to 1. Therefore I don't need to solve the node lp to get the cut. By adding this cut as a constrain before solving it, I hope it can save some computation.
I'm not sure how much computation it will save, but I think you can do what you want by using a branch callback. At each node, after solving the node LP (and assuming the node is not pruned after solving the node LP), CPLEX will call your branch callback and give you the option to create one or two child nodes. The way you create a child node is by adding one or more local cuts. So you can add the "fix x_j = 1" cut to one child and the "fix x_j = 0" cut to the other, and simultaneously add your new cut to the first child (and, by inheritance, all of its descendants).
> If I understand you correctly, cut callback is the only way to throw in constrains into node lp? I can not just get the pointer to node lp and add new rows to it in solve callback. Did I get you correctly?
No, you can add cuts via both cut and branch callbacks -- but not in a node callback (AFAIK).
> If this is the case, then I have no choice but to use cut callback. Hope dual simplex will make the resolving efficient.
It should. The disadvantage of the branch callback approach is that you have to decide on which variable to branch. It's not a major disadvantage: you can use the getBranches method to ask CPLEX how it was planning to branch, and then use the same branching with your extra cut. On the other hand, the only question with the cut callback (which IMHO is easier to implement) is whether adding the cut after solving the LP will result in a large number of dual simplex pivots or a fairly small number of extra pivots.
/Paul
#CPLEXOptimizers#DecisionOptimization