You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@test MOI.get(model, MOI.ConstraintDualStart(), c) == [1.0]
return
end
The issue is that the bridge/model may support an attribute for a variable-in-set constraint if it was added via add_constrained_variable(s) but not via add_constraint (or vice versa). However, we have no way of telling which way the constraint was added based on the type alone.
We can either default to &&, in which case we may return a false negative (the model supports the attribute but supports returns false) or ||, in which case we may return a false positive (the model supports the attribute for one of the ways, but we added it the other way). It's not obvious which is better, but our tests are passing with the current implementation, so we should wait for a solver to complain before reconsidering.
The text was updated successfully, but these errors were encountered:
I think we should close this. I can't see a way to fix this in the current form. There's a note in #2180, but that requires a much larger discussion that's more than this specific issue. (And I don't really want to go there.)
It's also a very minor issue that, from what I can tell, has never impacted a user in the wild.
We should at least document what it does return then. As per the doc, supports normally only has false positive.
From reading #1992, it seems, in order to fix an issue with Ipopt, it's now a mix of false positive and false negative which is in contradiction with supports. I should take a closer look, it's not urgent but I'd rather keep that issue open.
See discussion in #1992, and these tests:
MathOptInterface.jl/test/Bridges/bridge_optimizer.jl
Lines 898 to 933 in d9c998a
The issue is that the bridge/model may support an attribute for a variable-in-set constraint if it was added via
add_constrained_variable(s)
but not viaadd_constraint
(or vice versa). However, we have no way of telling which way the constraint was added based on the type alone.We can either default to
&&
, in which case we may return a false negative (the model supports the attribute butsupports
returnsfalse
) or||
, in which case we may return a false positive (the model supports the attribute for one of the ways, but we added it the other way). It's not obvious which is better, but our tests are passing with the current implementation, so we should wait for a solver to complain before reconsidering.The text was updated successfully, but these errors were encountered: