alpaqa 0.0.1
Nonconvex constrained optimization
Functions
alpaqa::detail Namespace Reference

Functions

void project_y (rvec y, crvec z_lb, crvec z_ub, real_t M)
 
void update_penalty_weights (const ALMParams &params, real_t Δ, bool first_iter, rvec e, rvec old_e, real_t norm_e, real_t old_norm_e, crvec Σ_old, rvec Σ)
 
void initialize_penalty (const Problem &p, const ALMParams &params, crvec x0, rvec Σ)
 
void apply_preconditioning (const Problem &problem, Problem &prec_problem, crvec x, real_t &prec_f, vec &prec_g)
 
real_t calc_ψ_ŷ (const Problem &p, crvec x, crvec y, crvec Σ, rvec ŷ)
 Calculate both ψ(x) and the vector ŷ that can later be used to compute ∇ψ. More...
 
void calc_grad_ψ_from_ŷ (const Problem &p, crvec x, crvec ŷ, rvec grad_ψ, rvec work_n)
 Calculate ∇ψ(x) using ŷ. More...
 
real_t calc_ψ_grad_ψ (const Problem &p, crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m)
 Calculate both ψ(x) and its gradient ∇ψ(x). More...
 
void calc_grad_ψ (const Problem &p, crvec x, crvec y, crvec Σ, rvec grad_ψ, rvec work_n, rvec work_m)
 Calculate the gradient ∇ψ(x). More...
 
void calc_err_z (const Problem &p, crvec x̂, crvec y, crvec Σ, rvec err_z)
 Calculate the error between ẑ and g(x). More...
 
auto projected_gradient_step (const Box &C, real_t γ, crvec x, crvec grad_ψ)
 Projected gradient step. More...
 
void calc_x̂ (const Problem &prob, real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p)
 
bool stop_crit_requires_grad_̂ψₖ (PANOCStopCrit crit)
 
real_t calc_error_stop_crit (const Box &C, PANOCStopCrit crit, crvec pₖ, real_t γ, crvec xₖ, crvec x̂ₖ, crvec ŷₖ, crvec grad_ψₖ, crvec grad_̂ψₖ)
 Compute the ε from the stopping criterion, see PANOCStopCrit. More...
 
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: More...
 
template<class ParamsT , class DurationT >
SolverStatus check_all_stop_conditions (const ParamsT &params, DurationT time_elapsed, unsigned iteration, const AtomicStopSignal &stop_signal, real_t ε, 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) More...
 
void calc_augmented_lagrangian_hessian (const Problem &problem, crvec xₖ, crvec ŷxₖ, crvec y, crvec Σ, rvec g, mat &H, rvec work_n)
 Compute the Hessian matrix of the augmented Lagrangian function. More...
 
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. More...
 
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_n1, rvec work_n2, rvec work_n3, rvec work_m)
 Estimate the Lipschitz constant of the gradient \( \nabla \psi \) using finite differences. More...
 
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 \( \nabla \psi \) using finite differences. More...
 
template<class ObjFunT , class ObjGradFunT >
real_t initial_lipschitz_estimate (const ObjFunT &ψ, const ObjGradFunT &grad_ψ, crvec xₖ, real_t ε, real_t δ, real_t L_min, real_t L_max, real_t &ψₖ, rvec grad_ψₖ, vec_allocator &alloc)
 Estimate the Lipschitz constant of the gradient \( \nabla \psi \) using finite differences. More...
 
void calc_x̂ (real_t γ, crvec x, const Box &C, crvec grad_ψ, rvec x̂, rvec p)
 
