jump-dev / MathOptInterface.jl

A data structure for mathematical optimization problems
http://jump.dev/MathOptInterface.jl/
Other
380 stars 86 forks source link

Add Variable bridges to use runtests without unbridged_variable #2498

Closed blegat closed 1 month ago

blegat commented 2 months ago

Some variable bridges don't support unbridged_variable and that makes runtests fail when getting ConstraintFunction or when getting ConstraintSet for scalar constraints. For example, ZerosBridge does not support it so it cannot use runtests. Another example is the SOS cone: https://github.com/jump-dev/SumOfSquares.jl/pull/353 I could support it in the nonweighted version but if it's weighted by arbitrary polynomials, it seems difficult to unbridge. It might be possible but it's not high priority. By using only vector cones in the tests, it turns out that only this small change is enough to pass the tests. This is still testing the inner model completely.

odow commented 2 months ago

Did you try ZerosBridge? It still failed in a bunch of places

blegat commented 2 months ago

I did not try, I was just hoping it could serve as a test

odow commented 2 months ago

The issue is that a bunch of other places may call ConstraintFunction, so it is not so simple

odow commented 1 month ago

I don't think this is the right approach. Just write some other tests. You don't need general infrastructure.

blegat commented 1 month ago

What about now ?