@@ -223,42 +223,18 @@ function MOI.set(model::Optimizer, attr::MOI.RawOptimizerAttribute, value)
223223 return
224224end
225225
226- const _SCALAR_FUNCTIONS = Union{
227- MOI. VariableIndex,
228- MOI. ScalarAffineFunction{Float64},
229- MOI. ScalarQuadraticFunction{Float64},
230- MOI. ScalarNonlinearFunction,
231- }
232-
233- const _SCALAR_SETS = Union{
234- MOI. LessThan{Float64},
235- MOI. GreaterThan{Float64},
236- MOI. EqualTo{Float64},
237- MOI. Interval{Float64},
238- }
239-
240226function MOI. supports_constraint (
241- :: Optimizer ,
242- :: Type{<:_SCALAR_FUNCTIONS } ,
243- :: Type{<:_SCALAR_SETS } ,
244- )
245- return true
227+ model :: Optimizer ,
228+ :: Type{F } ,
229+ :: Type{S } ,
230+ ) where {F <: MOI.AbstractFunction ,S <: MOI.AbstractSet }
231+ return MOI . supports_constraint (model . inner, F, S)
246232end
247233
248- function MOI. supports_constraint (
249- :: Optimizer ,
250- :: Type{MOI.VariableIndex} ,
251- :: Type{<:Union{MOI.ZeroOne,MOI.Integer}} ,
252- )
253- return true
234+ function MOI. supports (model:: Optimizer , attr:: MOI.AbstractModelAttribute )
235+ return MOI. supports (model. inner, attr)
254236end
255237
256- MOI. supports (:: Optimizer , :: MOI.ObjectiveFunction{<:_SCALAR_FUNCTIONS} ) = true
257-
258- MOI. supports (:: Optimizer , :: MOI.ObjectiveSense ) = true
259-
260- MOI. supports (:: Optimizer , :: MOI.NLPBlock ) = true
261-
262238function MOI. supports (
263239 :: Optimizer ,
264240 :: MOI.VariablePrimalStart ,
0 commit comments