alpaqa
1.0.0a12
Nonconvex constrained optimization
|
#include <alpaqa/outer/alm.hpp>
Augmented Lagrangian Method solver.
Classes | |
struct | Stats |
Public Types | |
using | Params = ALMParams< config_t > |
using | InnerSolver = InnerSolverT |
using | Problem = typename InnerSolver::Problem |
Public Member Functions | |
ALMSolver (Params params, InnerSolver &&inner_solver) | |
ALMSolver (Params params, const InnerSolver &inner_solver) | |
Stats | operator() (const Problem &problem, rvec x, rvec y, std::optional< rvec > Σ=std::nullopt) |
template<class P > | |
Stats | operator() (const P &problem, rvec x, rvec y, std::optional< rvec > Σ=std::nullopt) |
std::string | get_name () const |
void | stop () |
Abort the computation and return the result so far. | |
const Params & | get_params () const |
Public Attributes | |
InnerSolver | inner_solver |
std::ostream * | os = &std::cout |
Private Types | |
using | Helpers = detail::ALMHelpers< config_t > |
Private Attributes | |
Params | params |
struct alpaqa::ALMSolver::Stats |
Class Members | ||
---|---|---|
unsigned | outer_iterations = 0 |
Total number of outer ALM iterations (i.e. the number of times that the inner solver was invoked). |
nanoseconds | elapsed_time {} | Total elapsed time. |
unsigned | initial_penalty_reduced = 0 |
The number of times that the initial penalty factor was reduced by ALMParams::initial_penalty_lower and that the initial tolerance was increased by ALMParams::initial_tolerance_increase because the inner solver failed to converge in the first ALM iteration. If this number is greater than zero, consider lowering the initial penalty factor ALMParams::initial_penalty or ALMParams::initial_penalty_factor or increasing the initial tolerance ALMParams::initial_tolerance (or both). |
unsigned | penalty_reduced = 0 |
The number of times that the penalty update factor ALMParams::penalty_update_factor was reduced, that the tolerance update factor ALMParams::tolerance_update_factor was increased, and that an ALM iteration had to be restarted with a lower penalty factor and a higher tolerance because the inner solver failed to converge (not applicable in the first ALM iteration). If this number is greater than zero, consider lowerering the penalty update factor ALMParams::penalty_update_factor or increasing the tolerance update factor (or both). Lowering the initial penalty factor could help as well. |
unsigned | inner_convergence_failures = 0 | The total number of times that the inner solver failed to converge. |
real_t | ε = inf<config_t> | Final primal tolerance that was reached, depends on the stopping criterion used by the inner solver, see for example PANOCStopCrit. |
real_t | δ = inf<config_t> |
Final dual tolerance or constraint violation that was reached:
|
real_t | norm_penalty = 0 |
2-norm of the final penalty factors |
SolverStatus | status = SolverStatus::Busy |
Whether the solver converged or not.
|
InnerStatsAccumulator< typename Stats > | inner {} | The statistics of the inner solver invocations, accumulated over all ALM iterations. |
using Params = ALMParams<config_t> |
using InnerSolver = InnerSolverT |
using Problem = typename InnerSolver::Problem |
|
private |
|
inline |
|
inline |
ALMSolver< InnerSolverT >::Stats operator() | ( | const Problem & | problem, |
rvec | x, | ||
rvec | y, | ||
std::optional< rvec > | Σ = std::nullopt |
||
) |
|
inline |
|
inline |
|
inline |
|
private |
InnerSolver inner_solver |
std::ostream* os = &std::cout |