Skip to content

Implement bridge_cost for CachingOptimizer#3001

Open
blegat wants to merge 6 commits into
masterfrom
bl/bridge_cost
Open

Implement bridge_cost for CachingOptimizer#3001
blegat wants to merge 6 commits into
masterfrom
bl/bridge_cost

Conversation

@blegat
Copy link
Copy Markdown
Member

@blegat blegat commented May 6, 2026

Abstract description

Consider layers: LazyBridgeOptimizer(Dualization(LazyBridgeOptimizer)) (with possible caching layers in between).
If you have a set S that does not implement dual_set but that has bridges, then a constraint F-in-S with this set are not supported by the dualization layer so it will be bridged by the outer layer. Now, all the other constraints that ##are supported by dualization will just go through the dualization layer will bridging cost of 0, even though they may be bridged by the inner bridges. Because of this, the bridge choice for F-in-S will be completely blind and might be sub-optimal.

Concrete example

The whole idea detailed in jump-dev/SumOfSquares.jl#205 explains that we have a KernelBridge and an ImageBridge and the right one will be picked thanks to the bridge cost

Written by Claude, I haven't checked yet. I have now iterated, looks good.

@blegat blegat marked this pull request as ready for review May 14, 2026 21:14
@blegat blegat requested a review from odow May 14, 2026 21:15
Copy link
Copy Markdown
Member

@odow odow left a comment

Choose a reason for hiding this comment

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

Missing a test when the CachingOptimizer has NO_OPTIMIZER.

I'll run solver-tests:

https://github.com/jump-dev/MathOptInterface.jl/actions/runs/25891420946

@odow
Copy link
Copy Markdown
Member

odow commented May 14, 2026

This breaks a lot of packages

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