Group: sci.op-research
From: Amy
Date: Monday, March 03, 2008 5:11 PM
Subject: Re: about heuristic callback

On Mar 2, 5:16 pm, Paul Rubin wrote:
> 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

Hi, Paul,

Thanks for your reply. Now setSolution works for my MIP basic model.
But it doesn't work when I add inequalities to the basic model. At the
root node, my heuristic can give an IP solution and CPLEX cannot find
any IP solution. I add the inequalities as follows ( I don't use the
cutcallback function):

1. solve LP
2. add inequalities
3. solve LP with added inequalities

repeat steps 2 and 3 for multiple iterations until no violated
inequalities could be found, then solve the strong formulation as IP.

Do you know where the problem is? Thanks,

Amy