[Coin-discuss] Osi interfaces do not return MIP status appropriately!
Vishy Jeet
vishv.jeet at gmail.com
Wed May 16 13:24:16 EDT 2007
Thanks Laszlo,
This is wonderful. It just works...
regards,
vishy
On 5/16/07, Laszlo Ladanyi <ladanyi at us.ibm.com> wrote:
>
>
>
> 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
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20070516/8e8a0ab8/attachment.html>
More information about the Coin-discuss
mailing list