Skip to contents

Sets and changes the NLOPT options.

Usage

nl.opts(optlist = NULL)

Arguments

optlist

list of options, see below.

Value

returns a list with default and changed options.

Details

The following options can be set (here with default values):

stopval = -Inf, # stop minimization at this value
xtol_rel = 1e-6, # stop on small optimization step
maxeval = 1000, # stop on this many function evaluations
ftol_rel = 0.0, # stop on change times function value
ftol_abs = 0.0, # stop on small change of function value
check_derivatives = FALSE

Note

There are more options that can be set for solvers in NLOPT. These cannot be set through their wrapper functions. To see the full list of options and algorithms, type nloptr.print.options().

Author

Hans W. Borchers

Examples


nl.opts(list(xtol_rel = 1e-8, maxeval = 2000))
#> $stopval
#> [1] -Inf
#> 
#> $xtol_rel
#> [1] 1e-08
#> 
#> $maxeval
#> [1] 2000
#> 
#> $ftol_rel
#> [1] 0
#> 
#> $ftol_abs
#> [1] 0
#> 
#> $check_derivatives
#> [1] FALSE
#> 
#> $algorithm
#> NULL
#>