-
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
Add supports_constrained_variable(s) #1004
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1004 +/- ##
==========================================
+ Coverage 95.19% 95.21% +0.01%
==========================================
Files 99 99
Lines 11166 11349 +183
==========================================
+ Hits 10630 10806 +176
- Misses 536 543 +7
Continue to review full report at Codecov.
|
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.
I recommended calling it supports_add_constrained_variable
. I mentioned this in my comment in #987 but probably too subtly.
src/variables.jl
Outdated
|
||
## Example | ||
|
||
In the standard conic form, the variables are grouped into several cones |
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.
Which standard conic form is this? A reference or link to an example (e.g., SCS) might help.
src/variables.jl
Outdated
The solvers should then implement | ||
`supports_add_constrained_variables(::Optimizer, ::Type{<:SupportedCones}) = true` | ||
where `SupportedCones` is the union of all cone types that are supported | ||
but it should not implement |
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 is a run-on sentence and a bit confusing. You need a comma before "but". A semi-colon would work also.
"should not implement" doesn't follow from "should return false
". The solver could implement it to return false (but that's not necessary because it's the default). Please tidy up the logic.
src/variables.jl
Outdated
This prevents the user to constrain the same variable in two different cones. | ||
When a `VectorOfVariables`-in-`S` is added, the variables of the vector | ||
have already been created so they already belong to given cones. | ||
The constraint will therefore be bridged by adding slack variables in `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.
"If bridges are enabled"
src/variables.jl
Outdated
variables. Then the solver should support adding | ||
`VectorOfVariables`-in-`PositiveSemidefiniteConeTriangle` constraints but it | ||
should not support creating variables constrained to belong to the | ||
`PositiveSemidefiniteConeTriangle` as free variables are not supported. |
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.
Reword mention of "free variables".
Maybe: "because variables in PositiveSemidefiniteConeTriangle
are not necessarily binary or non-negative".
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.
LGTM after minor comments are addressed
See #987