Originally posted by: Gert-Jaap
Dear Sir/Madam,
I have been using CPLEX's (legacy) callbacks for a while and now I'm trying to switch to generic callbacks. However, there is one issue that I don't know how to solve.
The thing is that I want to write my own CPLEX-log in a specific format in some text file. In order to determine if a new incumbent solution is found, I used to call the function hasIncumbent(), and check to objective value if indeed it was an improvement. My impression was that in the generic callback environment, I would just call the callback in the Candidate context and check if I'm indeed in the candidate context to replace the hasIncumbent(). However, using a callback in the candidate environment forces the dual reductions etc to be switched off by default. Overriding this seems not to have any effect. This drastically increases solving time. I only use the candidate context for logging, and not for adding lazy constraints for example, in which case turning the dual reductions is a logical thing to do. Is there some way to check from another context (relaxation/global progress) if the current solution is an incumbent candidate?
Best,
Gert-Jaap
#CPLEXOptimizers#DecisionOptimization