Skip to content

Solution enumeration#2695

Merged
jajhall merged 75 commits intoERGO-Code:latestfrom
fwesselm:enumerateSolutions4
Dec 19, 2025
Merged

Solution enumeration#2695
jajhall merged 75 commits intoERGO-Code:latestfrom
fwesselm:enumerateSolutions4

Conversation

@fwesselm
Copy link
Copy Markdown
Collaborator

@fwesselm fwesselm commented Dec 16, 2025

This PR adds HPresolve::enumerateSolutions as a new presolve reduction:

  • The new reduction enumerates all solutions to pure binary constraints with up to 8 variables. It analyses up to 400 of those constraints per call to the reduction.
  • The reduction may fix variables, tighten bounds or substitute variables.
  • Computational results show that the reduction improves average performance in terms of shifted geometric means by 1 percent. Solution enumeration allows HiGHS to solve 6 additional models to optimality within the time limit (of two hours).
  • Solution enumeration is run before probing to avoid (expensive) probing on binary variables that could be fixed.

To do:

  • It may still be possible to further tune the code to obtain a general performance improvement in terms of the shifted geometric means (e.g., reduce number of rows that are checked, or reduce the maximum number of binary variables that these rows may contain).

@fwesselm
Copy link
Copy Markdown
Collaborator Author

@jajhall, @Opt-Mucca - I have made some additional changes to the code (mainly use a common code base for parts of probing and enumeration). The new version is still able to solve 6 more models to optimality within the time limit, but is now 1% faster on average. I will update this PR shortly.

Copy link
Copy Markdown
Collaborator

@Opt-Mucca Opt-Mucca left a comment

Choose a reason for hiding this comment

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

I like the change and the extended probing refactor. It's now performance positive, so I'm happy to merge this whenever @fwesselm says it's ready.

Note for the future: Revisit some non-static working limits, e.g. splayContingent from probing, if we ever find an applications where this ends up taking too long (the if does seem decently heavy lifting here)

@fwesselm
Copy link
Copy Markdown
Collaborator Author

I like the change and the extended probing refactor. It's now performance positive, so I'm happy to merge this whenever @fwesselm says it's ready.

Note for the future: Revisit some non-static working limits, e.g. splayContingent from probing, if we ever find an applications where this ends up taking too long (the if does seem decently heavy lifting here)

Thanks, @Opt-Mucca . I would like to try out one more potential improvement (stop search early if there are no reductions). I will report back here.

@fwesselm
Copy link
Copy Markdown
Collaborator Author

I added code to remove worst-case bounds that are not tighter than global bounds while iterating. Tests showed that this additional change it is not improving performance very much (since the vectors only have relatively few elements) for MIPLIB etc. I think the code is ready to go (- I hope @Opt-Mucca and @jajhall agree -) and I plan to experiment a little more with other work limits in the future.

@jajhall jajhall merged commit 96f998e into ERGO-Code:latest Dec 19, 2025
237 checks passed
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.

3 participants