Skip to content

Commit 57b2c58

Browse files
committed
Fix a bug in the Hessian structure of a MathOptNLSModel
1 parent da61c4f commit 57b2c58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/moi_nls_model.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ function NLPModels.hess_structure!(
354354
view(rows, 1:(nls.lls.nnzh)) .= nls.lls.hessian.rows
355355
view(cols, 1:(nls.lls.nnzh)) .= nls.lls.hessian.cols
356356
end
357-
if nls.nls_meta.nnln > 0
357+
if (nls.nls_meta.nnln > 0) || (nls.meta.nnln > 0)
358358
view(rows, (nls.lls.nnzh + 1):(nls.meta.nnzh)) .= nls.nlcon.hess_rows
359359
view(cols, (nls.lls.nnzh + 1):(nls.meta.nnzh)) .= nls.nlcon.hess_cols
360360
end

0 commit comments

Comments
 (0)