alpaqa
1.0.0a15
Nonconvex constrained optimization
|
Definition at line 17 of file panoc-helpers.tpp.
Public Types | |
using | Problem = alpaqa::TypeErasedProblem< config_t > |
using | Box = alpaqa::Box< config_t > |
Static Public Member Functions | |
static void | calc_err_z (const Problem &p, crvec x̂, crvec y, crvec Σ, rvec err_z) |
Calculate the error between ẑ and g(x). | |
static bool | stop_crit_requires_grad_ψx̂ (PANOCStopCrit crit) |
static real_t | calc_error_stop_crit (const Problem &problem, PANOCStopCrit crit, crvec pₖ, real_t γ, crvec xₖ, crvec x̂ₖ, crvec ŷₖ, crvec grad_ψₖ, crvec grad_̂ψₖ, rvec work_n1, rvec work_n2) |
Compute the ε from the stopping criterion, see PANOCStopCrit. | |
static real_t | descent_lemma (const Problem &problem, real_t rounding_tolerance, real_t L_max, crvec xₖ, real_t ψₖ, crvec grad_ψₖ, crvec y, crvec Σ, rvec x̂ₖ, rvec pₖ, rvec ŷx̂ₖ, real_t &ψx̂ₖ, real_t &norm_sq_pₖ, real_t &grad_ψₖᵀpₖ, real_t &Lₖ, real_t &γₖ) |
Increase the estimate of the Lipschitz constant of the objective gradient and decrease the step size until quadratic upper bound or descent lemma is satisfied: | |
template<class ParamsT , class DurationT > | |
static SolverStatus | check_all_stop_conditions (const ParamsT ¶ms, const InnerSolveOptions< config_t > &opts, DurationT time_elapsed, unsigned iteration, const AtomicStopSignal &stop_signal, real_t εₖ, unsigned no_progress) |
Check all stop conditions (required tolerance reached, out of time, maximum number of iterations exceeded, interrupted by user, infinite iterate, no progress made) | |
static void | calc_augmented_lagrangian_hessian_prod_fd (const Problem &problem, crvec xₖ, crvec y, crvec Σ, crvec grad_ψ, crvec v, rvec Hv, rvec work_n1, rvec work_n2, rvec work_m) |
Compute the Hessian matrix of the augmented Lagrangian function multiplied by the given vector, using finite differences. | |
static real_t | initial_lipschitz_estimate (const Problem &problem, crvec x, crvec y, crvec Σ, real_t ε, real_t δ, real_t L_min, real_t L_max, real_t &ψ, rvec grad_ψ, rvec work_x, rvec work_grad_ψ, rvec work_n, rvec work_m) |
Estimate the Lipschitz constant of the gradient | |
static real_t | initial_lipschitz_estimate (const Problem &problem, crvec xₖ, crvec y, crvec Σ, real_t ε, real_t δ, real_t L_min, real_t L_max, rvec grad_ψ, rvec work_n1, rvec work_n2, rvec work_n3, rvec work_m) |
Estimate the Lipschitz constant of the gradient | |
using Problem = alpaqa::TypeErasedProblem<config_t> |
Definition at line 19 of file panoc-helpers.tpp.
using Box = alpaqa::Box<config_t> |
Definition at line 20 of file panoc-helpers.tpp.
|
inlinestatic |
Calculate the error between ẑ and g(x).
[in] | p | Problem description |
[in] | x̂ | Decision variable |
[in] | y | Lagrange multipliers |
[in] | Σ | Penalty weights |
[out] | err_z |
Definition at line 24 of file panoc-helpers.tpp.
|
inlinestatic |
Definition at line 44 of file panoc-helpers.tpp.
|
inlinestatic |
Compute the ε from the stopping criterion, see PANOCStopCrit.
[in] | problem | Problem description |
[in] | crit | What stoppint criterion to use |
[in] | pₖ | Projected gradient step |
[in] | γ | Step size |
[in] | xₖ | Current iterate |
[in] | x̂ₖ | Current iterate after projected gradient step |
[in] | ŷₖ | Candidate Lagrange multipliers |
[in] | grad_ψₖ | Gradient in |
[in] | grad_̂ψₖ | Gradient in |
work_n1 | Workspace of dimension n | |
work_n2 | Workspace of dimension n |
Definition at line 62 of file panoc-helpers.tpp.
|
inlinestatic |
Increase the estimate of the Lipschitz constant of the objective gradient and decrease the step size until quadratic upper bound or descent lemma is satisfied:
The projected gradient iterate
[in] | problem | Problem description |
[in] | rounding_tolerance | Tolerance used to ignore rounding errors when the function |
[in] | L_max | Maximum allowed Lipschitz constant estimate (prevents infinite loop if function or derivatives are discontinuous, and keeps step size bounded away from zero). |
[in] | xₖ | Current iterate |
[in] | ψₖ | Objective function |
[in] | grad_ψₖ | Gradient of objective |
[in] | y | Lagrange multipliers |
[in] | Σ | Penalty weights |
[out] | x̂ₖ | Projected gradient iterate |
[out] | pₖ | Projected gradient step |
[out] | ŷx̂ₖ | Intermediate vector |
[in,out] | ψx̂ₖ | Objective function |
[in,out] | norm_sq_pₖ | Squared norm of the step |
[in,out] | grad_ψₖᵀpₖ | Gradient of objective times step |
[in,out] | Lₖ | Lipschitz constant estimate |
[in,out] | γₖ | Step size |
Definition at line 151 of file panoc-helpers.tpp.
|
inlinestatic |
Check all stop conditions (required tolerance reached, out of time, maximum number of iterations exceeded, interrupted by user, infinite iterate, no progress made)
[in] | params | Parameters including max_iter , max_time and max_no_progress |
[in] | opts | Options for the current solve |
[in] | time_elapsed | Time elapsed since the start of the algorithm |
[in] | iteration | The current iteration number |
[in] | stop_signal | A stop signal for the user to interrupt the algorithm |
[in] | εₖ | Tolerance of the current iterate |
[in] | no_progress | The number of successive iterations no progress was made |
Definition at line 216 of file panoc-helpers.tpp.
|
inlinestatic |
Compute the Hessian matrix of the augmented Lagrangian function multiplied by the given vector, using finite differences.
[in] | problem | Problem description |
[in] | xₖ | Current iterate |
[in] | y | Lagrange multipliers |
[in] | Σ | Penalty weights |
[in] | grad_ψ | Gradient |
[in] | v | Vector to multiply with the Hessian |
[out] | Hv | Hessian-vector product |
work_n1 | Dimension n | |
work_n2 | Dimension n | |
work_m | Dimension m |
Definition at line 255 of file panoc-helpers.tpp.
|
inlinestatic |
Estimate the Lipschitz constant of the gradient
[in] | problem | Problem description |
[in] | x | Current iterate |
[in] | y | Lagrange multipliers |
[in] | Σ | Penalty weights |
[in] | ε | Finite difference step size relative to x |
[in] | δ | Minimum absolute finite difference step size |
[in] | L_min | Minimum allowed Lipschitz estimate. |
[in] | L_max | Maximum allowed Lipschitz estimate. |
[out] | ψ | |
[out] | grad_ψ | Gradient |
work_x | Dimension n | |
work_grad_ψ | Dimension n | |
work_n | Dimension n | |
work_m | Dimension m |
Definition at line 288 of file panoc-helpers.tpp.
|
inlinestatic |
Estimate the Lipschitz constant of the gradient
[in] | problem | Problem description |
[in] | xₖ | Current iterate |
[in] | y | Lagrange multipliers |
[in] | Σ | Penalty weights |
[in] | ε | Finite difference step size relative to xₖ |
[in] | δ | Minimum absolute finite difference step size |
[in] | L_min | Minimum allowed Lipschitz estimate. |
[in] | L_max | Maximum allowed Lipschitz estimate. |
[out] | grad_ψ | Gradient |
work_n1 | Dimension n | |
work_n2 | Dimension n | |
work_n3 | Dimension n | |
work_m | Dimension m |
Definition at line 338 of file panoc-helpers.tpp.