-
Notifications
You must be signed in to change notification settings - Fork 14
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
Ar/quad coefficients #213
Ar/quad coefficients #213
Conversation
test/jump.jl
Outdated
grad_constraint = JuMP.constant(MOI.get(model, DiffOpt.BackwardOutConstraint(), ctr_le[])) | ||
@test grad_constraint ≈ -1.0 atol=ATOL rtol=RTOL | ||
|
||
# Test some overloads. Better place elsewhere? |
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.
Put these here as there isn't a jump.jl test file - arguably that could be created
@@ -1,7 +1,7 @@ | |||
name = "DiffOpt" | |||
uuid = "930fe3bc-9c6b-11ea-2d94-6184641e85e7" | |||
authors = ["Akshay Sharma", "Mathieu Besançon", "Joaquim Dias Garcia", "Benoît Legat"] | |||
version = "0.3.1" | |||
version = "0.3.2" |
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.
bugfix
@@ -240,12 +240,12 @@ function JuMP.coefficient(func::MOItoJuMP, var_ref::JuMP.VariableRef) | |||
return JuMP.coefficient(func.func, JuMP.index(var_ref)) | |||
end | |||
function quad_sym_half(func::MOItoJuMP, var1_ref::JuMP.VariableRef, var2_ref::JuMP.VariableRef) | |||
check_belongs_to_model(var1_ref, func.model) | |||
return quad_sym_half(func.func, JuMP.index(vi1), JuMP.index(var2_ref)) | |||
check_belongs_to_model.([var1_ref, var2_ref], Ref(func.model)) |
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.
technically this change isn't being tested, but this would just test a function in JuMP so fine?
f7e5c57
to
5cf665b
Compare
Codecov Report
@@ Coverage Diff @@
## master #213 +/- ##
==========================================
+ Coverage 89.39% 91.21% +1.81%
==========================================
Files 8 8
Lines 839 842 +3
==========================================
+ Hits 750 768 +18
+ Misses 89 74 -15
Continue to review full report at Codecov.
|
Thanks! |
Closes #211