alpaqa 1.0.0a13
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | Private Types | Private Attributes | List of all members
ALMSolver< InnerSolverT > Class Template Reference

#include <alpaqa/outer/alm.hpp>

Detailed Description

template<class InnerSolverT>
class alpaqa::ALMSolver< InnerSolverT >

Augmented Lagrangian Method solver.

Examples
C++/CasADi/Rosenbrock/main.cpp, C++/CustomCppProblem/main.cpp, C++/DLProblem/main.cpp, and C++/FortranProblem/main.cpp.

Definition at line 69 of file alm.hpp.

+ Collaboration diagram for ALMSolver< InnerSolverT >:

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 Paramsget_params () const
 

Public Attributes

InnerSolver inner_solver
 
std::ostream * os = &std::cout
 

Private Types

using Helpers = detail::ALMHelpers< config_t >
 

Private Attributes

Params params
 

Class Documentation

◆ alpaqa::ALMSolver::Stats

struct alpaqa::ALMSolver::Stats
+ Collaboration diagram for ALMSolver< InnerSolverT >::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 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:

\[ \delta = \| \Pi_D\left(g(x^k) + \Sigma^{-1}y\right) \|_\infty \]

real_t norm_penalty = 0 2-norm of the final penalty factors \( \| \Sigma \|_2 \).
SolverStatus status = SolverStatus::Busy Whether the solver converged or not.
See also
SolverStatus
InnerStatsAccumulator< typename Stats > inner {} The statistics of the inner solver invocations, accumulated over all ALM iterations.

Member Typedef Documentation

◆ Params

template<class InnerSolverT >
using Params = ALMParams<config_t>

Definition at line 73 of file alm.hpp.

◆ InnerSolver

Definition at line 74 of file alm.hpp.

◆ Problem

template<class InnerSolverT >
using Problem = typename InnerSolver::Problem

Definition at line 75 of file alm.hpp.

◆ Helpers

template<class InnerSolverT >
using Helpers = detail::ALMHelpers<config_t>
private

Definition at line 132 of file alm.hpp.

Constructor & Destructor Documentation

◆ ALMSolver() [1/2]

template<class InnerSolverT >
ALMSolver ( Params  params,
InnerSolver &&  inner_solver 
)
inline

Definition at line 106 of file alm.hpp.

◆ ALMSolver() [2/2]

template<class InnerSolverT >
ALMSolver ( Params  params,
const InnerSolver inner_solver 
)
inline

Definition at line 109 of file alm.hpp.

Member Function Documentation

◆ operator()() [1/2]

template<class InnerSolverT >
ALMSolver< InnerSolverT >::Stats operator() ( const Problem problem,
rvec  x,
rvec  y,
std::optional< rvec Σ = std::nullopt 
)

Definition at line 20 of file alm.tpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator()() [2/2]

template<class InnerSolverT >
template<class P >
Stats operator() ( const P &  problem,
rvec  x,
rvec  y,
std::optional< rvec Σ = std::nullopt 
)
inline

Definition at line 115 of file alm.hpp.

+ Here is the call graph for this function:

◆ get_name()

template<class InnerSolverT >
std::string get_name ( ) const
inline

Definition at line 120 of file alm.hpp.

◆ stop()

template<class InnerSolverT >
void stop ( )
inline

Abort the computation and return the result so far.

Can be called from other threads or signal handlers.

Definition at line 126 of file alm.hpp.

◆ get_params()

template<class InnerSolverT >
const Params & get_params ( ) const
inline

Definition at line 128 of file alm.hpp.

Member Data Documentation

◆ params

template<class InnerSolverT >
Params params
private

Definition at line 131 of file alm.hpp.

◆ inner_solver

template<class InnerSolverT >
InnerSolver inner_solver

Definition at line 135 of file alm.hpp.

◆ os

template<class InnerSolverT >
std::ostream* os = &std::cout

Definition at line 136 of file alm.hpp.


The documentation for this class was generated from the following files: