Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Nov 19, 2021
1 parent b8378ca commit c6055d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ end

MOI.supports_incremental_interface(::Optimizer) = true

function MOI.copy_to(dest::Optimizer, src::MOI.ModelLike; kwargs...)
return MOI.Utilities.automatic_copy_to(dest, src; kwargs...)
function MOI.copy_to(dest::Optimizer, src::MOI.ModelLike)
return MOI.Utilities.default_copy_to(dest, src)
end

# Needed to copy from the optimizer
Expand Down
4 changes: 2 additions & 2 deletions test/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ function moi_test(optimizer, L::Matrix{T}, expected_X, expected_y, expected_obj,
MOI.set(optimizer, MOI.Silent(), true)
@test MOI.get(optimizer, MOI.Silent())
@test MOI.is_empty(optimizer)
@test isempty(MOI.get(optimizer, MOI.ListOfConstraints()))
@test isempty(MOI.get(optimizer, MOI.ListOfConstraintsTypesPresent()))
F = MOI.VectorOfVariables
S = MCPSD.Elliptope
@test MOI.get(optimizer, MOI.NumberOfConstraints{F, S}()) == 0
@test isempty(MOI.get(optimizer, MOI.ListOfConstraintIndices{F, S}()))
x, cx = MOI.add_constrained_variables(optimizer, MCPSD.Elliptope(size(L, 1)))
@test !MOI.is_empty(optimizer)
@test cx == MOI.ConstraintIndex{F, S}(1)
@test MOI.get(optimizer, MOI.ListOfConstraints()) == [(F, S)]
@test MOI.get(optimizer, MOI.ListOfConstraintsTypesPresent()) == [(F, S)]
@test MOI.get(optimizer, MOI.NumberOfConstraints{F, S}()) == 1
@test MOI.get(optimizer, MOI.ListOfConstraintIndices{F, S}()) == [cx]
@test all(x -> MOI.is_valid(optimizer, x), x)
Expand Down

0 comments on commit c6055d2

Please sign in to comment.