Skip to content

Commit

Permalink
Fix processobjective for SingleVariable.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoolen committed Feb 19, 2018
1 parent 101ac5e commit afb8281
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MathOptInterfaceOSQP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function processobjective(src::MOI.ModelLike, idxmap)
if MOI.canget(src, MOI.ObjectiveFunction{SingleVariable}())
fsingle = MOI.get(src, MOI.ObjectiveFunction{SingleVariable}())
P = spzeros(n, n)
q[idxmap[fsingle.variable.value]] = 1
q[idxmap[fsingle.variable].value] = 1
c = 0.
elseif MOI.canget(src, MOI.ObjectiveFunction{Affine}())
faffine = MOI.get(src, MOI.ObjectiveFunction{Affine}())
Expand Down

0 comments on commit afb8281

Please sign in to comment.