15template <
class InnerSolverStats>
16struct InnerStatsAccumulator;
19template <Config Conf = DefaultConfig>
69 std::chrono::nanoseconds
max_time = std::chrono::minutes(5);
95template <
class InnerSolverT>
102 using Problem =
typename InnerSolver::Problem;
158 std::optional<rvec> Σ = std::nullopt);
161 std::optional<rvec> Σ = std::nullopt) {
162 return operator()(Problem::template make<P>(problem), x, y, Σ);
181 std::ostream *
os = &std::cout;
Augmented Lagrangian Method solver.
std::string get_name() const
unsigned penalty_reduced
The number of times that the penalty update factor ALMParams::penalty_update_factor was reduced,...
ALMSolver(Params params, const InnerSolver &inner_solver)
real_t δ
Final dual tolerance or constraint violation that was reached:
real_t norm_penalty
2-norm of the final penalty factors .
typename InnerSolver::Problem Problem
std::chrono::nanoseconds elapsed_time
Total elapsed time.
unsigned initial_penalty_reduced
The number of times that the initial penalty factor was reduced by ALMParams::initial_penalty_lower a...
InnerStatsAccumulator< typename InnerSolver::Stats > inner
The statistics of the inner solver invocations, accumulated over all ALM iterations.
unsigned inner_convergence_failures
The total number of times that the inner solver failed to converge.
void stop()
Abort the computation and return the result so far.
real_t ε
Final primal tolerance that was reached, depends on the stopping criterion used by the inner solver,...
const Params & get_params() const
unsigned outer_iterations
Total number of outer ALM iterations (i.e.
Stats operator()(const P &problem, rvec x, rvec y, std::optional< rvec > Σ=std::nullopt)
ALMSolver(Params params, InnerSolver &&inner_solver)
Stats operator()(const Problem &problem, rvec x, rvec y, std::optional< rvec > Σ=std::nullopt)
SolverStatus status
Whether the solver converged or not.
#define USING_ALPAQA_CONFIG(Conf)
#define ALPAQA_IF_QUADF(...)
#define ALPAQA_IF_LONGD(...)
#define ALPAQA_IF_FLOAT(...)
#define USING_ALPAQA_CONFIG_TEMPLATE(Conf)
#define ALPAQA_EXPORT_EXTERN_TEMPLATE(...)
real_t max_multiplier
Lagrange multiplier bound.
unsigned max_total_num_retries
Combined limit for max_num_initial_retries and max_num_retries.
real_t initial_penalty_factor
Initial penalty parameter factor.
real_t tolerance
Primal tolerance (used for stopping criterion of inner solver).
real_t tolerance_update_factor
Update factor for primal tolerance.
real_t penalty_update_factor
Factor used in updating the penalty parameters.
unsigned int max_iter
Maximum number of outer ALM iterations.
real_t min_penalty
Minimum penalty factor (used during initialization).
SolverStatus
Exit status of a numerical solver such as ALM or PANOC.
unsigned max_num_retries
How many times can the penalty update factor penalty_update_factor and the primal tolerance factor to...
real_t dual_tolerance
Dual tolerance (constraint violation and complementarity).
typename Conf::real_t real_t
real_t max_penalty
Maximum penalty factor.
real_t initial_tolerance
Initial primal tolerance.
real_t ρ_max
Maximum value of tolerance_update_factor after increase because of inner convergence failure.
real_t initial_penalty_lower
Factor to reduce the initial penalty factor by if convergence fails in in the first iteration.
std::chrono::nanoseconds max_time
Maximum duration.
real_t initial_tolerance_increase
Factor to increase the initial primal tolerance if convergence fails in the first iteration.
unsigned max_num_initial_retries
How many times can the initial penalty initial_penalty or initial_penalty_factor and the initial prim...
real_t rel_penalty_increase_threshold
Error tolerance for penalty increase.
real_t penalty_update_factor_lower
Factor to reduce penalty_update_factor when inner convergence fails.
unsigned print_interval
When to print progress.
int print_precision
The precision of the floating point values printed by the solver.
real_t ρ_increase
Factor to increase the primal tolerance update factor by if convergence fails.
real_t initial_penalty
Initial penalty parameter.
bool single_penalty_factor
Use one penalty factor for all m constraints.
real_t min_penalty_update_factor
Minimum value for penalty_update_factor after reduction because of inner convergence failure.
Parameters for the Augmented Lagrangian solver.
Double-precision double configuration.
Single-precision float configuration.
long double configuration.