Skip to content

Commit

Permalink
Improve the function cons!
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Aug 26, 2024
1 parent 0a32c0b commit f3c87ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/julia_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,10 @@ end
function NLPModels.cons!(nlp::CUTEstModel{T}, x::StrideOneVector{T}, c::StrideOneVector{T}) where {T}
@lencheck nlp.meta.nvar x
@lencheck nlp.meta.ncon c
cconst(T, nlp.libsif, nlp.status, nlp.ncon, c)
jsize = nlp.index
jsize[] = 0
get_jacobian = cutest_false
ccfsg(T, nlp.libsif, nlp.status, nlp.nvar, nlp.ncon, x, c, nlp.nnzj, jsize, T[], nlp.jcols, nlp.jrows, get_jacobian)
increment!(nlp, :neval_cons)
return c
end
Expand Down

0 comments on commit f3c87ef

Please sign in to comment.