proxsuite-nlp
0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
|
#include <proxsuite-nlp/prox-solver.hpp>
Public Types | |
using | Scalar = _Scalar |
using | Problem = ProblemTpl<Scalar> |
using | Workspace = WorkspaceTpl<Scalar> |
using | Results = ResultsTpl<Scalar> |
using | Manifold = ManifoldAbstractTpl<Scalar> |
using | LinesearchOptions = typename Linesearch<Scalar>::Options |
using | CallbackPtr = shared_ptr<helpers::base_callback<Scalar>> |
using | ConstraintSet = ConstraintSetTpl<Scalar> |
using | ConstraintObject = ConstraintObjectTpl<Scalar> |
Public Member Functions | |
ProxNLPSolverTpl (Problem &prob, const Scalar tol=1e-6, const Scalar mu_eq_init=1e-2, const Scalar rho_init=0., const VerboseLevel verbose=QUIET, const Scalar mu_lower=1e-9, const Scalar prim_alpha=0.1, const Scalar prim_beta=0.9, const Scalar dual_alpha=1., const Scalar dual_beta=1., LDLTChoice ldlt_blocked=LDLTChoice::BUNCHKAUFMAN, const LinesearchOptions ls_options=LinesearchOptions()) | |
const Problem & | problem () const |
const Manifold & | manifold () const |
void | setup () |
ConvergenceFlag | solve (const ConstVectorRef &x0, const std::vector< VectorRef > &lams0) |
Solve the problem. | |
PROXSUITE_NLP_DEPRECATED const Workspace & | getWorkspace () const |
PROXSUITE_NLP_DEPRECATED const Results & | getResults () const |
ConvergenceFlag | solve (const ConstVectorRef &x0, const ConstVectorRef &lams0=VectorXs(0)) |
Solve the problem. | |
void | innerLoop (Workspace &workspace, Results &results) |
void | assembleKktMatrix (Workspace &workspace) |
PROXSUITE_NLP_INLINE bool | iterativeRefinement (Workspace &workspace) const |
Iterative refinement of the KKT linear system. | |
void | updatePenalty () |
void | setDualPenalty (const Scalar beta) |
Set the dual penalty weight for the merit function. | |
void | setPenalty (const Scalar &new_mu) noexcept |
Set penalty parameter, its inverse and update the merit function. | |
void | setProxParameter (const Scalar &new_rho) noexcept |
Set proximal penalty parameter. | |
void | registerCallback (const CallbackPtr &cb) noexcept |
Add a callback to the solver instance. | |
void | clearCallbacks () noexcept |
Remove all callbacks from the instance. | |
void | updateToleranceFailure () noexcept |
Update primal-dual subproblem tolerances upon failure (insufficient primal feasibility) | |
void | updateToleranceSuccess () noexcept |
Update primal-dual subproblem tolerances upon successful outer-loop iterate (good primal feasibility) | |
void | tolerancePostUpdate () noexcept |
void | acceptMultipliers (Results &results, Workspace &workspace) const |
Accept Lagrange multiplier estimates. | |
void | computeMultipliers (const ConstVectorRef &inner_lams_data, Workspace &workspace) const |
void | computeProblemDerivatives (const ConstVectorRef &x, Workspace &workspace, boost::mpl::false_) const |
void | computeProblemDerivatives (const ConstVectorRef &x, Workspace &workspace, boost::mpl::true_) const |
void | computePrimalResiduals (Workspace &workspace, Results &results) const |
void | tryStep (Workspace &workspace, const Results &results, Scalar alpha) |
void | invokeCallbacks (Workspace &workspace, Results &results) |
Protected Attributes | |
Problem * | problem_ |
General nonlinear program to solve. | |
Semi-smooth Newton-based solver for nonlinear optimization using a primal-dual method of multipliers. This solver works by approximately solving the proximal subproblems in the method of multipliers.
Definition at line 39 of file prox-solver.hpp.
using proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::Scalar = _Scalar |
Definition at line 41 of file prox-solver.hpp.
using proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::Problem = ProblemTpl<Scalar> |
Definition at line 43 of file prox-solver.hpp.
using proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::Workspace = WorkspaceTpl<Scalar> |
Definition at line 44 of file prox-solver.hpp.
using proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::Results = ResultsTpl<Scalar> |
Definition at line 45 of file prox-solver.hpp.
using proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::Manifold = ManifoldAbstractTpl<Scalar> |
Definition at line 46 of file prox-solver.hpp.
using proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::LinesearchOptions = typename Linesearch<Scalar>::Options |
Definition at line 47 of file prox-solver.hpp.
using proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::CallbackPtr = shared_ptr<helpers::base_callback<Scalar>> |
Definition at line 48 of file prox-solver.hpp.
using proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::ConstraintSet = ConstraintSetTpl<Scalar> |
Definition at line 49 of file prox-solver.hpp.
using proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::ConstraintObject = ConstraintObjectTpl<Scalar> |
Definition at line 50 of file prox-solver.hpp.
proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::ProxNLPSolverTpl | ( | Problem & | prob, |
const Scalar | tol = 1e-6, | ||
const Scalar | mu_eq_init = 1e-2, | ||
const Scalar | rho_init = 0., | ||
const VerboseLevel | verbose = QUIET, | ||
const Scalar | mu_lower = 1e-9, | ||
const Scalar | prim_alpha = 0.1, | ||
const Scalar | prim_beta = 0.9, | ||
const Scalar | dual_alpha = 1., | ||
const Scalar | dual_beta = 1., | ||
LDLTChoice | ldlt_blocked = LDLTChoice::BUNCHKAUFMAN, | ||
const LinesearchOptions | ls_options = LinesearchOptions() ) |
|
inline |
Definition at line 134 of file prox-solver.hpp.
|
inline |
Definition at line 136 of file prox-solver.hpp.
|
inline |
Definition at line 138 of file prox-solver.hpp.
ConvergenceFlag proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::solve | ( | const ConstVectorRef & | x0, |
const std::vector< VectorRef > & | lams0 ) |
Solve the problem.
x0 | Initial guess. |
lams0 | Initial Lagrange multipliers given separately for each constraint. |
|
inline |
Definition at line 155 of file prox-solver.hpp.
|
inline |
Definition at line 157 of file prox-solver.hpp.
ConvergenceFlag proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::solve | ( | const ConstVectorRef & | x0, |
const ConstVectorRef & | lams0 = VectorXs(0) ) |
Solve the problem.
x0 | Initial guess. |
lams0 | Initial Lagrange multipliers given separately for each constraint. |
void proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::innerLoop | ( | Workspace & | workspace, |
Results & | results ) |
void proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::assembleKktMatrix | ( | Workspace & | workspace | ) |
PROXSUITE_NLP_INLINE bool proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::iterativeRefinement | ( | Workspace & | workspace | ) | const |
Iterative refinement of the KKT linear system.
|
inline |
Update penalty parameter using the provided factor (with a safeguard ProxNLPSolverTpl::mu_lower).
|
inline |
Set the dual penalty weight for the merit function.
Definition at line 182 of file prox-solver.hpp.
|
noexcept |
Set penalty parameter, its inverse and update the merit function.
new_mu | The new penalty parameter. |
|
noexcept |
Set proximal penalty parameter.
|
inlinenoexcept |
Add a callback to the solver instance.
Definition at line 192 of file prox-solver.hpp.
|
inlinenoexcept |
Remove all callbacks from the instance.
Definition at line 197 of file prox-solver.hpp.
|
noexcept |
Update primal-dual subproblem tolerances upon failure (insufficient primal feasibility)
This is called upon initialization of the solver.
|
noexcept |
Update primal-dual subproblem tolerances upon successful outer-loop iterate (good primal feasibility)
|
inlinenoexcept |
void proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::acceptMultipliers | ( | Results & | results, |
Workspace & | workspace ) const |
Accept Lagrange multiplier estimates.
void proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::computeMultipliers | ( | const ConstVectorRef & | inner_lams_data, |
Workspace & | workspace ) const |
Evaluate the problem data, as well as the proximal/projection operators, and the first-order & primal-dual multiplier estimates.
inner_lams_data | Inner (SQP) dual variables |
workspace | Problem workspace. |
void proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::computeProblemDerivatives | ( | const ConstVectorRef & | x, |
Workspace & | workspace, | ||
boost::mpl::false_ | ) const |
Evaluate the derivatives (cost gradient, Hessian, constraint Jacobians, vector-Hessian products) of the problem data.
x | Primal variable |
workspace | Problem workspace. |
second_order | Whether to compute the second-order information; set to false for e.g. linesearch. |
void proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::computeProblemDerivatives | ( | const ConstVectorRef & | x, |
Workspace & | workspace, | ||
boost::mpl::true_ | ) const |
Evaluate the derivatives (cost gradient, Hessian, constraint Jacobians, vector-Hessian products) of the problem data.
x | Primal variable |
workspace | Problem workspace. |
second_order | Whether to compute the second-order information; set to false for e.g. linesearch. |
void proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::computePrimalResiduals | ( | Workspace & | workspace, |
Results & | results ) const |
Compute the primal residuals at the current primal-dual pair \((x, \lambda^+)\), where the multipliers are chosen to be the predicted next ALM iterate.
void proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::tryStep | ( | Workspace & | workspace, |
const Results & | results, | ||
Scalar | alpha ) |
Take a trial step.
workspace | Workspace |
results | Contains the previous primal-dual point |
alpha | Step size |
|
inline |
Definition at line 260 of file prox-solver.hpp.
proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::Scalar |
Definition at line 42 of file prox-solver.hpp.
|
protected |
General nonlinear program to solve.
Definition at line 54 of file prox-solver.hpp.
ALMeritFunctionTpl<Scalar> proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::merit_fun |
Merit function.
Definition at line 58 of file prox-solver.hpp.
QuadraticDistanceCostTpl<Scalar> proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::prox_penalty |
Proximal regularization penalty.
Definition at line 60 of file prox-solver.hpp.
VerboseLevel proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::verbose = QUIET |
Level of verbosity of the solver.
Definition at line 63 of file prox-solver.hpp.
HessianApprox proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::hess_approx = HessianApprox::GAUSS_NEWTON |
Use a Gauss-Newton approximation for the Lagrangian Hessian.
Definition at line 65 of file prox-solver.hpp.
LinesearchStrategy proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::ls_strat = LinesearchStrategy::ARMIJO |
Linesearch strategy.
Definition at line 67 of file prox-solver.hpp.
MultiplierUpdateMode proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::mul_update_mode = MultiplierUpdateMode::NEWTON |
Definition at line 68 of file prox-solver.hpp.
std::size_t proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::max_refinement_steps_ = 5 |
linear algebra opts
Definition at line 71 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::kkt_tolerance_ = 1e-13 |
Definition at line 72 of file prox-solver.hpp.
LDLTChoice proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::ldlt_choice_ |
Definition at line 73 of file prox-solver.hpp.
KktSystem proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::kkt_system_ = KKT_CLASSIC |
Definition at line 74 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::inner_tol0 = 1. |
Definition at line 78 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::prim_tol0 = 1. |
Definition at line 79 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::inner_tol_ = inner_tol0 |
Definition at line 80 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::prim_tol_ = prim_tol0 |
Definition at line 81 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::rho_init_ |
Definition at line 82 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::mu_init_ |
Definition at line 83 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::inner_tol_min = 1e-9 |
Definition at line 89 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::mu_upper_ = 1. |
Definition at line 90 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::mu_lower_ = 1e-9 |
Definition at line 91 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::pdal_beta_ = 0.5 |
Definition at line 92 of file prox-solver.hpp.
BCLParamsTpl<Scalar> proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::bcl_params |
BCL strategy parameters.
Definition at line 95 of file prox-solver.hpp.
LinesearchOptions proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::ls_options |
Linesearch options.
Definition at line 98 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::target_tol |
Target tolerance for the problem.
Definition at line 101 of file prox-solver.hpp.
BaseLogger proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::logger {} |
Logger.
Definition at line 104 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::del_inc_k = 8. |
Definition at line 108 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::del_inc_big = 100. |
Definition at line 109 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::del_dec_k = 1. / 3. |
Definition at line 110 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::DELTA_MIN = 1e-14 |
Definition at line 111 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::DELTA_MAX = 1e6 |
Definition at line 112 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::DELTA_NONZERO_INIT = 1e-4 |
Definition at line 113 of file prox-solver.hpp.
Scalar proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::DELTA_INIT = 0. |
Definition at line 114 of file prox-solver.hpp.
std::size_t proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::max_iters = 100 |
Definition at line 116 of file prox-solver.hpp.
std::size_t proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::max_al_iters = 1000 |
Definition at line 117 of file prox-solver.hpp.
std::vector<CallbackPtr> proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::callbacks_ |
Callbacks.
Definition at line 120 of file prox-solver.hpp.
unique_ptr<Workspace> proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::workspace_ |
Definition at line 122 of file prox-solver.hpp.
unique_ptr<Results> proxsuite::nlp::ProxNLPSolverTpl< _Scalar >::results_ |
Definition at line 123 of file prox-solver.hpp.