Skip to content

Add polynomial preprocessing bridges - #157

Open
GiovanniKarra wants to merge 1 commit into
mainfrom
gkarra/polynomial-preprocessing
Open

GiovanniKarra wants to merge 1 commit into
mainfrom
gkarra/polynomial-preprocessing

Conversation

@GiovanniKarra

@GiovanniKarra GiovanniKarra commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Converting ScalarNonlinearFunction to ScalarPolynomialFunction can 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 ScalarNonlinearFunction to ScalarNonlinearFunction, that replaces some expressions with auxiliary variables when needed. It can be invoked using the new QCQP.optimizer(model::MOI.ModelLike; preprocessing = false) method, by setting preprocessing to true.

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

@GiovanniKarra
GiovanniKarra added this pull request to stack #159 October 20, 2026 12:49
@blegat

blegat commented Nov 3, 2026

Copy link
Copy Markdown
Member

Fix conflicts

@GiovanniKarra
GiovanniKarra force-pushed the gkarra/polynomial-preprocessing branch from e276b2f to 16401e1 Compare November 3, 2026 16:47
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
GiovanniKarra force-pushed the gkarra/polynomial-preprocessing branch from 16401e1 to 57da88c Compare November 3, 2026 16:53
@GiovanniKarra

Copy link
Copy Markdown
Collaborator Author

Done !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants