#include <alpaqa/export.hpp>
#include <alpaqa/inner/directions/panoc-direction-update.hpp>
#include <alpaqa/inner/inner-solve-options.hpp>
#include <alpaqa/inner/internal/lipschitz.hpp>
#include <alpaqa/inner/internal/panoc-helpers.hpp>
#include <alpaqa/inner/internal/panoc-stop-crit.hpp>
#include <alpaqa/inner/internal/solverstatus.hpp>
#include <alpaqa/problem/type-erased-problem.hpp>
#include <alpaqa/util/atomic-stop-signal.hpp>
#include <chrono>
#include <iostream>
#include <limits>
#include <stdexcept>
#include <string>
#include <type_traits>
Go to the source code of this file.
Classes | |
struct | PANOCParams< Conf > |
Tuning parameters for the PANOC algorithm. More... | |
struct | PANOCStats< Conf > |
struct | PANOCProgressInfo< Conf > |
class | PANOCSolver< DirectionT > |
PANOC solver for ALM. More... | |
struct | InnerStatsAccumulator< PANOCStats< Conf > > |
Namespaces | |
namespace | alpaqa |
Functions | |
template<Config Conf> | |
InnerStatsAccumulator< PANOCStats< Conf > > & | operator+= (InnerStatsAccumulator< PANOCStats< Conf > > &acc, const PANOCStats< Conf > &s) |
struct alpaqa::PANOCParams |
Class Members | ||
---|---|---|
LipschitzEstimateParams< config_t > | Lipschitz | Parameters related to the Lipschitz constant estimate and step size. |
unsigned | max_iter = 100 | Maximum number of inner PANOC iterations. |
nanoseconds | max_time = std::chrono::minutes(5) | Maximum duration. |
real_t | min_linesearch_coefficient = real_t(1. / 256) | Minimum weight factor between Newton step and projected gradient step. |
bool | force_linesearch = false |
Ignore the line search condition and always accept the accelerated step. (For testing purposes only). |
real_t | linesearch_strictness_factor = real_t(0.95) |
Parameter β used in the line search (see Algorithm 2 in [1]). \( 0 < \beta < 1 \) |
real_t | L_min = real_t(1e-5) | Minimum Lipschitz constant estimate. |
real_t | L_max = real_t(1e20) | Maximum Lipschitz constant estimate. |
PANOCStopCrit | stop_crit = PANOCStopCrit::ApproxKKT | What stopping criterion to use. |
unsigned | max_no_progress = 10 | Maximum number of iterations without any progress before giving up. |
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. |
real_t | quadratic_upperbound_tolerance_factor | |
real_t | linesearch_tolerance_factor | |
bool | update_direction_in_candidate = false | |
bool | recompute_last_prox_step_after_lbfgs_flush = false | |
bool | eager_gradient_eval = false |
When evaluating ψ(x̂) in a candidate point, always evaluate ∇ψ(x̂) as well. Can be beneficial if computing ∇ψ(x̂) is not much more expensive than computing just ψ(x), and if ∇ψ(x̂) is required in the next iteration (e.g. for the stopping criterion, or when using the NoopDirection). |
struct alpaqa::PANOCStats |
Class Members | ||
---|---|---|
SolverStatus | status = SolverStatus::Busy | |
real_t | ε = inf<config_t> | |
nanoseconds | elapsed_time {} | |
nanoseconds | time_progress_callback {} | |
unsigned | iterations = 0 | |
unsigned | linesearch_failures = 0 | |
unsigned | linesearch_backtracks = 0 | |
unsigned | stepsize_backtracks = 0 | |
unsigned | lbfgs_failures = 0 | |
unsigned | lbfgs_rejected = 0 | |
unsigned | τ_1_accepted = 0 | |
unsigned | count_τ = 0 | |
real_t | sum_τ = 0 | |
real_t | final_γ = 0 | |
real_t | final_ψ = 0 | |
real_t | final_h = 0 | |
real_t | final_φγ = 0 |
struct alpaqa::PANOCProgressInfo |
Class Members | ||
---|---|---|
unsigned | k | |
SolverStatus | status | |
crvec | x | |
crvec | p | |
real_t | norm_sq_p | |
crvec | x̂ | |
real_t | φγ | |
real_t | ψ | |
crvec | grad_ψ | |
real_t | ψ_hat | |
crvec | grad_ψ_hat | |
crvec | q | |
real_t | L | |
real_t | γ | |
real_t | τ | |
real_t | ε | |
crvec | Σ | |
crvec | y | |
unsigned | outer_iter | |
const TypeErasedProblem< config_t > * | problem | |
const PANOCParams< config_t > * | params |
struct alpaqa::InnerStatsAccumulator< PANOCStats< Conf > > |
Class Members | ||
---|---|---|
nanoseconds | elapsed_time {} | Total elapsed time in the inner solver. |
nanoseconds | time_progress_callback {} | Total time spent in the user-provided progress callback. |
unsigned | iterations = 0 | Total number of inner PANOC iterations. |
unsigned | linesearch_failures = 0 | Total number of PANOC line search failures. |
unsigned | linesearch_backtracks = 0 | Total number of PANOC line search backtracking steps. |
unsigned | stepsize_backtracks = 0 | Total number of PANOC step size reductions. |
unsigned | lbfgs_failures = 0 | Total number of times that the L-BFGS direction was not finite. |
unsigned | lbfgs_rejected = 0 |
Total number of times that the L-BFGS update was rejected (i.e. it could have resulted in a non-positive definite Hessian estimate). |
unsigned | τ_1_accepted = 0 |
Total number of times that a line search parameter of \( \tau = 1 \) was accepted (i.e. no backtracking necessary). |
unsigned | count_τ = 0 | The total number of line searches performed (used for computing the average value of \( \tau \)). |
real_t | sum_τ = 0 | The sum of the line search parameter \( \tau \) in all iterations (used for computing the average value of \( \tau \)). |
real_t | final_γ = 0 | The final PANOC step size γ. |
real_t | final_ψ = 0 | Final value of the smooth cost \( \psi(\hat x) \). |
real_t | final_h = 0 | Final value of the nonsmooth cost \( h(\hat x) \). |
real_t | final_φγ = 0 | Final value of the forward-backward envelope, \( \varphi_\gamma(x) \) (note that this is in the point \( x \), not \( \hat x \)). |