Skip to content

docs: document CBC solver output behavior - #132

Closed
DuexDEVG wants to merge 6 commits into
rust-or:mainfrom
DuexDEVG:docs/document-cbc-output
Closed

DuexDEVG wants to merge 6 commits into
rust-or:mainfrom
DuexDEVG:docs/document-cbc-output

Conversation

@DuexDEVG

@DuexDEVG DuexDEVG commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This documentation-only change explains an important behavior of the default CBC solver: it may write solver progress messages to the process's standard output while a model is being solved.

It documents the solver-specific control already exposed by the coin_cbc integration: model.set_parameter("log", "0") suppresses much of CBC's progress output, but does not guarantee completely silent output across CBC/CLP versions. It also clarifies that good_lp does not currently provide a solver-independent output-suppression switch. Users whose applications require fully silent solver output are directed to consider another solver and to verify that solver's behavior for their deployment.

The note is placed in the CBC section of the solver documentation, where users are already evaluating solver-specific trade-offs, and links to issue #117 for context.

Why

Issue #117 reports unexpected solver output when solving multiple problems. The existing documentation describes CBC's installation requirements and performance characteristics, but does not mention its output behavior or the available CBC-specific parameter. Documenting both prevents users from discovering the limitation only after integrating the default solver into an application.

Scope

  • Documentation only; no solver behavior or public API is changed.
  • No claim is made that issue How to suppress solver output? #117 is fixed at the implementation level.
  • The wording distinguishes CBC-specific configuration from the absence of a solver-independent API.

Validation

  • cargo fmt -- --check
  • git diff --check
  • Reproduced the behavior with the repository's coin_cbc 0.1.8 integration and CBC 2.10.12 under WSL2 Ubuntu: log=0 removed the main progress output while Presolve and Optimal objective summary lines remained on stdout.

@KnorpelSenf KnorpelSenf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the root cause here isn't that good_lp doesn't provide an option, it's that CBC doesn't provide an option we could expose. The solver itself has unremovable logs.

Can you update the attribution of the bug, and also wrap it in a block quote (prepend >)?

@DuexDEVG

DuexDEVG commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Updated — moved the note to a blockquote and clarified that this is CBC's
limitation, not good_lp's. Thanks for the catch!

Comment thread README.md Outdated
@KnorpelSenf
KnorpelSenf requested a review from lovasoa August 2, 2026 18:56
@lovasoa

lovasoa commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator
image

🤨

@DuexDEVG I don't have anything against AI assistance, but I'd rather you :

  1. talk to us directly in pr descriptions and github comments, at least to show understanding of the code that was generated. This helps establish trust.
  2. declare the amount of ai help. If a PR was fully generated given just an issue description, it will require more scrutiny on our side than if you understand the issue at stake yourself and can vouch for the AI's solution.

@DuexDEVG

DuexDEVG commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@lovasoa Thank you for the candid feedback. You are right that I should have disclosed this earlier.

I used substantial AI assistance for repository exploration, implementation, test planning, validation commands, and PR wording. I reviewed the relevant code and verified the documented behavior locally and in CI, but I understand that this still requires additional scrutiny when the contribution is AI-assisted.

Going forward, I will disclose the extent of AI assistance in PR descriptions and discuss design questions before implementing a solution. Thank you for pointing this out.

Comment thread README.md Outdated
Comment on lines +104 to +109
> **Note:** CBC itself does not provide a way to fully suppress its solver
> progress output; this is a limitation of the underlying CBC library,
> not of `good_lp`'s API. If silent solver output is a requirement for your
> application, consider selecting another solver from the table above and
> verify its output behavior for your deployment. This limitation is
> tracked in [issue #117](https://github.com/rust-or/good_lp/issues/117).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually true ? I asked an llm to check and it's telling me it's wrong.

let mut model = vars.maximise(objective).using(coin_cbc);
model.set_parameter("log", "0");

does seem to remove output

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested with coin_cbc 0.1.8 and CBC 2.10.12 - set_parameter("log", "0") cuts down
most of CBC's output but doesn't fully silence it, still seeing Presolve... and
Optimal objective... lines on stdout. helps but not 100%. i'll update the readme
to mention log=0 and make clear it reduces output rather than guaranteeing
silence

@lovasoa

lovasoa commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

@DuexDEVG , excuse me for the stupid question, but: were you affected personally by the issues the ai was pointed to ? what are your goals here ?

@DuexDEVG

DuexDEVG commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@lovasoa honest answer - no, I wasn't personally hit by this issue. I'm using this as
a way to practice contributing to real open source projects and build up
experience with codebases beyond my own. I try to pick things I can actually
verify and understand rather than just opening PRs for the sake of it, but
you're right that it's not coming from a personal pain point here. sorry

@lovasoa

lovasoa commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Hi everyone :) sorry for the duplicate comment across prs and issues. Here is my suggested solution to the cbc verbosity issue in good_lp: expose Cbc_setLogLevel and set it to zero by default. I see the rust binding hasn't been updated in a long time and has old open issues. If the project is stale, just let us know and we'll switch to a different default solver in good_lp.

Cross-references: coin_cbc PR #38, good_lp PR #134, good_lp PR #132, and good_lp issue #117.

@lovasoa

lovasoa commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

@DuexDEVG hey, no problem. Here is my personal advice. feel free to ignore it. If I were you, I would focus on things that matter most to me personally. There is so much oss software that there must be some that you both use every day, and feel could be improved. then I would use the ai to teach how the software works to me, help me build a mental model. then i would discuss the options to solve the issue, the different tradeoffs involved, investigate broader and narrower fixes. Then I would open a pr explaining the work in my own words. Even if english is not your native language, broken english often comes off better than ai prose. I would not try to maximise how many issues I fix, but to maximise how good I'm getting at understanding software bugs, the tradeoffs involved in fixing them and the communication with others. These skills are probably going to be more useful in the future than being good at prompting 2026's models.

@DuexDEVG

DuexDEVG commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@lovasoa thank you, really appreciate you writing this out. i want to be honest
though - i wasnt really chasing numbers, i just wanted to contribute and learn
something real in the process. using ai here was less about producing fast and
more about understanding the codebase and getting feedback from people who
actually know this stuff, like right now with you. this whole thread already
taught me more than i expected tbh

@lovasoa

lovasoa commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

thanks, no problem. closing this in favor of #134

@lovasoa lovasoa closed this Aug 2, 2026
@DuexDEVG
DuexDEVG deleted the docs/document-cbc-output branch August 2, 2026 20:19
@lovasoa lovasoa linked an issue Aug 6, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to suppress solver output?

3 participants