template<class ObjFunT >
real_t descent_lemma (const ObjFunT &ψ, const Box &C, real_t rounding_tolerance, real_t L_max, crvec xₖ, real_t ψₖ, crvec grad_ψₖ, rvec x̂ₖ, rvec pₖ, 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: More...
 
void print_progress (unsigned k, real_t ψₖ, crvec grad_ψₖ, real_t pₖᵀpₖ, real_t γₖ, real_t εₖ)
 

Function Documentation

◆ project_y()

void alpaqa::detail::project_y ( rvec  y,
crvec  z_lb,
crvec  z_ub,
real_t  M 
)
inline

Definition at line 8 of file alm-helpers.hpp.

+ Here is the caller graph for this function:

◆ update_penalty_weights()

void alpaqa::detail::update_penalty_weights ( const ALMParams params,
real_t  Δ,
bool  first_iter,
rvec  e,
rvec  old_e,
real_t  norm_e,
real_t  old_norm_e,
crvec  Σ_old,
rvec  Σ 
)
inline

Definition at line 25 of file alm-helpers.hpp.

+ Here is the caller graph for this function:

◆ initialize_penalty()

void alpaqa::detail::initialize_penalty ( const Problem p,
const ALMParams params,
crvec  x0,
rvec  Σ 
)
inline

Definition at line 53 of file alm-helpers.hpp.

+ Here is the caller graph for this function:

◆ apply_preconditioning()

void alpaqa::detail::apply_preconditioning ( const Problem problem,
Problem prec_problem,
crvec  x,
real_t prec_f,
vec prec_g 
)
inline

Definition at line 66 of file alm-helpers.hpp.

+ Here is the caller graph for this function:

◆ calc_ψ_ŷ()

real_t alpaqa::detail::calc_ψ_ŷ ( const Problem p,
crvec  x,
crvec  y,
crvec  Σ,
rvec  ŷ 
)
inline

Calculate both ψ(x) and the vector ŷ that can later be used to compute ∇ψ.

\[ \psi(x^k) = f(x^k) + \frac{1}{2} \text{dist}_\Sigma^2\left(g(x^k) + \Sigma^{-1}y,\;D\right) \]

\[ \hat{y} \]

Parameters
[in]pProblem description
[in]xDecision variable \( x \)
[in]yLagrange multipliers \( y \)
[in]ΣPenalty weights \( \Sigma \)
[out]ŷ\( \hat{y} \)

Definition at line 16 of file panoc-helpers.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calc_grad_ψ_from_ŷ()

void alpaqa::detail::calc_grad_ψ_from_ŷ ( const Problem p,
crvec  x,
crvec  ŷ,
rvec  grad_ψ,
rvec  work_n 
)
inline

Calculate ∇ψ(x) using ŷ.

Parameters
[in]pProblem description
[in]xDecision variable \( x \)
[in]ŷ\( \hat{y} \)
[out]grad_ψ\( \nabla \psi(x) \)
work_nDimension n

Definition at line 44 of file panoc-helpers.hpp.

+ Here is the caller graph for this function:

◆ calc_ψ_grad_ψ()

real_t alpaqa::detail::calc_ψ_grad_ψ ( const Problem p,
crvec  x,
crvec  y,
crvec  Σ,
rvec  grad_ψ,
rvec  work_n,
rvec  work_m 
)
inline

Calculate both ψ(x) and its gradient ∇ψ(x).

\[ \psi(x^k) = f(x^k) + \frac{1}{2} \text{dist}_\Sigma^2\left(g(x^k) + \Sigma^{-1}y,\;D\right) \]

\[ \nabla \psi(x) = \nabla f(x) + \nabla g(x)\ \hat{y}(x) \]

Parameters
[in]pProblem description
[in]xDecision variable \( x \)
[in]yLagrange multipliers \( y \)
[in]ΣPenalty weights \( \Sigma \)
[out]grad_ψ\( \nabla \psi(x) \)
work_nDimension n
work_mDimension m

Definition at line 62 of file panoc-helpers.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calc_grad_ψ()

void alpaqa::detail::calc_grad_ψ ( const Problem p,
crvec  x,
crvec  y,
crvec  Σ,
rvec  grad_ψ,
rvec  work_n,
rvec  work_m 
)
inline

Calculate the gradient ∇ψ(x).

\[ \nabla \psi(x) = \nabla f(x) + \nabla g(x)\ \hat{y}(x) \]

Parameters
[in]pProblem description
[in]xDecision variable \( x \)
[in]yLagrange multipliers \( y \)
[in]ΣPenalty weights \( \Sigma \)
[out]grad_ψ\( \nabla \psi(x) \)
work_nDimension n
work_mDimension m

Definition at line 79 of file panoc-helpers.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calc_err_z()

void alpaqa::detail::calc_err_z ( const Problem p,
crvec  ,
crvec  y,
crvec  Σ,
rvec  err_z 
)
inline

Calculate the error between ẑ and g(x).

\[ \hat{z}^k = \Pi_D\left(g(x^k) + \Sigma^{-1}y\right) \]

Parameters
[in]pProblem description
[in]Decision variable \( \hat{x} \)
[in]yLagrange multipliers \( y \)
[in]ΣPenalty weights \( \Sigma \)
[out]err_z\( g(\hat{x}) - \hat{z} \)

Definition at line 107 of file panoc-helpers.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ projected_gradient_step()

auto alpaqa::detail::projected_gradient_step ( const Box C,
real_t  γ,
crvec  x,
crvec  grad_ψ 
)
inline

Projected gradient step.

\[ \begin{aligned} \hat{x}^k &= T_{\gamma^k}\left(x^k\right) \\ &= \Pi_C\left(x^k - \gamma^k \nabla \psi(x^k)\right) \\ p^k &= \hat{x}^k - x^k \\ \end{aligned} \]

Parameters
[in]CSet to project onto
[in]γStep size
[in]xDecision variable \( x \)
[in]grad_ψ\( \nabla \psi(x^k) \)

Definition at line 131 of file panoc-helpers.hpp.

+ Here is the caller graph for this function:

◆ calc_x̂() [1/2]

void alpaqa::detail::calc_x̂ ( const Problem prob,
real_t  γ,
crvec  x,
crvec  grad_ψ,
rvec  ,
rvec  p 
)
inline
Parameters
[in]probProblem description
[in]γStep size
[in]xDecision variable \( x \)
[in]grad_ψ\( \nabla \psi(x^k) \)
[out]\( \hat{x}^k = T_{\gamma^k}(x^k) \)
[out]p\( \hat{x}^k - x^k \)

Definition at line 142 of file panoc-helpers.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stop_crit_requires_grad_̂ψₖ()

bool alpaqa::detail::stop_crit_requires_grad_̂ψₖ ( PANOCStopCrit  crit)
inline

Definition at line 153 of file panoc-helpers.hpp.

+ Here is the caller graph for this function:

◆ calc_error_stop_crit()

real_t alpaqa::detail::calc_error_stop_crit ( const Box C,
PANOCStopCrit  crit,
crvec  pₖ,
real_t  γ,
crvec  xₖ,
crvec  x̂ₖ,
crvec  ŷₖ,
crvec  grad_ψₖ,
crvec  grad_̂ψₖ 
)
inline

Compute the ε from the stopping criterion, see PANOCStopCrit.

Parameters
[in]CBox constraints on x
[in]critWhat stoppint criterion to use
[in]pₖProjected gradient step \( \hat x^k - x^k \)
[in]γStep size
[in]xₖCurrent iterate
[in]x̂ₖCurrent iterate after projected gradient step
[in]ŷₖCandidate Lagrange multipliers
[in]grad_ψₖGradient in \( x^k \)
[in]grad_̂ψₖGradient in \( \hat x^k \)

Definition at line 169 of file panoc-helpers.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ descent_lemma() [1/2]

real_t alpaqa::detail::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 γₖ 
)
inline

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:

