Algorithms for solve() on an OptimizationProblem().
Usage
LBFGSB(m = 10L)
LBFGS(m = 10L)
Nlminb()
AugLag(
rho0 = 10,
gamma = 10,
tau = 0.25,
ctol = 1e-08,
max_outer = 50L,
m = 10L
)Arguments
- m
Number of corrections kept by L-BFGS-B.
- rho0
Initial penalty parameter.
- gamma
Factor by which the penalty grows when the constraint violation does not decrease by
tau.- tau
Required decrease of the constraint violation.
- ctol
Tolerance on the constraint violation.
- max_outer
Maximum number of multiplier updates.
Details
LBFGSB()is the limited memory BFGS method with box constraints (stats::optim()method"L-BFGS-B");LBFGS()is another name for it. It is the default for problems without constraints.Nlminb()is the PORT quasi Newton method ofstats::nlminb(), with box constraints; it uses the symbolic Hessian when the problem has one.AugLag()is an augmented Lagrangian method for equality and inequality constraints, with bounds handled by the inner L-BFGS-B solver. It is the default for problems with constraints.
Gradients are the symbolic ones of the problem when present, and finite differences otherwise.
Solver options given to solve(): maxiters, abstol, reltol.
Examples
rosenbrock <- function(u, p) (p[1] - u[1])^2 + p[2] * (u[2] - u[1]^2)^2
prob <- OptimizationProblem(rosenbrock, c(-1, 2), c(1, 100))
solve(prob, LBFGSB())$u
#> [1] 0.9998315 0.9996603
solve(prob, Nlminb())$u
#> [1] 1 1