Repository navigation
Add polynomial preprocessing bridges - #157
Open
GiovanniKarra wants to merge 1 commit into
Open
GiovanniKarra wants to merge 1 commit into
GiovanniKarra wants to merge 1 commit into
Conversation
Member
|
Fix conflicts |
GiovanniKarra
force-pushed
the
gkarra/polynomial-preprocessing
branch
from
November 3, 2026 16:47
e276b2f to
16401e1
Compare
Add `ToReformulatedPolynomialBridge` (constraint and objective), which substitutes high-degree subexpressions of a `MOI.ScalarNonlinearFunction` with bounded auxiliary variables before conversion to a polynomial, and `QCQP.optimizer(model; preprocessing)` stacking these bridges on top of `QCQP.Optimizer`. `ToPolynomialBridge` now only bridges `MOI.ScalarNonlinearFunction` and non-integer exponents now throw instead of being rounded.
GiovanniKarra
force-pushed
the
gkarra/polynomial-preprocessing
branch
from
November 3, 2026 16:53
16401e1 to
57da88c
Compare
Collaborator
Author
|
Done ! |
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.
Converting
ScalarNonlinearFunctiontoScalarPolynomialFunctioncan sometimes be very inefficient if the original problem isn't formulated canonically, as expression products and powers can expand and add a lot of different monomials, which can be undesired when using the QCQP solver for example.This PR adds a new Bridge from
ScalarNonlinearFunctiontoScalarNonlinearFunction, that replaces some expressions with auxiliary variables when needed. It can be invoked using the newQCQP.optimizer(model::MOI.ModelLike; preprocessing = false)method, by settingpreprocessingtotrue.I am not 100% convinced with the name,
ToReformulatedPolynomialBridge, and currently auxiliary variables aren't shared between constraints, nor with the objective, as they are all passed independently to the bridge, which is a shame as if a problem is formulated as being polynomial with respect to a linear map of a variable, all instances in the problem could be replaced with a single auxiliary variable for example.For more detail, see my master's thesis, which is at the origin of this contribution.
Closes #134