Line-search SQP (Nocedal and Wright 2006, Algorithm 18.3): each QP
subproblem min p'Bp/2 + g'p s.t. A_E p + c_E = 0, A_I p + c_I >= 0 is solved
exactly by the Goldfarb-Idnani dual active-set method; the l1 merit
f + mu (sum |c_E| + sum max(0, -c_I)) with mu = max(mu, 1.1 max |lambda|) is
decreased by halving backtracking; B follows Powell's damped BFGS update on
the Lagrangian gradient L = f - lambda'c.
Usage
SequentialQuadraticProgramming(
f,
x0,
grad = NULL,
eq = list(),
ineq = list(),
eq_jac = NULL,
ineq_jac = NULL,
tol = 1e-08,
max_iter = 200
)
Arguments
- f
Objective.
- x0
Starting point.
- grad
Gradient of f (central differences when NULL).
- eq, ineq
Lists of constraint functions (c(x) = 0 and c(x) >= 0).
- eq_jac, ineq_jac
Functions returning constraint Jacobians (rows), or NULL.
- tol
KKT tolerance.
- max_iter
Iteration cap.
Value
list(x, fun, multipliers_eq, multipliers_ineq, kkt_residual,
violation, n_iter, converged).
References
Nocedal, J. and Wright, S. J. (2006). Numerical Optimization,
2nd ed., Algorithm 18.3. Goldfarb, D. and Idnani, A. (1983). A numerically
stable dual method for solving strictly convex quadratic programs.
Mathematical Programming 27, 1-33.
Examples
SequentialQuadraticProgramming(function(x) sum(x^2), c(2, 0),
eq = list(function(x) x[1] + x[2] - 1))$x
#> [1] 0.5 0.5