I am using cp.next() in an optimization problem. As I know cp.next(), after finding a better solution with objective value Z*, imposes a new constraint (Objective Function <Z*) (assuming a minimization problem). Since I am using CP optimizer to solve the subproblem of a column generation model, I am not necessary looking for the optimal solution and solution with good negative reduced cost are ok to me. So, this new optimality cut (Objective Function <Z*) is not appropriate to me and I want to apply a relaxed version of this cut like (Objective Function <(1.2)*Z*). It means that I wanna impose CP optimizer to find solutions which are at most 20% more costly than the best current objective value.
I think that I can remove the objective function and add my optimality cut during search in cp.next(). Is it right?
The only question is how to add the new optimality cut in the loop of cp.next(). I found out that I can I can use cp.add() to add my cut during the search, but the my objective function has been calculated by IloNumExpr which does not match with the argument of cp.add(). What can I do?
my code is like this:
IloNumExpr OBJECTIVE = IloNumExpr(env,0);
//Building the objective expression
//cp.add (OBJECTIVE< (1.2)*Z*)
Sorry for my long post and thanks in advance for your help