See here for a much better version of this code by @lyeskhalil
-
Callback function is in
Callback.cpp
-
To use the callback function, add it to the CPLEX env before calling CPXmipopt:
status = CPXsetusercutcallbackfunc(mainEnv, cutCallbackShareRootCuts, this); DBG_IF_RETURN(status, 1, "Error setting cut callback");
Hello, thank you for the code. Since the file has the .cpp extension, I was wondering if the code can run in C++ API? Thank you.