Skip to content

Commit 82100be

Browse files
authored
objcons call objcons! (#467)
1 parent d78e2d0 commit 82100be

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/nlp/api.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,8 @@ Evaluate ``f(x)`` and ``c(x)`` at `x`.
118118
"""
119119
function objcons(nlp::AbstractNLPModel{T, S}, x::AbstractVector) where {T, S}
120120
@lencheck nlp.meta.nvar x
121-
f = obj(nlp, x)
122-
c = cons(nlp, x)
123-
return f, c
121+
c = S(undef, nlp.meta.ncon)
122+
return objcons!(nlp, x, c)
124123
end
125124

126125
"""

0 commit comments

Comments
 (0)