Group: sci.op-research
From: Paul Rubin
Date: Sunday, March 02, 2008 5:16 PM
Subject: Re: about heuristic callback

Amy wrote:
> Hi, All,
>
> I'm using Java + cplex10.0 to solve my MIP problem. I want to use my
> own heuristic in branch-and-bound. My heuristic uses sequential
> rounding scheme, so it needs solving LP. In the heuristic callback, I
> create another model (heurCplex), and use setVectors method to pass
> the LP solution of the original model (orgCplex) to the variables of
> model heurCplex ( it is successful). After I apply my heuristic, I try
> using setVectors (also tried setSolution)method to pass the IP
> solution of model heurCplex to the variables of model orgCplex, but it
> is not successful. When I run the MIP, I found that cplex doen't use
> my heuristic at all even my heuristic performs better. Do you know how
> to pass the IP solution of the model heurCplex to the variables of the
> original model?
>

setSolution is the correct approach. Are you sure that the heuristic
solution is both feasible and better than CPLEX's incumbent solution?
If not, CPLEX will ignore it.

/Paul