feat(lprelax): add a first implementation of an LP relaxation reasoner based on HiGHS - #244
Draft
nrealus wants to merge 2 commits into
Draft
feat(lprelax): add a first implementation of an LP relaxation reasoner based on HiGHS#244nrealus wants to merge 2 commits into
nrealus wants to merge 2 commits into
Conversation
based on `HiGHS` backend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces (a first implementation of) a LP relaxation reasoner based on the HiGHS solver as a backend.
The reasoner maintains a LP model, whose columns' bounds can be updated by setting "LP literals" (LpLit), analogously to the main CSP model. The main CSP model and LP model can be bound such that the LP model's columns' upper/lower bounds are updated after observing changes on the main CSP variables' upper/lower bounds. Similarly, these two models can be bound such that, when the LP model is found unsatisfiable, the LpLits composing the infeasible subset are replaced by implicant Lits (literals of the main model) yielding a conflict explanation given to the main CSP.
Note that the code is still rather unpolished. It should be mentioned that non-negligeable overhead is due to the internal HiGHS model's updates (when updating column bounds). Moreover, to avoid overhead, the LP is currently solved only at the root decision level. Ultimately, the code is far from perfect and will have to evolve, notably to align with the API of a future incremental LP reasoner in the works.