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 support for vector of quadratic constraints #1677
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1677 +/- ##
==========================================
+ Coverage 67.94% 67.95% +0.01%
==========================================
Files 30 30
Lines 3809 3829 +20
==========================================
+ Hits 2588 2602 +14
- Misses 1221 1227 +6
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1677 +/- ##
==========================================
+ Coverage 67.94% 70.18% +2.24%
==========================================
Files 30 30
Lines 3809 4196 +387
==========================================
+ Hits 2588 2945 +357
- Misses 1221 1251 +30
Continue to review full report at Codecov.
|
Return the MOI.ScalarQuadraticTerm for the quadratic term `t`, element of the | ||
[`quadterms`](@ref) iterator. | ||
""" | ||
function moi_quadratic_term(t::Tuple) |
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.
Add a note that model information is lost.
|
||
""" | ||
_fillvqf!(terms, offset::Int, oi::Int, quad::AbstractJuMPScalar) | ||
|
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.
Naming: underscore between fill and vqf.
src/quad_expr.jl
Outdated
moi_quadratic_term(term)) | ||
i += 1 | ||
end | ||
offset + length(quadterms(aff)) |
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.
Nit: explicit return
src/quad_expr.jl
Outdated
_fillvqf!(terms, offset::Int, oi::Int, quad::AbstractJuMPScalar) | ||
|
||
Fills the vectors terms at indices starting at `offset+1` with the quadratic | ||
terms of `quad`. The output index for all terms is `oi`. |
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.
The docstring doesn't mention the return value.
""" | ||
_fillvqf!(terms, offset::Int, oi::Int, quad::AbstractJuMPScalar) | ||
|
||
Fills the vectors terms at indices starting at `offset+1` with the quadratic |
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 documentation can't be understood on its own. What is the vector terms? (A type would help.)
Closes #1644