Skip to content

Commit

Permalink
Call cons! in objcons! for unconstrained (#463)
Browse files Browse the repository at this point in the history
This unifies the behavior with `objcons`
  • Loading branch information
tmigot authored May 24, 2024
1 parent 9bd5467 commit cca1290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nlp/api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function objcons!(nlp::AbstractNLPModel, x::AbstractVector, c::AbstractVector)
@lencheck nlp.meta.nvar x
@lencheck nlp.meta.ncon c
f = obj(nlp, x)
nlp.meta.ncon > 0 && cons!(nlp, x, c)
cons!(nlp, x, c)
return f, c
end

Expand Down

0 comments on commit cca1290

Please sign in to comment.