5353 _bounds(s)
5454
5555"""
56- _bounds (s:: MOI.EqualTo{Tv } ) where {Tv } = s. value, s. value
57- _bounds (s:: MOI.LessThan{Tv } ) where {Tv } = Tv (- Inf ), s. upper
58- _bounds (s:: MOI.GreaterThan{Tv } ) where {Tv } = s. lower, Tv (Inf )
59- _bounds (s:: MOI.Interval{Tv } ) where {Tv } = s. lower, s. upper
56+ _bounds (s:: MOI.EqualTo{T } ) where {T } = s. value, s. value
57+ _bounds (s:: MOI.LessThan{T } ) where {T } = T (- Inf ), s. upper
58+ _bounds (s:: MOI.GreaterThan{T } ) where {T } = s. lower, T (Inf )
59+ _bounds (s:: MOI.Interval{T } ) where {T } = s. lower, s. upper
6060
61- const SCALAR_SETS{Tv } = Union{
62- MOI. LessThan{Tv },
63- MOI. GreaterThan{Tv },
64- MOI. EqualTo{Tv },
65- MOI. Interval{Tv }
66- } where {Tv }
61+ const SCALAR_SETS{T } = Union{
62+ MOI. LessThan{T },
63+ MOI. GreaterThan{T },
64+ MOI. EqualTo{T },
65+ MOI. Interval{T }
66+ } where {T }
6767
6868
6969
@@ -76,12 +76,12 @@ const SCALAR_SETS{Tv} = Union{
7676# ==============================================================================
7777
7878"""
79- Optimizer{Tv }
79+ Optimizer{T }
8080
8181Wrapper for MOI.
8282"""
83- mutable struct Optimizer{Tv } <: MOI.AbstractOptimizer
84- inner:: Model{Tv }
83+ mutable struct Optimizer{T } <: MOI.AbstractOptimizer
84+ inner:: Model{T }
8585
8686 is_feas:: Bool # Model is feasibility problem if true
8787
@@ -91,7 +91,7 @@ mutable struct Optimizer{Tv} <: MOI.AbstractOptimizer
9191 var_indices_moi:: Vector{MOI.VariableIndex}
9292 var_indices:: Dict{MOI.VariableIndex, Int}
9393 con_indices_moi:: Vector{MOI.ConstraintIndex}
94- con_indices:: Dict{MOI.ConstraintIndex{MOI.ScalarAffineFunction{Tv }, <:SCALAR_SETS{Tv }}, Int}
94+ con_indices:: Dict{MOI.ConstraintIndex{MOI.ScalarAffineFunction{T }, <:SCALAR_SETS{T }}, Int}
9595
9696 # Variable and constraint names
9797 name2var:: Dict{String, MOI.VariableIndex}
@@ -104,14 +104,14 @@ mutable struct Optimizer{Tv} <: MOI.AbstractOptimizer
104104 # Keep track of bound constraints
105105 var2bndtype:: Dict{MOI.VariableIndex, Set{Type{<:MOI.AbstractScalarSet}}}
106106
107- function Optimizer {Tv } (;kwargs... ) where {Tv }
108- m = new {Tv } (
109- Model {Tv } (), false ,
107+ function Optimizer {T } (;kwargs... ) where {T }
108+ m = new {T } (
109+ Model {T } (), false ,
110110 # Variable and constraint counters
111111 0 , 0 ,
112112 # Index mapping
113113 MOI. VariableIndex[], Dict {MOI.VariableIndex, Int} (),
114- MOI. ConstraintIndex[], Dict {MOI.ConstraintIndex{MOI.ScalarAffineFunction, <:SCALAR_SETS{Tv }}, Int} (),
114+ MOI. ConstraintIndex[], Dict {MOI.ConstraintIndex{MOI.ScalarAffineFunction, <:SCALAR_SETS{T }}, Int} (),
115115 # Name -> index mapping
116116 Dict {String, MOI.VariableIndex} (), Dict {String, MOI.ConstraintIndex} (),
117117 Dict {MOI.ConstraintIndex, String} (), # Variable bounds tracking
0 commit comments