\[ \psi(x + p) \le \psi(x) + \nabla\psi(x)^\top p + \frac{L}{2} \|p\|^2 \]

The projected gradient iterate \( \hat x^k \) and step \( p^k \) are updated with the new step size \( \gamma^k \), and so are other quantities that depend on them, such as \( \nabla\psi(x^k)^\top p^k \) and \( \|p\|^2 \). The intermediate vector \( \hat y(x^k) \) can be used to compute the gradient \( \nabla\psi(\hat x^k) \) or to update the Lagrange multipliers.

Returns
The original step size, before it was reduced by this function.
Parameters
[in]problemProblem description
[in]rounding_toleranceTolerance used to ignore rounding errors when the function \( \psi(x) \) is relatively flat or the step size is very small, which could cause \( \psi(x^k) < \psi(\hat x^k) \), which is mathematically impossible but could occur in finite precision floating point arithmetic.
[in]L_maxMaximum 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 \( x^k \)
[in]ψₖObjective function \( \psi(x^k) \)
[in]grad_ψₖGradient of objective \( \nabla\psi(x^k) \)
[in]yLagrange multipliers \( y \)
[in]ΣPenalty weights \( \Sigma \)
[out]x̂ₖProjected gradient iterate \( \hat x^k \)
[out]pₖProjected gradient step \( p^k \)
[out]ŷx̂ₖIntermediate vector \( \hat y(x^k) \)
[in,out]ψx̂ₖObjective function \( \psi(\hat x^k) \)
[in,out]norm_sq_pₖSquared norm of the step \( \left\| p^k \right\|^2 \)
[in,out]grad_ψₖᵀpₖGradient of objective times step \( \nabla\psi(x^k)^\top p^k\)
[in,out]LₖLipschitz constant estimate \( L_{\nabla\psi}^k \)
[in,out]γₖStep size \( \gamma^k \)

