When I tried to use Java to call CPLEX and use callback functions to solve a VRP problem with branch-and-cut, some problems emerged.
I took out the subtour elimination constraint from the original problem, and used it as
lazyconstraint. When I only used it as a
lazyconstraint, the algorithm worked out very well, but when I used it as both
lazyconstraint Java program couldn't stop, it kept calling
node0 and wouldn't make branch. I really don't know what the problem is.
Does CPLEX loop calling
usercutCallback at each non-integer node until no usercut are violated, and then make branch? If so, can I set the maximum number of calls at each node? Maybe just one time is ok.
Another problem is why it kept generating the same cut. I think when cut A has been already added, even if I generate A again in the next loop, it should have been satisfied so that no
usercut is violated and the loop should be stopped.