Skip to content

Commit

Permalink
Use supports_add_constrained_variables
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Sep 3, 2020
1 parent eb8ff1d commit e010d6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
[compat]
BinaryProvider = "0.5"
DoubleFloats = "0.9.9"
MathOptInterface = "0.9.5"
MathOptInterface = "0.9.14"
julia = "1.5"

[extras]
Expand Down
11 changes: 2 additions & 9 deletions src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,9 @@ function MOI.supports(
return true
end

function MOI.supports_constraint(
::Optimizer, ::Type{MOI.VectorOfVariables}, ::Type{MOI.Reals})
return false
end
MOI.supports_add_constrained_variables(::Optimizer, ::Type{MOI.Reals}) = false
const SupportedSets = Union{MOI.Nonnegatives, MOI.PositiveSemidefiniteConeTriangle}
function MOI.supports_constraint(
::Optimizer, ::Type{MOI.VectorOfVariables},
::Type{<:SupportedSets})
return true
end
MOI.supports_add_constrained_variables(::Optimizer, ::Type{<:SupportedSets}) = true
function MOI.supports_constraint(
::Optimizer, ::Type{MOI.ScalarAffineFunction{T}},
::Type{MOI.EqualTo{T}}) where T
Expand Down

0 comments on commit e010d6b

Please sign in to comment.