alpaqa 1.0.0a11
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Classes | Namespaces
alm.hpp File Reference
#include <alpaqa/config/config.hpp>
#include <alpaqa/export.hpp>
#include <alpaqa/inner/internal/solverstatus.hpp>
#include <alpaqa/outer/internal/alm-helpers.hpp>
#include <alpaqa/problem/type-erased-problem.hpp>
#include <chrono>
#include <iostream>
#include <string>
+ Include dependency graph for alm.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ALMParams< Conf >
 Parameters for the Augmented Lagrangian solver. More...
 
class  ALMSolver< InnerSolverT >
 Augmented Lagrangian Method solver. More...
 
struct  ALMSolver< InnerSolverT >::Stats
 

Namespaces

namespace  alpaqa
 

Class Documentation

◆ alpaqa::ALMParams

struct alpaqa::ALMParams
+ Collaboration diagram for ALMParams< Conf >:
Class Members
real_t tolerance = real_t(1e-5) Primal tolerance (used for stopping criterion of inner solver).
real_t dual_tolerance = real_t(1e-5) Dual tolerance (constraint violation and complementarity).
real_t penalty_update_factor = 10 Factor used in updating the penalty parameters.
real_t penalty_update_factor_lower = real_t(0.8) Factor to reduce penalty_update_factor when inner convergence fails.
real_t min_penalty_update_factor = real_t(1.1) Minimum value for penalty_update_factor after reduction because of inner convergence failure.
real_t initial_penalty = 1 Initial penalty parameter.

When set to zero (which is the default), it is computed automatically, based on the constraint violation in the starting point and the parameter initial_penalty_factor.

real_t initial_penalty_factor = 20 Initial penalty parameter factor.

Active if initial_penalty is set to zero.

real_t initial_penalty_lower = real_t(0.6) Factor to reduce the initial penalty factor by if convergence fails in in the first iteration.
real_t initial_tolerance = 1 Initial primal tolerance.
real_t initial_tolerance_increase = real_t(1.1) Factor to increase the initial primal tolerance if convergence fails in the first iteration.
real_t tolerance_update_factor = real_t(1e-1) Update factor for primal tolerance.
real_t ρ_increase = real_t(2) Factor to increase the primal tolerance update factor by if convergence fails.
real_t ρ_max = real_t(0.5) Maximum value of tolerance_update_factor after increase because of inner convergence failure.
real_t rel_penalty_increase_threshold = real_t(0.1) Error tolerance for penalty increase.
real_t max_multiplier = real_t(1e9) Lagrange multiplier bound.
real_t max_penalty = real_t(1e9) Maximum penalty factor.
real_t min_penalty = real_t(1e-9) Minimum penalty factor (used during initialization).
unsigned int max_iter = 100 Maximum number of outer ALM iterations.
nanoseconds max_time = std::chrono::minutes(5) Maximum duration.
unsigned max_num_initial_retries = 0 How many times can the initial penalty initial_penalty or initial_penalty_factor and the initial primal tolerance initial_tolerance be reduced.
unsigned max_num_retries = 0 How many times can the penalty update factor penalty_update_factor and the primal tolerance factor tolerance_update_factor be reduced.
unsigned max_total_num_retries = 0 Combined limit for max_num_initial_retries and max_num_retries.
unsigned print_interval = 0 When to print progress.

If set to zero, nothing will be printed. If set to N != 0, progress is printed every N iterations.

int print_precision = std::numeric_limits<real_t>::max_digits10 / 2 The precision of the floating point values printed by the solver.
bool single_penalty_factor = false Use one penalty factor for all m constraints.

◆ 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 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:

\[ \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.