[Cbc] Question about CbcEventHandler - Follow up

John Forrest john.forrest at fastercoin.com
Wed Jun 26 02:51:03 EDT 2013


Alexis,

Where is the preprocessing done?  If inside branchAndBound() could be 
tricky.  If as in Cbc/examples you have

CglPreProcess process
process.preProcess(solver,....);

then you would allocate a char array solver->getNumCols() long, zero it 
all, put 1 in position of DUMMY and
process.passInProhibited(array,solver->getNumCols()); before preprocessing.

If inside branchAndBound you could try declaring DUMMY to be an SOS set, 
but that might switch off some heuristics.

John Forrest



On 25/06/13 22:57, Alexis Guigue wrote:
> Hi John,
>
> I am going to look into this. My code looks roughly this.
>
> - I have an object OsiClpSolverInterface   m_osiClpSolver which I 
> populate with loadProblem.
> - I create from there a CBCModel object, CbcModel 
> cbcModel(m_osiClpSolver), pass it an handler OptEventHandlerCBC 
> handler2 (this is in the event function of this handler that I want to 
> retrieve the value of some particular values) 
> cbcModel.passInEventHandler(&handler2),
> - and finally  just call cbcModel.branchAndBound();
>
> Quite straightforward
>
> Thanks
>
> Alexis
>



More information about the Cbc mailing list