-
Notifications
You must be signed in to change notification settings - Fork 8
Implement constrained variables #167
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #167 +/- ##
==========================================
+ Coverage 97.52% 97.54% +0.02%
==========================================
Files 5 5
Lines 1452 1468 +16
==========================================
+ Hits 1416 1432 +16
Misses 36 36 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Nice! can you just add tests for constrained variable(s)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thing pending it the constraint index issue, or you plan to solve it in a follow up PR?
src/MOI_wrapper.jl
Outdated
set::MOI.AbstractScalarSet, | ||
) | ||
inner_vi, inner_ci = MOI.add_constrained_variable(model.optimizer, set) | ||
return _add_variable(model, inner_vi), inner_ci # FIXME map inner_ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs a fix, right? Otherwise, vi and ci wont actually match
src/MOI_wrapper.jl
Outdated
set::MOI.AbstractVectorSet, | ||
) | ||
inner_vis, inner_ci = MOI.add_constrained_variables(model.optimizer, set) | ||
return _add_variable.(Ref(model), inner_vis), inner_ci # FIXME map inner_ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
optimizer = POI.Optimizer(NoFreeVariablesModel{Float64}()) | ||
set = MOI.LessThan(1.0) | ||
@test MOI.supports_add_constrained_variable(optimizer, typeof(set)) | ||
x, c = MOI.add_constrained_variable(optimizer, set) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably add a test to check the match between ci and vi.
When using Mosek after a POI layer without any bridge in-between, the performance was catastrophic because the PSD variable where bridged to affine constraints as the bridges didn't see through the POI layers that PSD variables were supported.