Amy wrote:
>
> Just provide you additional information. I tried another example, and
> CPLEX does use my heuristic after adding that set of inequalities. But
> I'm still investigating why CPLEX doesn't use my heuristic for my
> first example.
>
If CPLEX does accept the heuristic solution most of the time, then I
suspect the code is generally correct. For the one example where the
heuristic solution is not accepted, are you sure it is a feasible
solution to the IP?
You might try adjusting CPLEX's tolerance parameters (both constraint
tolerance and integrality tolerance) to be slightly looser, and see if
that causes the one problematic instance to work. Perhaps it is just a
rounding problem.
/Paul