@@ -64,7 +64,7 @@ struct LPStandardForm{T, AT<:AbstractMatrix{T}, VT <: AbstractVector{T}} <: Abst
6464 b:: VT
6565end
6666
67- function MOI. get (:: LPStandardForm{T} , :: MOI.ListOfConstraints ) where T
67+ function MOI. get (:: LPStandardForm{T} , :: MOI.ListOfConstraintTypesPresent ) where T
6868 return [(MOI. ScalarAffineFunction{T}, MOI. EqualTo{T}),
6969 (MOI. VectorOfVariables, MOI. Nonnegatives)]
7070end
@@ -117,7 +117,7 @@ struct LPGeometricForm{T, AT<:AbstractMatrix{T}, VT <: AbstractVector{T}} <: Abs
117117 b:: VT
118118end
119119
120- function MOI. get (:: LPGeometricForm{T} , :: MOI.ListOfConstraints ) where T
120+ function MOI. get (:: LPGeometricForm{T} , :: MOI.ListOfConstraintTypesPresent ) where T
121121 return [(MOI. ScalarAffineFunction{T}, MOI. LessThan{T})]
122122end
123123const LT{T} = MOI. ConstraintIndex{MOI. ScalarAffineFunction{T}, MOI. LessThan{T}}
@@ -139,10 +139,10 @@ end
139139
140140abstract type LPMixedForm{T} <: AbstractLPForm{T} end
141141
142- function MOI. get (model:: LPMixedForm{T} , :: MOI.ListOfConstraints ) where T
142+ function MOI. get (model:: LPMixedForm{T} , :: MOI.ListOfConstraintTypesPresent ) where T
143143 list = Tuple{DataType, DataType}[]
144144 for S in [MOI. EqualTo{T}, MOI. Interval{T}, MOI. GreaterThan{T}, MOI. LessThan{T}]
145- for F in [MOI. SingleVariable , MOI. ScalarAffineFunction{T}]
145+ for F in [MOI. VariableIndex , MOI. ScalarAffineFunction{T}]
146146 if ! iszero (MOI. get (model, MOI. NumberOfConstraints {F, S} ()))
147147 push! (list, (F, S))
148148 end
@@ -176,14 +176,14 @@ function MOI.get(model::LPMixedForm{T}, ::MOI.ListOfConstraintIndices{MOI.Scalar
176176 ))
177177end
178178
179- const VBOUND{S} = MOI. ConstraintIndex{MOI. SingleVariable , S}
180- function MOI. get (model:: LPMixedForm{T} , :: MOI.NumberOfConstraints{MOI.SingleVariable , S} ) where {T, S <: LinearBounds{T} }
179+ const VBOUND{S} = MOI. ConstraintIndex{MOI. VariableIndex , S}
180+ function MOI. get (model:: LPMixedForm{T} , :: MOI.NumberOfConstraints{MOI.VariableIndex , S} ) where {T, S <: LinearBounds{T} }
181181 s = _sense (S)
182182 return count (MOI. get (model, MOI. ListOfVariableIndices ())) do vi
183183 MOI. get (model, BoundSense (), vi) == s
184184 end
185185end
186- function MOI. get (model:: LPMixedForm{T} , :: MOI.ListOfConstraintIndices{MOI.SingleVariable , S} ) where {T, S <: LinearBounds{T} }
186+ function MOI. get (model:: LPMixedForm{T} , :: MOI.ListOfConstraintIndices{MOI.VariableIndex , S} ) where {T, S <: LinearBounds{T} }
187187 s = _sense (S)
188188 return collect (MOIU. LazyMap {VBOUND{S}} (
189189 Base. Iterators. Filter (MOI. get (model, MOI. ListOfVariableIndices ())) do vi
@@ -194,7 +194,7 @@ function MOI.get(model::LPMixedForm{T}, ::MOI.ListOfConstraintIndices{MOI.Single
194194 end )
195195end
196196function MOI. get (:: LPMixedForm , :: MOI.ConstraintFunction , ci:: VBOUND )
197- return MOI. SingleVariable (MOI . VariableIndex (ci. value) )
197+ return MOI. VariableIndex (ci. value)
198198end
199199function MOI. get (model:: LPMixedForm , :: MOI.ConstraintSet , ci:: VBOUND )
200200 return _bound_set (model. v_lb[ci. value], model. v_ub[ci. value])
0 commit comments