Skip to content

Conversation

blegat
Copy link
Member

@blegat blegat commented May 20, 2019

Also fixes empty! and is_empty with universal fallback and optimizer attributes.

@blegat blegat added this to the v0.9 milestone May 20, 2019
@codecov-io
Copy link

codecov-io commented May 20, 2019

Codecov Report

Merging #741 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #741      +/-   ##
==========================================
- Coverage   94.25%   94.25%   -0.01%     
==========================================
  Files          55       55              
  Lines        6148     6157       +9     
==========================================
+ Hits         5795     5803       +8     
- Misses        353      354       +1
Impacted Files Coverage Δ
src/Utilities/universalfallback.jl 97.54% <ø> (-0.02%) ⬇️
src/Test/UnitTests/attributes.jl 100% <100%> (ø) ⬆️
src/Utilities/mockoptimizer.jl 90.3% <100%> (-0.47%) ⬇️

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 6a4c3e1...529fb55. Read the comment docs.

@blegat blegat merged commit 37ecf6c into master May 22, 2019
@rschwarz
Copy link
Contributor

rschwarz commented May 22, 2019

So I implemented MOI.supports(::Optimizer, ::MOI.Silent) = true for SCIP.jl, but the new test is failing for me, when using the MOIB.full_bridge_optimizer on top of a CachingOptimizer.

But it works fine when testing on direct SCIP.Optimizer. Should the call be forwarded to the underlying solver automatically?

EDIT: I found that the following method is called for the CachingOptimizer (according to which):

function supports(::ModelLike, attr::Union{AbstractModelAttribute,
                                           AbstractOptimizerAttribute})
    if !is_copyable(attr)
        throw(ArgumentError("`supports` is not defined for $attr, it is only" *
                            " defined for attributes such that `is_copyable`" *
                            " returns `true`."))
    end
    return false
end

This would be strange as there is another method specifically for ::CachingOptimizer.

@blegat
Copy link
Member Author

blegat commented May 22, 2019

It should be fixed by #745

@rschwarz
Copy link
Contributor

Yes, that does fix it, thanks!

Yesterday, I was still ignorant of the difference between AbstractModelAttribute and AbstractOptimizerAttribute, so it was a worthwhile learning experience ;-)

@odow odow deleted the bl/silent_test branch June 15, 2019 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants