Skip to content

Commit

Permalink
bug 359, Issue with 'gulf' when use_nls= true
Browse files Browse the repository at this point in the history
  • Loading branch information
farhadrclass committed Jan 9, 2025
1 parent 190077e commit db1eaa9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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

0 comments on commit db1eaa9

Please sign in to comment.