[Cbc] Call heuristics only after all cuts have been added

John Forrest john.forrest at fastercoin.com
Sun May 9 03:44:59 EDT 2010


Haroldo,

You should be able to do something close to what you want by setting
options.

One problem with feasibility pump is that it is normally deleted after
first round of heuristics.  This can be stopped by setting some options.
It is a whole set of tuning parameters but use
fpump.setFeasibilityPumpOptions(1000040); !!

You should be able to say do fpump only after root cuts by
fpump.setWhereFrom(2);

However some heuristics call a small branch and cut which may itself
call heuristics which will have different settings.

A more flexible method would be to derive a new class from feasibility
pump which just overrides the virtual shouldHeurRun function.  This
could then look at CbcModel and parent model etc etc to see what state
code is in and decide whether to run heuristic.

I hope that helps get you started.

John Forrest


On Sat, 2010-05-08 at 11:14 -0300, Haroldo Santos wrote:
> Dear Forrest/CBC developers,
> 
> I've been using with success the feature described in  the example
> allCuts.cpp : constraints are dynamically added to define the MIP (and
> not only to cut fractional solutions). This featured has allowed me to
> speed up a lot the solution process and to work with much larger
> problems.
> 
> There is only one problem: when I added the Feasibility Pump (FP)
> heuristic cbc calls this heuristic *before* adding the cuts that
> define the problem so that FP find an invalid integer solution.
> 
> How can I change this behavior so that FP (or any other heuristic) is
> called only after all cuts have been added ?
> 
> 
> Thanks in advance,
> 
> Haroldo
> 




More information about the Cbc mailing list