Skip to content
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

MOI tests: LP unit tests and contlinear tests #571

Merged
merged 7 commits into from
Aug 9, 2021
Merged

MOI tests: LP unit tests and contlinear tests #571

merged 7 commits into from
Aug 9, 2021

Conversation

laradicp
Copy link
Contributor

@laradicp laradicp commented Aug 6, 2021

No description provided.

@codecov
Copy link

codecov bot commented Aug 6, 2021

Codecov Report

Merging #571 (ba250bd) into master (fdd948f) will increase coverage by 0.48%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #571      +/-   ##
==========================================
+ Coverage   86.39%   86.87%   +0.48%     
==========================================
  Files          47       47              
  Lines        4718     4725       +7     
==========================================
+ Hits         4076     4105      +29     
+ Misses        642      620      -22     
Impacted Files Coverage Δ
src/MOIwrapper.jl 85.96% <90.90%> (+4.84%) ⬆️
src/MathProg/MOIinterface.jl 91.70% <0.00%> (+0.82%) ⬆️
src/Algorithm/basic/solvelpform.jl 94.28% <0.00%> (+2.85%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdd948f...ba250bd. Read the comment docs.

@@ -302,6 +301,8 @@ function MOI.get(
orig_form = get_original_formulation(model.inner)
constrid = getid(model.constrs[index])
terms = MOI.ScalarAffineTerm{Float64}[]
coefmatrix = getcoefmatrix(orig_form)
coefmatrix.fillmode && closefillmode!(coefmatrix)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what test did you have to do that (is it a test that does set get set) ?

If you close the fill mode, then writing operations become time consuming. Do you think we should we be able to reopen the fill mode ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests "linear1" and "linear6" threw this error:

Expression: MOI.get(model, MOI.ConstraintFunction(), c1) ≈ fx
View of a row not available in fill mode (Open an issue at https://github.com/atoptima/DynamicSparseArrays.jl if you need it).

I don't know if there's a better fix to that and I don't understand fully how fill mode works yet, but being able to reopen the fill mode seems like a good option.

@laradicp laradicp marked this pull request as ready for review August 9, 2021 18:54
@guimarqu guimarqu merged commit ec1fa6b into master Aug 9, 2021
@guimarqu guimarqu deleted the moi_tests branch August 9, 2021 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants