Skip to content

Commit 56bdb0f

Browse files
committed
addressed the suggestions from @blegat
1 parent d1de3bb commit 56bdb0f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/FileFormats/SDPA/SDPA.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import MathOptInterface
88
const MOI = MathOptInterface
99

1010
MOI.Utilities.@model(Model,
11-
(MOI.Integer,),
11+
(),
1212
(),
1313
(MOI.Nonnegatives, MOI.PositiveSemidefiniteConeTriangle),
1414
(),
@@ -319,7 +319,7 @@ function Base.read!(io::IO, model::Model{T}) where T
319319
obj = zero(MOI.ScalarAffineFunction{T})
320320
for i in eachindex(c)
321321
if !iszero(c[i])
322-
push!(obj.terms, MOI.ScalarAffineTerm(c[i], MOI.VariableIndex(i)))
322+
push!(obj.terms, MOI.ScalarAffineTerm(c[i], scalar_vars[i]))
323323
end
324324
end
325325
MOI.set(model, MOI.ObjectiveFunction{typeof(obj)}(), obj)
@@ -351,7 +351,7 @@ function Base.read!(io::IO, model::Model{T}) where T
351351
else
352352
if !iszero(coef)
353353
push!(funcs[block].terms, MOI.VectorAffineTerm(k,
354-
MOI.ScalarAffineTerm(coef, MOI.VariableIndex(matrix))))
354+
MOI.ScalarAffineTerm(coef, scalar_vars[matrix])))
355355
end
356356
end
357357
end

0 commit comments

Comments
 (0)