Skip to content

Commit af79578

Browse files
andreasnoackamontoison
authored andcommitted
Increase maxfun for cobyla
And make maxfun conditional on the solver since cobyla needs many more function evaluations than the other solvers.
1 parent ef05bbc commit af79578

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/runtests.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ end
251251
rhobeg = 1.0
252252
rhoend = 1e-5
253253
ftarget = -Inf
254-
maxfun = 3000n
255254
npt = 2n + 1
256255
iprint = PRIMA.MSG_EXIT
257256

@@ -265,6 +264,8 @@ end
265264
b_ineq = [6, 12, 1]
266265

267266
@testset "$(optimizer_name(optim))" for optim in (:uobyqa, :newuoa, :bobyqa, :cobyla, :lincoa)
267+
# COBYLA needs many more function evaluations than the other solvers
268+
maxfun = optim == :cobyla ? 10000n : 100n
268269

269270
println("\nUnconstrained minimization of Rosenbrock function by $(optimizer_name(optim)):")
270271
x0 = [-1, 2]

0 commit comments

Comments
 (0)