From 07a30e94cfbd167d8bf2af1b9e275c78fa33e9b6 Mon Sep 17 00:00:00 2001 From: odow Date: Wed, 21 Aug 2024 14:55:10 +1200 Subject: [PATCH] Update --- ext/NLoptMathOptInterfaceExt.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/NLoptMathOptInterfaceExt.jl b/ext/NLoptMathOptInterfaceExt.jl index 1db0261..180d24f 100644 --- a/ext/NLoptMathOptInterfaceExt.jl +++ b/ext/NLoptMathOptInterfaceExt.jl @@ -587,7 +587,7 @@ function _fill_gradient(grad, x, f::MOI.ScalarQuadraticFunction{Float64}) end for term in f.quadratic_terms i, j = term.variable_1.value, term.variable_2.value - grad[i] += term.coefficient * x[i] + grad[i] += term.coefficient * x[j] if i != j grad[j] += term.coefficient * x[i] end