Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add loglevel control to Osi #11

Open
svigerske opened this issue Mar 2, 2019 · 2 comments
Open

Add loglevel control to Osi #11

svigerske opened this issue Mar 2, 2019 · 2 comments
Labels
enhancement New feature or request Osi Base Class

Comments

@svigerske
Copy link
Member

Issue created by migration from Trac.

Original creator: @lleeoo

Original creation time: 2006-10-24 22:34:09

Assignee: @mjsaltzman

Version: 1.0

CC: @mjsaltzman

As of v 0.95, there is no direct loglevel control in Osi. Indirectly, one can use passInMessageHandler, but this typically has limited effect, since each solver has its own message handling mechanism in addition to Osi's. Instead, this ticket proposes two enhancements:

  1. make passInMessageHandler virtual, so that solver-specific actions can be taken when the Osi message handler is replaced.

  2. add virtual set/get logLevel(int) methods, which would provide a sufficiently general high-level control of messaging. What the actual int means should be left up to the solver.

@svigerske
Copy link
Member Author

Comment by @LouHafer created at 2008-01-08 22:52:00

Essentially unchanged as 0.97 moves to 0.98.

You can use messageHandler()->setLogLevel() to adjust the log level of the OSI handler, and the OsiDoReducePrintLevel hint to (try to) affect the print level of the solver. But this is admittedly clumsy. Most annoying, there's no way to get at the message handler for a CoinMpsIO
object, which by default is annoyingly chatty.

There's a lot to be said for virtual methods here, because Leo's right --- each underlying solver has its own i/o control.

@svigerske
Copy link
Member Author

passInMessageHandler() is virtual in current Osi code and a number of OsiXyz implementations use it to setup the solvers message handling. Regarding setLogLevel(), many OsiXyz implementations check the loglevel in the message handler when it comes to a solve and set the solvers loglevel parameter accordingly.

@svigerske svigerske removed the major label Mar 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Osi Base Class
Projects
None yet
Development

No branches or pull requests

1 participant