Definition at line 242 of file panoc-helpers.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ check_all_stop_conditions()

SolverStatus alpaqa::detail::check_all_stop_conditions ( const ParamsT &  params,
DurationT  time_elapsed,
unsigned  iteration,
const AtomicStopSignal stop_signal,
real_t  ε,
real_t  εₖ,
unsigned  no_progress 
)
inline

Check all stop conditions (required tolerance reached, out of time, maximum number of iterations exceeded, interrupted by user, infinite iterate, no progress made)

Parameters
[in]paramsParameters including `max_iter`, `max_time` and `max_no_progress`
[in]time_elapsedTime elapsed since the start of the algorithm
[in]iterationThe current iteration number
[in]stop_signalA stop signal for the user to interrupt the algorithm
[in]εDesired primal tolerance
[in]εₖTolerance of the current iterate
[in]no_progressThe number of successive iterations no progress was made

Definition at line 307 of file panoc-helpers.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calc_augmented_lagrangian_hessian()

void alpaqa::detail::calc_augmented_lagrangian_hessian ( const Problem problem,
crvec  xₖ,
crvec  ŷxₖ,
crvec  y,
crvec  Σ,
rvec  g,
mat H,
rvec  work_n 
)
inline

Compute the Hessian matrix of the augmented Lagrangian function.

\[ \nabla^2_{xx} L_\Sigma(x, y) = \Big. \nabla_{xx}^2 L(x, y) \Big|_{\big(x,\, \hat y(x, y)\big)} + \sum_{i\in\mathcal{I}} \Sigma_i\,\nabla g_i(x) \nabla g_i(x)^\top \]

Parameters
[in]problemProblem description
[in]xₖCurrent iterate \( x^k \)
[in]ŷxₖIntermediate vector \( \hat y(x^k) \)
[in]yLagrange multipliers \( y \)
[in]ΣPenalty weights \( \Sigma \)
[out]gThe constraint values \( g(x^k) \)
[out]HHessian matrix \( H(x, y) \)
work_nDimension n

Definition at line 342 of file panoc-helpers.hpp.

+ Here is the caller graph for this function:

◆ calc_augmented_lagrangian_hessian_prod_fd()

void alpaqa::detail::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 
)
inline

Compute the Hessian matrix of the augmented Lagrangian function multiplied by the given vector, using finite differences.

\[ \nabla^2_{xx} L_\Sigma(x, y)\, v \approx \frac{\nabla_x L_\Sigma(x+hv, y) - \nabla_x L_\Sigma(x, y)}{h} \]

Parameters
[in]problemProblem description
[in]xₖCurrent iterate \( x^k \)
[in]yLagrange multipliers \( y \)
[in]ΣPenalty weights \( \Sigma \)
[in]grad_ψGradient \( \nabla \psi(x^k) \)
[in]vVector to multiply with the Hessian
[out]HvHessian-vector product
work_n1Dimension n
work_n2Dimension n
work_mDimension m

Definition at line 379 of file panoc-helpers.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initial_lipschitz_estimate() [1/3]

real_t alpaqa::detail::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_n1,
rvec  work_n2,
rvec  work_n3,
rvec  work_m 
)
inline

Estimate the Lipschitz constant of the gradient \( \nabla \psi \) using finite differences.

Parameters
[in]problemProblem description
[in]xₖCurrent iterate \( x^k \)
[in]yLagrange multipliers \( y \)
[in]ΣPenalty weights \( \Sigma \)
[in]εFinite difference step size relative to xₖ
[in]δMinimum absolute finite difference step size
[in]L_minMinimum allowed Lipschitz estimate.
[in]L_maxMaximum allowed Lipschitz estimate.
[out]ψ\( \psi(x^k) \)
[out]grad_ψGradient \( \nabla \psi(x^k) \)
work_n1Dimension n
work_n2Dimension n
work_n3Dimension n
work_mDimension m

Definition at line 412 of file panoc-helpers.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initial_lipschitz_estimate() [2/3]

real_t alpaqa::detail::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 
)
inline

Estimate the Lipschitz constant of the gradient \( \nabla \psi \) using finite differences.

Parameters
[in]problemProblem description
[in]xₖCurrent iterate \( x^k \)
[in]yLagrange multipliers \( y \)
[in]ΣPenalty weights \( \Sigma \)
[in]εFinite difference step size relative to xₖ
[in]δMinimum absolute finite difference step size
[in]L_minMinimum allowed Lipschitz estimate.
[in]L_maxMaximum allowed Lipschitz estimate.
[out]grad_ψGradient \( \nabla \psi(x^k) \)
work_n1Dimension n
work_n2Dimension n
work_n3Dimension n
work_mDimension m

