@@ -5,7 +5,7 @@ export AbstractBatchNLPModelMeta, BatchNLPModelMeta
55
66Abstract base type for metadata related to batched nonlinear optimization models.
77"""
8- abstract type AbstractBatchNLPModelMeta{T, S, VI } end
8+ abstract type AbstractBatchNLPModelMeta{T, S} end
99
1010"""
1111 BatchNLPModelMeta <: AbstractBatchNLPModelMeta
@@ -70,7 +70,7 @@ The following keyword arguments are accepted:
7070- `jfree`: indices of "free" constraints (there shouldn't be any)
7171- `jinf`: indices of the visibly infeasible constraints
7272"""
73- struct BatchNLPModelMeta{T, S, VI } <: AbstractBatchNLPModelMeta{T, S, VI }
73+ struct BatchNLPModelMeta{T, S} <: AbstractBatchNLPModelMeta{T, S}
7474 nbatch:: Int
7575 nvar:: Int
7676 x0:: S
@@ -111,7 +111,7 @@ struct BatchNLPModelMeta{T, S, VI} <: AbstractBatchNLPModelMeta{T, S, VI}
111111 hprod_available:: Bool
112112end
113113
114- function BatchNLPModelMeta{T, S, VI }(
114+ function BatchNLPModelMeta{T, S}(
115115 nbatch:: Int ,
116116 nvar:: Int ;
117117 x0:: S = fill!(S(undef, nvar * nbatch), zero(T)),
@@ -132,35 +132,35 @@ function BatchNLPModelMeta{T, S, VI}(
132132 jprod_available:: Bool = (ncon > 0 ),
133133 jtprod_available:: Bool = (ncon > 0 ),
134134 hprod_available:: Bool = true ,
135- ) where {T, S, VI }
135+ ) where {T, S}
136136 if (nvar < 1 ) || (ncon < 0 ) || (nnzj < 0 ) || (nnzh < 0 )
137137 error(" Nonsensical dimensions" )
138138 end
139139
140- ifix = convert(VI, findall(lvar .== uvar) )
141- ilow = convert(VI, findall((lvar .> T(- Inf )) .& (uvar .== T(Inf ) )))
142- iupp = convert(VI, findall((lvar .== T(- Inf )) .& (uvar .< T(Inf ) )))
143- irng = convert(VI, findall((lvar .> T(- Inf )) .& (uvar .< T(Inf )) .& (lvar .< uvar) ))
144- ifree = convert(VI, findall((lvar .== T(- Inf )) .& (uvar .== T(Inf ) )))
145- iinf = convert(VI, findall(lvar .> uvar) )
140+ ifix = findall(lvar .== uvar)
141+ ilow = findall((lvar .> T(- Inf )) .& (uvar .== T(Inf )))
142+ iupp = findall((lvar .== T(- Inf )) .& (uvar .< T(Inf )))
143+ irng = findall((lvar .> T(- Inf )) .& (uvar .< T(Inf )) .& (lvar .< uvar))
144+ ifree = findall((lvar .== T(- Inf )) .& (uvar .== T(Inf )))
145+ iinf = findall(lvar .> uvar)
146146
147147 if ncon > 0
148- jfix = convert(VI, findall(lcon .== ucon) )
149- jlow = convert(VI, findall((lcon .> T(- Inf )) .& (ucon .== T(Inf ) )))
150- jupp = convert(VI, findall((lcon .== T(- Inf )) .& (ucon .< T(Inf ) )))
151- jrng = convert(VI, findall((lcon .> T(- Inf )) .& (ucon .< T(Inf )) .& (lcon .< ucon) ))
152- jfree = convert(VI, findall((lcon .== T(- Inf )) .& (ucon .== T(Inf ) )))
153- jinf = convert(VI, findall(lcon .> ucon) )
148+ jfix = findall(lcon .== ucon)
149+ jlow = findall((lcon .> T(- Inf )) .& (ucon .== T(Inf )))
150+ jupp = findall((lcon .== T(- Inf )) .& (ucon .< T(Inf )))
151+ jrng = findall((lcon .> T(- Inf )) .& (ucon .< T(Inf )) .& (lcon .< ucon))
152+ jfree = findall((lcon .== T(- Inf )) .& (ucon .== T(Inf )))
153+ jinf = findall(lcon .> ucon)
154154 else
155- jfix = VI(undef, 0 )
156- jlow = VI(undef, 0 )
157- jupp = VI(undef, 0 )
158- jrng = VI(undef, 0 )
159- jfree = VI(undef, 0 )
160- jinf = VI(undef, 0 )
155+ jfix = Int[]
156+ jlow = Int[]
157+ jupp = Int[]
158+ jrng = Int[]
159+ jfree = Int[]
160+ jinf = Int[]
161161 end
162162
163- BatchNLPModelMeta{T, S, VI }(
163+ BatchNLPModelMeta{T, S}(
164164 nbatch,
165165 nvar,
166166 x0,
0 commit comments