Skip to content

Commit 9661813

Browse files
committed
toint
1 parent c2ce1ba commit 9661813

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ADNLPProblems/toint.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
export toint
22

33
function toint(; n::Int = default_nvar, kwargs...)
4-
return toint(Val(:nlp); n = n; kwargs...)
4+
return toint(Val(:nlp); n = n, kwargs...)
55
end
66

77
function toint(::Val{:nlp}; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T}
88
function f(x; n = length(x))
99
return sum((cos(x[i]) - x[i]^2)^2 for i = 1:n)
1010
end
1111
x0 = zeros(T, n)
12-
return ADNLPModels.ADNLPModel(f, x0, name = "toint"; kwargs...)
12+
return ADNLPModels.ADNLPModel(f, x0, name = "toint", minimize = true, kwargs...)
1313
end

0 commit comments

Comments
 (0)