Group: sci.op-research
From: olr3@yahoo.com
Date: Thursday, November 15, 2007 8:14 AM
Subject: Re: Using two callbacks in CPLEX with JAVA

On Nov 15, 4:20 am, "raskorasko" wrote:
> Hi there,
>
> I'm currently working on a network design problem so that I have to solve a
> quite hard IP (not MIP; there are no continuous variable).
>
> I'd like to use a sort of branch-and-cut, with the following modifications:
>
> - When we reach an integer node in the B-C tree, we have to solve some
> auxiliary LP to test whether a global cut can be added to the problem. If we
> find such a cut, we add it to the master problem as a global cut and we solve
> that node again and so on.
>
> - I want the optimizer to consider an integer solution as feasible only if no
> cuts were found solving the auxiliary LP for that node.
>
> Going through the user's manual, I think I've to use two callbacks:
>
> - IloCplex.UserCutCallback : adding my cuts
> - IloCplex.IncumbentCallback : telling the optimize whether to keep an
> integer solution
>
> However, I don't know how to use these classes in my program; reading
> "AdMIPex5.java", I think I could manage the cutcallback but I definitly don't
> know how to incopore the IncumbentCallback.
>
> Thank for any help :) !

You incorporate any callback in the same manner - create your own
class that extends the callback you need and implement your logic
within it. Then you tell Cplex to use this callback by calling
cplex.use(). In the IncumbentCallback
there is a method reject() that you can call when your feasibility
check fails.
Hope that helps.

Safety Articles | Usenet Groups | Usenet News | Bluegrass