1

I'm solving an integer linear programming problem with CPLEX 12.7 using a branch-and-cut framework. I'm using the CPLEX callable library in C++.

Therefore, I implemented an UserCutCallback callback. However, it takes a very long time to separate my cuts, and I'm interested in running this callback only during the processing of the root node and disables it thereafter.

Please, anyone knows how can I run a UserCutCallback only in the root node?

Iago Carvalho
  • 410
  • 1
  • 5
  • 15

1 Answers1

0

You can check in the callback whether it is invoked at the root node and return immediately if not. In order to check whether you are at the root you can use the callback's getNnodes() function.

You may want to look at the reference documentation for UserCutCallbackI. There are some functions that might be of interest for you, for example isAfterCutLoop() or abortCutLoop().

Daniel Junglas
  • 5,830
  • 1
  • 5
  • 22