IpoptOptimizer() (OptimizationIpopt.jl) and MadNLPOptimizer()
(OptimizationMadNLP.jl) solve
$$\min f(u) \quad \textrm{subject to} \quad lcons \le cons(u) \le ucons,
\; lb \le u \le ub$$
with the primal dual interior point method and filter line search of
Waechter and Biegler (2006), ported from Ipopt 3.14: a logarithmic
barrier for the bounds and for slacks of the inequalities, the monotone
or adaptive barrier update, gradient based scaling of the problem,
Ipopt's inertia correction of the Newton system, the backtracking filter
line search with second order corrections, the watchdog and the soft
restoration phase, and Ipopt's restoration phase, which minimizes the
1-norm of the infeasibility when the line search fails.
Value
An algorithm object for solve().
Details
Gradients, Hessians and constraint Jacobians and Hessians come from the
problem when it has them and from finite differences otherwise.
reltol (Ipopt) or abstol (MadNLP) sets the convergence tolerance
(default 1e-8) and maxiters the iteration limit (default 3000); for
Ipopt, tol and max_iter in additional_options take precedence, as in
OptimizationIpopt.jl. The fields of IpoptOptimizer and Ipopt options in
additional_options act as in Ipopt (tolerances, scaling,
mu_strategy, mu_oracle, hessian_approximation,
warm_start_init_point and the others); a linear solver or scaling
library that Ipopt_jll lacks (the HSL solvers, MC19) ends the solve
before the first iteration, as Ipopt's Invalid_Option does. Options that
only change printing or the linear algebra library are accepted without
effect on the iterates. line_search_method = "penalty" runs Ipopt's
penalty function line search (PenaltyLSAcceptor, whose watchdog ends the
solve as Ipopt's Invalid_Option does) and "cg-penalty" the method of
Chen and Goldfarb (Ipopt's contrib/CGPenalty: its search direction,
perturbation handler and line search, without a restoration phase).
MadNLPOptimizer() runs MadNLP 0.11's own interior point method:
fixed variables become parameters, inequalities get slacks, the
problem is scaled by its gradients, and the iterations follow MadNLP's
filter line search with its soft and robust restoration phases.
barrier is "MonotoneUpdate", "QualityFunctionUpdate" or
"LOQOUpdate", or a list with type and that update's fields (for
example list(type = "MonotoneUpdate", mu_init = 0.5)).
hessian_approximation is "ExactHessian", "CompactLBFGS", or
"BFGS" or "DampedBFGS" (which need a dense KKT system).
kkt_system is "SparseKKTSystem" (the default),
"SparseCondensedKKTSystem" (the slacks and the inequality duals
condensed out of a definite system; equalities are relaxed into
inequalities), "DenseKKTSystem" or "DenseCondensedKKTSystem" (with
"LapackCPUSolver"). linear_solver is "MumpsSolver" (the default),
"LapackCPUSolver", "LDLSolver", "UmfpackSolver" (which selects the
InertiaFree correction) or "CHOLMODSolver" (CHOLMOD through the
Matrix package, Cholesky or, with cholmod_algorithm = "LDL" in
additional_options, LDL'; it needs the condensed KKT system, as the
Cholesky factorization of the indefinite augmented system fails). The
others factorize the KKT system densely.
additional_options sets MadNLP's options (for example
inertia_correction_method, fixed_variable_treatment, bound_push,
kappa_d) and the Richardson refinement options; MadNLP ignores the
other names with a warning. The status is MadNLP's (for example
"SOLVE_SUCCEEDED" or "INFEASIBLE_PROBLEM_DETECTED"), mapped to the
return code as in OptimizationMadNLP.jl.
Examples
prob <- OptimizationProblem(function(u, p) (u[1] - 2) * (u[1] - 2) + (u[2] - 1) * (u[2] - 1),
c(0, 0), numeric(), cons = function(u, p) u[1] * u[1] + u[2] * u[2],
lcons = -Inf, ucons = 1)
solve(prob, IpoptOptimizer())$u
#> [1] 0.8944272 0.4472136