-
Notifications
You must be signed in to change notification settings - Fork 7
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
Implement constrained variables #167
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #167 +/- ##
==========================================
+ Coverage 95.80% 95.85% +0.04%
==========================================
Files 5 5
Lines 1097 1109 +12
==========================================
+ Hits 1051 1063 +12
Misses 46 46 ☔ View full report in Codecov by Sentry. |
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?
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
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.