Originally posted by: StephanBeyer
Hi,
I have a model (maximization problem) where I know that the optimal (maximal) integral objective value is an even integer. Since the relaxation is rather weak, the CPLEX search finds a lot of odd and fractional lower and upper bounds. So I hoped I can find an easy way to impose some "even" constraint into the model, such that the relaxation does better (due to improved upper bound) and more lower values are cut off (due to improved lower bound).
I thought I knew how to do it for the upper bound: add a UserCutCallback where the getBestObjValue() is compared to the maximum even number "newUpperBound" which is not larger than getBestObjValue() ... however, when I add a new constraint Objective <= newUpperBound (and I do not add locally!), I still get a lot of UserCutCallback debug outputs that shows me that the best objective has not been improved. So I guess I'm doing something wrong.
My questions:
1) What is the best way to impose a "we have an even optimal solution!" constraint for upper bounds?
2) And what should I do for lower bounds?
Thank you!
Stephan
#CPLEXOptimizers#DecisionOptimization