Skip to content

Read the HiGHS best bound from LpSolveStats - #245

Merged
andig merged 1 commit into
mainfrom
fix/highs-best-bound
Oct 16, 2026
Merged

andig merged 1 commit into
mainfrom
fix/highs-best-bound

Conversation

@andig

@andig andig commented Oct 16, 2026

Copy link
Copy Markdown
Member

closes #206

pulp 4.0.1 ships coin-or/pulp#956 and coin-or/pulp#957. _stage_gap reads stats.best_bound for both solvers now: HiGHS reports it natively, CBC's is what pulp already parses from the log it is handed as logPath, the same value _cbc_gap read with its own regex. _cbc_gap and src/optimizer/highs.py are deleted, pulp.HiGHS builds the model in bulk itself.

BulkHiGHS had to go with the bump: it still negated the objective of a maximised problem, pulp 4.0.1 passes the sense to HiGHS natively, so with the copy left in place stats.best_bound came back in the wrong sense. test_stopped_cost_stage_reports_its_gap pins the sense on a stopped solve.

tests/test_app.py::test_optimizer[020] fails on this machine on main too, by 0.6 ct with the local cbc; unrelated to this change.

🤖 Generated with Claude Code

pulp 4.0.1 ships coin-or/pulp#956 and #957: HiGHS reports its best bound in
LpSolveStats and builds its model in bulk. The cost stage gap now comes from
stats.best_bound for both solvers, the CBC log parsing and the local BulkHiGHS
copy of #957 go.

closes #206

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@andig andig added the enhancement New feature or request label Oct 16, 2026
@andig
andig merged commit df9cc55 into main Oct 16, 2026
1 check passed
@andig
andig deleted the fix/highs-best-bound branch October 16, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read the HiGHS best bound from LpSolveStats once pulp releases it

1 participant