[Coin-discuss] How to choose a MIP solver in GLPK OSI?

Michal Kaut mail at michalkaut.net
Tue Jun 26 08:48:01 EDT 2007


Hello,

thanks for the help.

Now, I can both run the new MIP solver and get the values back to 
FlopCpp (thanks, Tim).
There is, however, one problem: to get the objective value and the 
variable values, I have to be able to set bbWasLast_ to one. However, 
bbWasLast_ is a private member of OsiGlpkSolverInterface with no set (or 
get) method.

Is there any particular reason the set method does not exist?
(I could, of course, just add to my local version, but I do not fancy 
doing any changes that will just disappear in the next update of the 
library - not to mention that I have at least four copies of Osi on my 
disk, as it is needed by several different projects...)


Thanks a lot.

Regards,
Michal Kaut


Tim Hultberg wrote:
> You can downcast to a specific osi solver interface from flopc++ like
> this: 
> 
> "This is the (not very sexy) way to set the relative termination
> tolerance in Flopc++/CBC
> dynamic_cast<OsiCbcSolverInterface
> *>(MP_model::getDefaultModel().operator->())->getModelPtr()->setAllowableGap(0.1);"
> 
> Tim
> 
>>>> Michal Kaut <mail at michalkaut.net> 18/06/2007 11:56 >>>
> Hello,
> 
> I have a MIP problem that GlpSol with "--intopt" solves in 0.2 seconds,
> 
> but won't solve at all without the option  (I let it run over the 
> weekend, it did not even find a feasible solution...)
> 
> Unfortunately, using GLPK OSI uses the old/original lpx_integer() 
> method, which is equivalent to running glpsol without parameters - and
> 
> hence useless for my problem.
> Is there a way (in OSI) to use lpx_intopt() instead of lpx_integer(), 
> other than rewriting OsiGlpkSolverInterface::branchAndBound() and 
> re-compiling OSI?
> 
> I found a discussion on coin-osi-devel from March 2006:
> http://list.coin-or.org/pipermail/coin-osi-devel/2006-March/000002.html
> 
> Has anything changed since then? I really believe that it is important
> 
> that OSI has some (preferably simple-to-use) interface to 
> solver-specific options.
> 
> Note: In the discussion, they mention downcasting/direct call of the 
> GLPK function. Would it work also from FlopCpp? If so, could someone 
> show me how?
> 
> 
> Thanks a lot in advance.
> 
> 
> Regards,
> Michal Kaut
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org 
> http://list.coin-or.org/mailman/listinfo/coin-discuss



More information about the Coin-discuss mailing list