24template <Config Conf = DefaultConfig>
33 std::chrono::nanoseconds
max_time = std::chrono::minutes(5);
62 10 * std::numeric_limits<real_t>::epsilon();
68 10 * std::numeric_limits<real_t>::epsilon();
85template <Config Conf = DefaultConfig>
108template <Config Conf = DefaultConfig>
138template <
class DirectionT>
151 requires std::default_initializable<Direction>
173 if (problem.get_m() != 0)
174 throw std::invalid_argument(
"Missing arguments y, Σ, e");
175 mvec y{
nullptr, 0}, Σ{
nullptr, 0}, e{
nullptr, 0};
202 std::ostream *
os = &std::cout;
205template <
class InnerSolverStats>
208template <Config Conf>
213 std::chrono::nanoseconds elapsed_time{};
215 std::chrono::nanoseconds time_progress_callback{};
217 unsigned iterations = 0;
219 unsigned linesearch_failures = 0;
221 unsigned linesearch_backtracks = 0;
223 unsigned stepsize_backtracks = 0;
225 unsigned lbfgs_failures = 0;
228 unsigned lbfgs_rejected = 0;
231 unsigned τ_1_accepted = 0;
234 unsigned count_τ = 0;
249template <Config Conf>
std::string get_name() const
PANOCSolver(const Params ¶ms, Direction &&direction)
PANOCSolver(const Params ¶ms)
Stats operator()(const P &problem, const SolveOptions &opts, rvec x, rvec y, crvec Σ, rvec e)
PANOCStats< config_t > Stats
std::function< void(const ProgressInfo &)> progress_cb
Stats operator()(const Problem &problem, const SolveOptions &opts, rvec x, rvec y, crvec Σ, rvec err_z)
PANOCSolver & set_progress_callback(std::function< void(const ProgressInfo &)> cb)
Specify a callable that is invoked with some intermediate results on each iteration of the algorithm.
InnerSolveOptions< config_t > SolveOptions
PANOCSolver(const Params ¶ms, const Direction &direction)
AtomicStopSignal stop_signal
const Params & get_params() const
Stats operator()(const P &problem, const SolveOptions &opts, rvec x)
TypeErasedProblem< config_t > Problem
The main polymorphic minimization problem interface.
#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 linesearch_tolerance_factor
Tolerance factor used in the line search.
LipschitzEstimateParams< config_t > Lipschitz
Parameters related to the Lipschitz constant estimate and step size.
unsigned max_no_progress
Maximum number of iterations without any progress before giving up.
real_t L_max
Maximum Lipschitz constant estimate.
bool recompute_last_prox_step_after_stepsize_change
If the step size changes, the direction buffer is flushed.
real_t min_linesearch_coefficient
Minimum weight factor between Newton step and projected gradient step.
std::chrono::nanoseconds max_time
Maximum duration.
real_t quadratic_upperbound_tolerance_factor
Tolerance factor used in the quadratic upper bound condition that determines the step size.
bool force_linesearch
Ignore the line search condition and always accept the accelerated step.
real_t linesearch_strictness_factor
Parameter β used in the line search (see Algorithm 2 in ).
unsigned print_interval
When to print progress.
int print_precision
The precision of the floating point values printed by the solver.
real_t L_min
Minimum Lipschitz constant estimate.
bool update_direction_in_candidate
Use the candidate point rather than the accepted point to update the quasi-Newton direction.
bool eager_gradient_eval
When evaluating ψ(x̂) in a candidate point, always evaluate ∇ψ(x̂) as well.
unsigned max_iter
Maximum number of inner PANOC iterations.
PANOCStopCrit stop_crit
What stopping criterion to use.
Parameters for the estimation of the Lipschitz constant of the gradient of the smooth term of the cos...
Tuning parameters for the PANOC algorithm.
unsigned stepsize_backtracks
@ ApproxKKT
Find an ε-approximate KKT point in the ∞-norm:
const TypeErasedProblem< config_t > * problem
const PANOCParams< config_t > * params
SolverStatus
Exit status of a numerical solver such as ALM or PANOC.
std::chrono::nanoseconds time_progress_callback
std::chrono::nanoseconds elapsed_time
typename Conf::real_t real_t
unsigned linesearch_backtracks
InnerStatsAccumulator< FISTAStats< Conf > > & operator+=(InnerStatsAccumulator< FISTAStats< Conf > > &acc, const FISTAStats< Conf > &s)
typename Conf::crvec crvec
unsigned linesearch_failures