[Coin-discuss] Setting parameters of Cbc

Matthew Saltzman mjs at CLEMSON.EDU
Mon Feb 4 22:14:57 EST 2008


On Mon, 2008-02-04 at 21:53 -0500, Brady Hunsaker wrote:
> 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.

I don't think there's a lack of consensus that it would be desirable.

I believe there are some other issues with the way log files are handled
and the possibility of suppressing all output.  Last time we looked at
it, it was difficult to manage logs effectively across solvers in a way
that gave the user enough control portably.  Every solver handles logs
differently enough that a universal wrapper looked to be very difficult.

> 
> 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
> 
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
-- 
                Matthew Saltzman

Clemson University Mathematical Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs




More information about the Coin-discuss mailing list