Originally posted by: SystemAdmin
[EdKlotz said:]
> I'm using a Callback to stop B&C resolution regarding personnal criteria. To stop the
> resolution, I call the abort() method in my callback. The problem? If I specify a Polishtime,
> the incumbent solution is polished, where I expect the resolution is totally stopped. And I
> have no way to stop manually the polishing.
>
>Is there a way to stop totally a resolution, using a callback, even with a polish time ?
> specified ?
Yes, you can do this. With CPLEX 11.0, use the IloCplex::MipInfoCallback class, which
will be called right after solution polishing starts. See the ilomipex4.cpp example for
more details on usage of this class. Note that solution polishing actually invokes CPLEX's
branch and bound code, but it does so with very particular settings that heavily apply
some local search heuristics to improve upon the existing solution. So, CPLEX will still invoke
callbacks during solution polishing, but the time between invocations may be signficant, as
each node can take a long time.
With CPLEX 10.2 and earlier, use IloCplex::MIPInfoCallback.
Note that you can also do this without making use of callbacks. First do your run
without setting polishing time. When it terminates, if you don't want to do solution polishing,
just proceed to whatever the next step is you want to do in your program. If you do want
polishing, set a time limit of 0, the polishing time limit to the value you want, then resume the
optimization from where it left off. The regular branch and bound part will stop immediately due to the time limit of 0, then polishing will proceed.
#CPLEXOptimizers#DecisionOptimization