14#include <boost/mpl/bool.hpp>
48 using CallbackPtr = shared_ptr<helpers::base_callback<Scalar>>;
126 const Scalar mu_eq_init = 1e-2,
const Scalar rho_init = 0.,
128 const Scalar mu_lower = 1e-9,
const Scalar prim_alpha = 0.1,
129 const Scalar prim_beta = 0.9,
const Scalar dual_alpha = 1.,
130 const Scalar dual_beta = 1.,
152 const std::vector<VectorRef> &lams0);
154 PROXSUITE_NLP_DEPRECATED
156 PROXSUITE_NLP_DEPRECATED
168 const ConstVectorRef &lams0 = VectorXs(0));
238 boost::mpl::false_) const;
241 boost::mpl::true_) const;
262 cb->call(workspace, results);
272 const Eigen::VectorXi &signature);
277#include "proxsuite-nlp/prox-solver.hxx"
279#ifdef PROXSUITE_NLP_ENABLE_TEMPLATE_INSTANTIATION
280#include "proxsuite-nlp/prox-solver.txx"
Scalar target_tol
Target tolerance for the problem.
void setProxParameter(const Scalar &new_rho) noexcept
Set proximal penalty parameter.
void clearCallbacks() noexcept
Remove all callbacks from the instance.
PROXSUITE_NLP_DEPRECATED const Workspace & getWorkspace() const
PROXSUITE_NLP_DEPRECATED const Results & getResults() const
unique_ptr< Results > results_
shared_ptr< helpers::base_callback< Scalar > > CallbackPtr
Scalar DELTA_NONZERO_INIT
void setDualPenalty(const Scalar beta)
Set the dual penalty weight for the merit function.
LinesearchStrategy ls_strat
Linesearch strategy.
void computeProblemDerivatives(const ConstVectorRef &x, Workspace &workspace, boost::mpl::false_) const
unique_ptr< Workspace > workspace_
void tolerancePostUpdate() noexcept
void updateToleranceFailure() noexcept
Update primal-dual subproblem tolerances upon failure (insufficient primal feasibility)
void computePrimalResiduals(Workspace &workspace, Results &results) const
ALMeritFunctionTpl< Scalar > merit_fun
Merit function.
Problem * problem_
General nonlinear program to solve.
void setPenalty(const Scalar &new_mu) noexcept
Set penalty parameter, its inverse and update the merit function.
ConvergenceFlag solve(const ConstVectorRef &x0, const std::vector< VectorRef > &lams0)
Solve the problem.
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())
void assembleKktMatrix(Workspace &workspace)
void invokeCallbacks(Workspace &workspace, Results &results)
const Problem & problem() const
ConvergenceFlag solve(const ConstVectorRef &x0, const ConstVectorRef &lams0=VectorXs(0))
Solve the problem.
std::vector< CallbackPtr > callbacks_
Callbacks.
const Manifold & manifold() const
typename Linesearch< Scalar >::Options LinesearchOptions
BCLParamsTpl< Scalar > bcl_params
BCL strategy parameters.
VerboseLevel verbose
Level of verbosity of the solver.
void innerLoop(Workspace &workspace, Results &results)
QuadraticDistanceCostTpl< Scalar > prox_penalty
Proximal regularization penalty.
void updateToleranceSuccess() noexcept
Update primal-dual subproblem tolerances upon successful outer-loop iterate (good primal feasibility)
void registerCallback(const CallbackPtr &cb) noexcept
Add a callback to the solver instance.
PROXSUITE_NLP_INLINE bool iterativeRefinement(Workspace &workspace) const
Iterative refinement of the KKT linear system.
void tryStep(Workspace &workspace, const Results &results, Scalar alpha)
void acceptMultipliers(Results &results, Workspace &workspace) const
Accept Lagrange multiplier estimates.
HessianApprox hess_approx
Use a Gauss-Newton approximation for the Lagrangian Hessian.
MultiplierUpdateMode mul_update_mode
void computeMultipliers(const ConstVectorRef &inner_lams_data, Workspace &workspace) const
std::size_t max_refinement_steps_
linear algebra opts
LinesearchOptions ls_options
Linesearch options.
Forward declarations and configuration macros.
Base structs for linesearch algorithms.
#define PROXSUITE_NLP_INLINE
#define PROXSUITE_NLP_DYNAMIC_TYPEDEFS(Scalar)
InertiaFlag checkInertia(const int ndx, const int nc, const Eigen::VectorXi &signature)
Check the matrix has the desired inertia.
VerboseLevel
Verbosity level.
@ GAUSS_NEWTON
Gauss-Newton (or rather SCQP) approximation.
@ EXACT
Exact Hessian construction from provided function Hessians.
@ BUNCHKAUFMAN
Use Bunch-Kaufman factorization.
Primal-dual augmented Lagrangian-type merit function.
Packs a ConstraintSetTpl and C2FunctionTpl together.
Base constraint set type.
polymorphic< Manifold > manifold_
The working manifold .
Weighted quadratic distance on a space.
Results struct, holding the returned data from the solver.