Definition at line 459 of file panoc-helpers.hpp.

+ Here is the call graph for this function:

◆ initial_lipschitz_estimate() [3/3]

real_t alpaqa::detail::initial_lipschitz_estimate ( const ObjFunT &  ψ,
const ObjGradFunT &  grad_ψ,
crvec  xₖ,
real_t  ε,
real_t  δ,
real_t  L_min,
real_t  L_max,
real_t ψₖ,
rvec  grad_ψₖ,
vec_allocator alloc 
)

Estimate the Lipschitz constant of the gradient \( \nabla \psi \) using finite differences.

Parameters
[in]ψObjective
[in]grad_ψGradient of
[in]xₖCurrent iterate \( x^k \)
[in]εFinite difference step size relative to xₖ
[in]δMinimum absolute finite difference step size
[in]L_minMinimum allowed Lipschitz estimate.
[in]L_maxMaximum allowed Lipschitz estimate.
[out]ψₖ\( \psi(x^k) \)
[out]grad_ψₖGradient \( \nabla \psi(x^k) \)
[in]alloc

Definition at line 20 of file standalone/panoc.hpp.

+ Here is the call graph for this function:

◆ calc_x̂() [2/2]

void alpaqa::detail::calc_x̂ ( real_t  γ,
crvec  x,
const Box C,
crvec  grad_ψ,
rvec  ,
rvec  p 
)
inline
Parameters
[in]γStep size
[in]xDecision variable \( x \)
[in]CBox constraints \( C \)
[in]grad_ψ\( \nabla \psi(x^k) \)
[out]\( \hat{x}^k = T_{\gamma^k}(x^k) \)
[out]p\( \hat{x}^k - x^k \)

Definition at line 58 of file standalone/panoc.hpp.

+ Here is the call graph for this function:

◆ descent_lemma() [2/2]

real_t alpaqa::detail::descent_lemma ( const ObjFunT &  ψ,
const Box C,
real_t  rounding_tolerance,
real_t  L_max,
crvec  xₖ,
real_t  ψₖ,
crvec  grad_ψₖ,
rvec  x̂ₖ,
rvec  pₖ,
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:

\[ \psi(x + p) \le \psi(x) + \nabla\psi(x)^\top p + \frac{L}{2} \|p\|^2 \]

The projected gradient iterate \( \hat x^k \) and step \( p^k \) are updated with the new step size \( \gamma^k \), and so are other quantities that depend on them, such as \( \nabla\psi(x^k)^\top p^k \) and \( \|p\|^2 \). The intermediate vector \( \hat y(x^k) \) can be used to compute the gradient \( \nabla\psi(\hat x^k) \) or to update the Lagrange multipliers.

Returns
The original step size, before it was reduced by this function.
Parameters
[in]ψObjective.
[in]CBox constraints.
[in]rounding_toleranceTolerance used to ignore rounding errors when the function \( \psi(x) \) is relatively flat or the step size is very small, which could cause \( \psi(x^k) < \psi(\hat x^k) \), which is mathematically impossible but could occur in finite precision floating point arithmetic.
[in]L_maxMaximum 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 \( x^k \)
[in]ψₖObjective function \( \psi(x^k) \)
[in]grad_ψₖGradient of objective \( \nabla\psi(x^k) \)
[out]x̂ₖProjected gradient iterate \( \hat x^k \)
[out]pₖProjected gradient step \( p^k \)
[in,out]ψx̂ₖObjective function \( \psi(\hat x^k) \)
[in,out]norm_sq_pₖSquared norm of the step \( \left\| p^k \right\|^2 \)
[in,out]grad_ψₖᵀpₖGradient of objective times step \( \nabla\psi(x^k)^\top p^k\)
[in,out]LₖLipschitz constant estimate \( L_{\nabla\psi}^k \)
[in,out]γₖStep size \( \gamma^k \)

Definition at line 82 of file standalone/panoc.hpp.

+ Here is the call graph for this function:

◆ print_progress()

void alpaqa::detail::print_progress ( unsigned  k,
real_t  ψₖ,
crvec  grad_ψₖ,
real_t  pₖᵀpₖ,
real_t  γₖ,
real_t  εₖ 
)
inline

Definition at line 139 of file standalone/panoc.hpp.

+ Here is the caller graph for this function: