Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug #359, Issue with 'gulf' when use_nls= true #365

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ADNLPProblems/gulf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function gulf(
m = min(m, 100)

function F!(r, x; m = m)
for i = 1:n
for i = 1:m
r[i] =
exp(-abs((25 + (-50 * log(i * one(T) / 100))^(2 // 3)) * m * i * x[2])^x[3] / x[1]) -
i // 100
Expand Down
7 changes: 7 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ include("test_utils.jl")
end
end

@testset "Test for nls_prob flag for $prob" begin
nls_prob = eval(Meta.parse("ADNLPProblems.$(prob)(use_nls = true)"))
if (typeof(nls_prob) <: ADNLPModels.ADNLSModel) # if the nls_flag is not supported we ignore the prob
test_in_place_residual(prob, nls_prob)
end
end

@testset "Test problems compatibility for $prob" begin
prob_fn = eval(Meta.parse("PureJuMP.$(prob)"))
model = prob_fn(n = ndef)
Expand Down
Loading