Skip to content

Centring status - #3456

Merged
jajhall merged 2 commits into
ERGO-Code:latestfrom
fwesselm:centringStatus
Oct 22, 2026
Merged

jajhall merged 2 commits into
ERGO-Code:latestfrom
fwesselm:centringStatus

Conversation

@fwesselm

@fwesselm fwesselm commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  1. Add CentringStatus.
  2. Only fix variables (from analytic centre) if solution is actually centred.
  3. This fixes Feasible model reported infeasible with presolve enabled #3451 and Wrong optimal objective reported with presolve enabled #3452.

Checklist

  • I have read the contributing guidelines
  • This PR targets the latest branch
  • Tests are passing
  • Documentation was updated where relevant
  • This PR is not primarily AI-generated (per the AI contributions policy in CONTRIBUTING.md)

@fwesselm
fwesselm marked this pull request as draft October 22, 2026 10:45
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.13%. Comparing base (1f304ce) to head (28117fb).
⚠️ Report is 46 commits behind head on latest.

Files with missing lines Patch % Lines
highs/lp_data/HighsInfo.cpp 50.00% 1 Missing ⚠️
highs/lp_data/HighsInfo.h 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3456      +/-   ##
==========================================
+ Coverage   75.12%   75.13%   +0.01%     
==========================================
  Files         460      460              
  Lines      112155   112175      +20     
  Branches    17779    17787       +8     
==========================================
+ Hits        84254    84287      +33     
+ Misses      27619    27606      -13     
  Partials      282      282              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fwesselm
fwesselm marked this pull request as ready for review October 22, 2026 11:43

@filikat filikat left a comment

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.

Looks good.
Centring is only available for IPX (at least for now). Maybe in the reasons why the status can be kCentringStatusNone we should mention that it can also happen if HiPO is selected.

@Opt-Mucca Opt-Mucca left a comment

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.

Looks good! Two small questions:

  • The instance takes a bit to solve (8s on my machine). Do we want this overhead to our tests? I'm not strictly against, but thought I should raise it.
  • The comment from @filikat about whether this changes the HiPO execution path. Do we now skip fixings if HiPO is used? Can we even reliably use HiPO for these fixings if it doesn't currently have centering?

Also: TIL one can actually say centring. It looks funny.

@filikat

filikat commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Interior point methods usually return well centred solutions (before crossover).
The extra centring steps are there just to improve the centrality, but they are not always needed.
You could have a function isWellCentred (similar to ipm/ipx/ipm.cc:AssessCentrality) that is agnostic of which ipm is used and of whether centring was run and/or successful.

With the current changes, centring_status would always be none if HiPO is used for analytic centre computation.

@fwesselm

Copy link
Copy Markdown
Collaborator Author

Interior point methods usually return well centred solutions (before crossover). The extra centring steps are there just to improve the centrality, but they are not always needed. You could have a function isWellCentred (similar to ipm/ipx/ipm.cc:AssessCentrality) that is agnostic of which ipm is used and of whether centring was run and/or successful.

With the current changes, centring_status would always be none if HiPO is used for analytic centre computation.

Thanks, @filikat. I am fine with updating this PR to use a method for querying whether a solution is well centred.

@filikat

filikat commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

That would probably be better.
I can write the function later or tomorrow, unless you want to give it a try.

@jajhall jajhall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This addresses the issue well, without compromising the general good behaviour of this valuable technique

@jajhall
jajhall merged commit 3a0555f into ERGO-Code:latest Oct 22, 2026
392 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants