Skip to content

Commit b98b476

Browse files
authored
Fix basic tests with power cone (#3003)
1 parent 47011d3 commit b98b476

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Test/test_basic_constraint.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ _set(::Type{MOI.RotatedSecondOrderCone}) = MOI.RotatedSecondOrderCone(3)
117117
_set(::Type{MOI.GeometricMeanCone}) = MOI.GeometricMeanCone(3)
118118
_set(::Type{MOI.ExponentialCone}) = MOI.ExponentialCone()
119119
_set(::Type{MOI.DualExponentialCone}) = MOI.DualExponentialCone()
120-
_set(::Type{MOI.PowerCone}) = MOI.PowerCone(0.5)
121-
_set(::Type{MOI.DualPowerCone}) = MOI.DualPowerCone(0.5)
120+
_set(::Type{T}, ::Type{MOI.PowerCone}) where {T} = MOI.PowerCone(T(1//2))
121+
function _set(::Type{T}, ::Type{MOI.DualPowerCone}) where {T}
122+
return MOI.DualPowerCone(T(1//2))
123+
end
122124
_set(::Type{MOI.RelativeEntropyCone}) = MOI.RelativeEntropyCone(3)
123125
_set(::Type{MOI.NormSpectralCone}) = MOI.NormSpectralCone(2, 3)
124126
_set(::Type{MOI.NormNuclearCone}) = MOI.NormNuclearCone(2, 3)

0 commit comments

Comments
 (0)