[Coin-discuss] Osi interfaces do not return MIP status appropriately!

Laszlo Ladanyi ladanyi at us.ibm.com
Wed May 16 13:02:05 EDT 2007



On Wed, 16 May 2007, Vishy Jeet wrote:

> For some reason the function call getModelPtr() which is obviously a much
> cleaner approach didn't work, since I could not compile my Flopcpp program
> if I access getModelPtr() function.
> I get the following error
> 
> error: 'class OsiSolverInterface' has no member named 'getModelPtr'
> 
> I know getModelPtr() is declared in 'class OsiCbcSolverInterface' not in
> 'class OsiSolverInterface'  but I don't know how to tell it to my Flopcpp
> program. In fact from Flopcpp I can't even call Solver->branchAndBound()
> function directly.

First you got to dynamic cast the pointer to the solver into a
OsiCbcSolverInterface* object, then use the getModelPtr() method:

    dynamic_cast<OsiCbcSolverInterface*>(solver)->getModelPtr()

--Laci




More information about the Coin-discuss mailing list