Skip to content

Removed presolve_light option, and introduced presolve_mode option - #3536

Merged
jajhall merged 5 commits into
latestfrom
presolve-mode
Nov 5, 2026
Merged

jajhall merged 5 commits into
latestfrom
presolve-mode

Conversation

@jajhall

@jajhall jajhall commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Description

The presolve_light option is too limited now that there is the initial sweep, so presolve_light is removed, and presolve_mode option is introduced. It has four values

  • 0: default All rules on, unless PDLP is being used, in which case the "light" rules are used
  • 1: initial sweep Use initial sweep only
  • 2: light Use the light rules
  • 3: full All rules on

Setting presolve_rules_off can be used to modify the rules that are on, and rules are also switched off if they are incompatible with the postsolve that may occur.

Setting presolve_light = kHighsOnString is now achieved with presolve_mode = kPresolveModelLight

The structure of setting of rules on/off has been revised heavily in `HPresolve::chooseRules``

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)

@jajhall
jajhall requested a review from filikat November 3, 2026 17:48
@jajhall jajhall self-assigned this Nov 3, 2026
@jajhall jajhall added Enhancement New feature or request LP presolve labels Nov 3, 2026
@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.81443% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.63%. Comparing base (477af28) to head (08bf374).
⚠️ Report is 101 commits behind head on latest.

Files with missing lines Patch % Lines
highs/lp_data/HighsOptions.h 70.00% 3 Missing ⚠️
highs/presolve/HPresolve.cpp 94.73% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3536      +/-   ##
==========================================
+ Coverage   75.60%   75.63%   +0.02%     
==========================================
  Files         461      461              
  Lines      113649   113741      +92     
  Branches    17905    17911       +6     
==========================================
+ Hits        85927    86023      +96     
+ Misses      27434    27430       -4     
  Partials      288      288              

☔ 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.

@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!
Just missing a test for the various modes and documentation for the new option.

Comment thread highs/presolve/HPresolve.cpp Outdated
} else if (options->presolve_mode == kPresolveModeLight) {
setRulesForLightMode();
} else if (options->presolve_mode == kPresolveModeFull) {
// Full presolve uses all presolve rules

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.

My love of symmetry tells me that this (and above) should be setRulesForFullMode()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done!

@jajhall
jajhall merged commit 6de11f6 into latest Nov 5, 2026
567 checks passed
@jajhall
jajhall deleted the presolve-mode branch November 5, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request LP presolve

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants