[Coin-discuss] Setting parameters of Cbc

Brady Hunsaker bkh at member.fsf.org
Mon Feb 4 21:53:43 EST 2008


Michal,

You're correct that OSI can't handle your request right now (without 
solver-specific code).

It would be nice to expand the parameters handled by OSI, but the 
challenge is always the need to only include parameters that are 
supported by all solvers.  The idea of suppressing as much output as 
possible does seem to be universal, and in my opinion is a good 
candidate for addition to the OSI parameter set.  However, adding any 
parameter at all requires some consensus-building in addition to the 
coding work.

Brady

Michal Kaut wrote:
> Dear John,
> 
> thanks for the quick response.
> 
> John J Forrest wrote:
>> Look at Cbc/examples/minimum.cpp to see use of setLogLevel
> 
> Well, this shows the solution I have mentioned in my question.
> I guess I should have stressed that my starting point is a an 
> OsiSolverInterface object, not CbcModel, and that I want to write the 
> code in the way that will allow me to change a solver just by changing a 
> couple of lines at the start. (Actually, I change the solver just by 
> changing the target in my IDE.)
> 
> For this reason, I would like to avoid solver-dependent solutions - and 
> as far as I can see, writing .getModelPtr()->setLogLevel(0) is a 
> Cbc-specific code..
> (I can - and at the moment I do - solve it by some #ifdef lines, but I 
> wanted to know if there is more generic way - guess there isn't...)
> 
> Thanks anyway.
> 
> 
> Regards,
> Michal
> 
> 
> 
>> *[Coin-discuss] Setting parameters of Cbc*
>>
>>
>> *Michal Kaut * 	to: 	Discussions about open source software for 
>> Operations Research         	
>>
>> ------------------------------------------------------------------------
>>
>> Hello,
>>
>> how do I pass parameters do Cbc? I was trying to decrease (switch off)
>> the Cbc's output using setHintParam(OsiDoReducePrint), but it only
>> affects the underlying solver (Clp).
>> I checked the source and it really looks like all params are passed
>> directly to the underlying solver (if I read it correctly).
>>
>> I found that I can do "getModelPtr()->setLogLevel(0)", but I do not like
>> this solution, as it is solver-dependent. Is there some better/easier way?
>>
>> Thanks
>>
>> Regards,
>> Michal Kaut
>> _______________________________________________
>> Coin-discuss mailing list
>> Coin-discuss at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/coin-discuss
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Coin-discuss mailing list
>> Coin-discuss at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/coin-discuss
> _______________________________________________
> 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