-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] supports_constrained_variable #987
Comments
What would be the new names for this ? |
|
We had a talk with @odow and @mlubin about constrained variables, here is what we came up with:
Currently, there is no way to differentiate whether a constrained variable can be added or whether constraint can be added on existing variables.
However,
Because of these issues, if you call
MOI.add_constrained_variable(optimizer::LazyBridgeOptimizer{SDPNAL.Optimizer}, MOI.Interval(1.0, 2.0))
, the bridges will let the call go through asMOI.supports(::SDPNAL.Optimizer, ::Type{SingleVariable}, ::Type{Interval{Float64}})
is true and then there will be an error.Another issue is that the user could create constrained variables in PSD and then constrain some of them in SecondOrderCone in a CachingOptimizer. Then when the cache is copied from the cache to Mosek, it might add constrained variables in SecondOrderCone then then the PSD constraint will need to be added as a constraint as some of the variables have already been added. Then it will give an error.
To solve this issue, we can add
so that a solver can override it if it's not the same.
Then in
LazyBridgeOptimizer
,supports_constrained_variable
will be used instead ofsupports_constraint
when appropriate.And in
copy_to
, we need to first add as constrained variables the set that are supported as constrained variables but not as constraint.For the rest of the set, we could compute, for each set type, the difference between the bridging cost of adding constrained variables vs the bridging cost of adding constraints.
Then the choice of adding which constraint as constrained variables or constraint on free variables can be modeled as a weighted set cover which is NP-hard.
But we could simply order the set types with the cost and use this order as a priority without worrying about the overlapping patterns and that would be cheap.
We just need to add model attributes:
that can be queried from
copy_to
with default fallbacks:that are overwritten by
LazyBridgeOptimizer
.The text was updated successfully, but these errors were encountered: