Namespaces | |
namespace | casadi_loader |
namespace | csv |
namespace | detail |
namespace | dl |
namespace | lbfgsb |
namespace | lbfgspp |
namespace | params |
namespace | util |
namespace | vec_util |
Classes | |
struct | ALMParams |
Parameters for the Augmented Lagrangian solver. More... | |
class | ALMSolver |
Augmented Lagrangian Method solver. More... | |
class | AndersonAccel |
Anderson Acceleration. More... | |
struct | AndersonAccelParams |
Parameters for the AndersonAccel class. More... | |
struct | AndersonDirection |
struct | AndersonDirectionParams |
Parameters for the AndersonDirection class. More... | |
class | AtomicStopSignal |
struct | Box |
class | BoxConstrProblem |
Implements common problem functions for minimization problems with box constraints. More... | |
class | CasADiControlProblem |
class | CasADiProblem |
Problem definition for a CasADi problem, loaded from a DLL. More... | |
struct | CBFGSParams |
Cautious BFGS update. More... | |
struct | CircularIndexIterator |
struct | CircularIndices |
class | CircularRange |
struct | ControlProblemVTable |
struct | ControlProblemWithCounters |
class | CUTEstLoader |
class | CUTEstProblem |
Wrapper for CUTEst problems loaded from an external shared library. More... | |
struct | DefaultConfig |
struct | Dim |
struct | EigenConfig |
struct | EigenConfigd |
Double-precision double configuration. More... | |
struct | EigenConfigf |
Single-precision float configuration. More... | |
struct | EigenConfigl |
long double configuration. More... | |
struct | EvalCounter |
class | FunctionalProblem |
Problem class that allows specifying the basic functions as C++ std::function s. More... | |
struct | InnerSolveOptions |
struct | InnerStatsAccumulator |
struct | InnerStatsAccumulator< lbfgsb::LBFGSBStats > |
struct | InnerStatsAccumulator< lbfgspp::LBFGSBStats< Conf > > |
struct | InnerStatsAccumulator< PANOCOCPStats< Conf > > |
struct | InnerStatsAccumulator< PANOCStats< Conf > > |
struct | InnerStatsAccumulator< PANTRStats< Conf > > |
struct | InnerStatsAccumulator< ZeroFPRStats< Conf > > |
class | IpoptAdapter |
Based on https://coin-or.github.io/Ipopt/INTERFACES.html. More... | |
struct | is_complex_float |
struct | is_complex_float< std::complex< T > > |
struct | is_config |
struct | is_config< DefaultConfig > |
struct | is_config< EigenConfigd > |
struct | is_config< EigenConfigf > |
struct | is_config< EigenConfigl > |
struct | KKTError |
class | LBFGS |
Limited memory Broyden–Fletcher–Goldfarb–Shanno (L-BFGS) algorithm. More... | |
struct | LBFGSDirection |
struct | LBFGSDirectionParams |
Parameters for the LBFGSDirection class. More... | |
struct | LBFGSParams |
Parameters for the LBFGS class. More... | |
struct | LBFGSStorage |
Layout: More... | |
class | LimitedMemoryQR |
Incremental QR factorization using modified Gram-Schmidt with reorthogonalization. More... | |
struct | LipschitzEstimateParams |
class | MaxHistory |
Keep track of the maximum value over a specified horizon length. More... | |
struct | NewtonTRDirection |
struct | NewtonTRDirectionParams |
Parameters for the NewtonTRDirection class. More... | |
struct | not_implemented_error |
struct | OCPDim |
struct | OCPEvalCounter |
struct | OCPEvaluator |
struct | OCPVariables |
struct | PANOCDirection |
This class outlines the interface for direction providers used by PANOC-like algorithms. More... | |
struct | PANOCOCPParams |
Tuning parameters for the PANOC algorithm. More... | |
struct | PANOCOCPProgressInfo |
class | PANOCOCPSolver |
struct | PANOCOCPStats |
struct | PANOCParams |
Tuning parameters for the PANOC algorithm. More... | |
struct | PANOCProgressInfo |
class | PANOCSolver |
PANOC solver for ALM. More... | |
struct | PANOCStats |
struct | PANTRDirection |
This class outlines the interface for direction providers used by PANTR-like algorithms. More... | |
struct | PANTRParams |
Tuning parameters for the PANTR algorithm. More... | |
struct | PANTRProgressInfo |
class | PANTRSolver |
PANTR solver for ALM. More... | |
struct | PANTRStats |
struct | ProblemVTable |
Struct containing function pointers to all problem functions (like the objective and constraint functions, with their derivatives, and more). More... | |
struct | ProblemWithCounters |
Problem wrapper that keeps track of the number of evaluations and the run time of each function. More... | |
struct | ReverseCircularIndexIterator |
class | ReverseCircularRange |
struct | ScopedMallocAllower |
struct | ScopedMallocBlocker |
struct | ScopedMallocChecker |
struct | StatefulLQRFactor |
struct | SteihaugCG |
Steihaug conjugate gradients procedure based on https://github.com/scipy/scipy/blob/583e70a50573169fc352b5dc6d94588a97c7389a/scipy/optimize/_trustregion_ncg.py#L44. More... | |
struct | SteihaugCGParams |
struct | StructuredLBFGSDirection |
struct | StructuredLBFGSDirectionParams |
Parameters for the StructuredLBFGSDirection class. More... | |
struct | StructuredNewtonDirection |
struct | StructuredNewtonDirectionParams |
Parameters for the StructuredNewtonDirection class. More... | |
struct | StructuredNewtonRegularizationParams |
Parameters for the StructuredNewtonDirection class. More... | |
class | TypeErasedControlProblem |
Nonlinear optimal control problem with finite horizon \( N \). More... | |
class | TypeErasedProblem |
The main polymorphic minimization problem interface. More... | |
class | UnconstrProblem |
Implements common problem functions for minimization problems without constraints. More... | |
struct | ZeroFPRParams |
Tuning parameters for the ZeroFPR algorithm. More... | |
struct | ZeroFPRProgressInfo |
class | ZeroFPRSolver |
ZeroFPR solver for ALM. More... | |
struct | ZeroFPRStats |
Concepts | |
concept | Config |
concept | VectorRefLike |
concept | float_or_complex_float |
Typedefs | |
template<Config Conf = DefaultConfig> | |
using | real_t = typename Conf::real_t |
template<Config Conf = DefaultConfig> | |
using | vec = typename Conf::vec |
template<Config Conf = DefaultConfig> | |
using | mvec = typename Conf::mvec |
template<Config Conf = DefaultConfig> | |
using | cmvec = typename Conf::cmvec |
template<Config Conf = DefaultConfig> | |
using | rvec = typename Conf::rvec |
template<Config Conf = DefaultConfig> | |
using | crvec = typename Conf::crvec |
template<Config Conf = DefaultConfig> | |
using | mat = typename Conf::mat |
template<Config Conf = DefaultConfig> | |
using | mmat = typename Conf::mmat |
template<Config Conf = DefaultConfig> | |
using | cmmat = typename Conf::cmmat |
template<Config Conf = DefaultConfig> | |
using | rmat = typename Conf::rmat |
template<Config Conf = DefaultConfig> | |
using | crmat = typename Conf::crmat |
template<Config Conf = DefaultConfig> | |
using | length_t = typename Conf::length_t |
template<Config Conf = DefaultConfig> | |
using | index_t = typename Conf::index_t |
template<Config Conf = DefaultConfig> | |
using | indexvec = typename Conf::indexvec |
template<Config Conf = DefaultConfig> | |
using | rindexvec = typename Conf::rindexvec |
template<Config Conf = DefaultConfig> | |
using | crindexvec = typename Conf::crindexvec |
using | function_dict_t = alpaqa_function_dict_t |
using | problem_register_t = alpaqa_problem_register_t |
using | control_problem_register_t = alpaqa_control_problem_register_t |
using | problem_functions_t = alpaqa_problem_functions_t |
using | control_problem_functions_t = alpaqa_control_problem_functions_t |
Enumerations | |
enum class | LBFGSStepSize { BasedOnExternalStepSize = 0 , BasedOnCurvature = 1 , BasedOnGradientStepSize } |
Which method to use to select the L-BFGS step size. More... | |
enum class | PANOCStopCrit { ApproxKKT = 0 , ApproxKKT2 , ProjGradNorm , ProjGradNorm2 , ProjGradUnitNorm , ProjGradUnitNorm2 , FPRNorm , FPRNorm2 , Ipopt , LBFGSBpp } |
enum class | SolverStatus { Busy = 0 , Converged , MaxTime , MaxIter , NotFinite , NoProgress , Interrupted , Exception } |
Exit status of a numerical solver such as ALM or PANOC. More... | |
Functions | |
template<Config Conf = DefaultConfig> | |
void | minimize_update_anderson (LimitedMemoryQR< Conf > &qr, rmat< Conf > G̃, crvec< Conf > rₖ, crvec< Conf > rₗₐₛₜ, crvec< Conf > gₖ, real_t< Conf > min_div_fac, rvec< Conf > γ_LS, rvec< Conf > xₖ_aa) |
Solve one step of Anderson acceleration to find a fixed point of a function g(x): | |
std::string_view | float_to_str_vw_snprintf (auto &&print, auto &buf, std::floating_point auto value, int precision, const char *fmt) |
std::string_view | float_to_str_vw (auto &buf, double value, int precision=std::numeric_limits< double >::max_digits10) |
std::string_view | float_to_str_vw (auto &buf, float value, int precision=std::numeric_limits< float >::max_digits10) |
std::string_view | float_to_str_vw (auto &buf, long double value, int precision=std::numeric_limits< long double >::max_digits10) |
template<std::floating_point F> | |
std::string | float_to_str (F value, int precision) |
template<std::floating_point F> | |
void | print_elem (auto &buf, F value, std::ostream &os) |
template<std::floating_point F> | |
void | print_elem (auto &buf, std::complex< F > value, std::ostream &os) |
template<class T > | |
std::ostream & | print_csv_impl (std::ostream &os, const T &M, std::string_view sep, std::string_view begin, std::string_view end) |
template<class T > | |
std::ostream & | print_matlab_impl (std::ostream &os, const T &M, std::string_view end) |
template<class T > | |
std::ostream & | print_python_impl (std::ostream &os, const T &M, std::string_view end) |
template<Config Conf, VectorRefLike< Conf > V> | |
constexpr auto | const_or_mut_rvec (V &&v) |
constexpr const char * | enum_name (PANOCStopCrit s) |
std::ostream & | operator<< (std::ostream &os, PANOCStopCrit s) |
template<Config Conf> | |
InnerStatsAccumulator< PANOCOCPStats< Conf > > & | operator+= (InnerStatsAccumulator< PANOCOCPStats< Conf > > &acc, const PANOCOCPStats< Conf > &s) |
template<Config Conf> | |
InnerStatsAccumulator< PANOCStats< Conf > > & | operator+= (InnerStatsAccumulator< PANOCStats< Conf > > &acc, const PANOCStats< Conf > &s) |
template<Config Conf> | |
InnerStatsAccumulator< PANTRStats< Conf > > & | operator+= (InnerStatsAccumulator< PANTRStats< Conf > > &acc, const PANTRStats< Conf > &s) |
template<Config Conf> | |
InnerStatsAccumulator< ZeroFPRStats< Conf > > & | operator+= (InnerStatsAccumulator< ZeroFPRStats< Conf > > &acc, const ZeroFPRStats< Conf > &s) |
template<Config Conf> | |
auto | project (const auto &v, const Box< Conf > &box) |
Project a vector onto a box. | |
template<Config Conf> | |
auto | projecting_difference (const auto &v, const Box< Conf > &box) |
Get the difference between the given vector and its projection. | |
template<Config Conf> | |
auto | dist_squared (const auto &v, const Box< Conf > &box) |
Get the distance squared between the given vector and its projection. | |
template<Config Conf> | |
auto | dist_squared (const auto &v, const Box< Conf > &box, const auto &Σ) -> real_t< Conf > |
Get the distance squared between the given vector and its projection in the Σ norm. | |
template<Config Conf> | |
KKTError< Conf > | compute_kkt_error (const alpaqa::TypeErasedProblem< Conf > &problem, alpaqa::crvec< Conf > x, alpaqa::crvec< Conf > y) |
std::ostream & | operator<< (std::ostream &, const OCPEvalCounter &) |
OCPEvalCounter::OCPEvalTimer & | operator+= (OCPEvalCounter::OCPEvalTimer &a, const OCPEvalCounter::OCPEvalTimer &b) |
OCPEvalCounter & | operator+= (OCPEvalCounter &a, const OCPEvalCounter &b) |
OCPEvalCounter | operator+ (OCPEvalCounter a, const OCPEvalCounter &b) |
void | check_finiteness (const auto &v, std::string_view msg) |
If the given vector v is not finite, break or throw an exception with the given message msg . | |
void | check_finiteness (const std::floating_point auto &v, std::string_view msg) |
template<class Problem > | |
auto | ocproblem_with_counters (Problem &&p) |
template<class Problem > | |
auto | ocproblem_with_counters_ref (Problem &p) |
std::ostream & | operator<< (std::ostream &, const EvalCounter &) |
EvalCounter::EvalTimer & | operator+= (EvalCounter::EvalTimer &a, const EvalCounter::EvalTimer &b) |
EvalCounter & | operator+= (EvalCounter &a, const EvalCounter &b) |
EvalCounter | operator+ (EvalCounter a, const EvalCounter &b) |
template<class Problem > | |
auto | problem_with_counters (Problem &&p) |
Wraps the given problem into a ProblemWithCounters and keeps track of how many times each function is called, and how long these calls took. | |
template<class Problem > | |
auto | problem_with_counters_ref (Problem &p) |
Wraps the given problem into a ProblemWithCounters and keeps track of how many times each function is called, and how long these calls took. | |
template<Config Conf> | |
void | print_provided_functions (std::ostream &os, const TypeErasedProblem< Conf > &problem) |
std::ostream & | print_csv (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< float > > &M, std::string_view sep, std::string_view begin, std::string_view end) |
std::ostream & | print_csv (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< float > > &M, std::string_view sep, std::string_view begin) |
std::ostream & | print_csv (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< float > > &M, std::string_view sep) |
std::ostream & | print_csv (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< float > > &M) |
std::ostream & | print_matlab (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< float > > &M, std::string_view end) |
std::ostream & | print_matlab (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< float > > &M) |
std::ostream & | print_python (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< float > > &M, std::string_view end) |
std::ostream & | print_python (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< float > > &M) |
std::ostream & | print_csv (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< double > > &M, std::string_view sep, std::string_view begin, std::string_view end) |
std::ostream & | print_csv (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< double > > &M, std::string_view sep, std::string_view begin) |
std::ostream & | print_csv (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< double > > &M, std::string_view sep) |
std::ostream & | print_csv (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< double > > &M) |
std::ostream & | print_matlab (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< double > > &M, std::string_view end) |
std::ostream & | print_matlab (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< double > > &M) |
std::ostream & | print_python (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< double > > &M, std::string_view end) |
std::ostream & | print_python (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< double > > &M) |
std::ostream & | print_csv (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long double > > &M, std::string_view sep, std::string_view begin, std::string_view end) |
std::ostream & | print_csv (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long double > > &M, std::string_view sep, std::string_view begin) |
std::ostream & | print_csv (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long double > > &M, std::string_view sep) |
std::ostream & | print_csv (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long double > > &M) |
std::ostream & | print_matlab (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long double > > &M, std::string_view end) |
std::ostream & | print_matlab (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long double > > &M) |
std::ostream & | print_python (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long double > > &M, std::string_view end) |
std::ostream & | print_python (std::ostream &os, const Eigen::Ref< const Eigen::MatrixX< long double > > &M) |
std::ostream & | operator<< (std::ostream &os, SolverStatus s) |
const char * | enum_name (CUTEstProblem::Report::Status s) |
std::ostream & | operator<< (std::ostream &os, CUTEstProblem::Report::Status s) |
std::ostream & | operator<< (std::ostream &os, const CUTEstProblem::Report &r) |
template<class Func > | |
void | register_function (function_dict_t *&extra_functions, std::string name, Func &&func) |
Make the given function available to alpaqa. | |
template<class Func > | |
void | register_function (problem_register_t &result, std::string name, Func &&func) |
template<class Func > | |
void | register_function (control_problem_register_t &result, std::string name, Func &&func) |
template<class Result , class T , class Ret , class... Args> | |
void | register_member_function (Result &result, std::string name, Ret(T::*member)(Args...)) |
template<auto Member> | |
static auto | member_caller () |
Wrap the given member function of signature into a lambda function that accepts the instance as a void pointer. | |
void | unregister_functions (function_dict_t *&extra_functions) |
Cleans up the extra functions registered by register_function. | |
InnerStatsAccumulator< lbfgsb::LBFGSBStats > & | operator+= (InnerStatsAccumulator< lbfgsb::LBFGSBStats > &acc, const lbfgsb::LBFGSBStats &s) |
template<Config Conf> | |
InnerStatsAccumulator< lbfgspp::LBFGSBStats< Conf > > & | operator+= (InnerStatsAccumulator< lbfgspp::LBFGSBStats< Conf > > &acc, const lbfgspp::LBFGSBStats< Conf > &s) |
Variables | |
template<class T > | |
constexpr bool | is_config_v = is_config<T>::value |
template<Config Conf> | |
constexpr const auto | inf = std::numeric_limits<real_t<Conf>>::infinity() |
template<Config Conf> | |
constexpr const auto | NaN = std::numeric_limits<real_t<Conf>>::quiet_NaN() |
template<Config Conf> | |
const rvec< Conf > | null_vec = mvec<Conf>{nullptr, 0} |
Global empty vector for convenience. | |
template<class T > | |
constexpr bool | is_complex_float_v = is_complex_float<T>::value |
template class CASADI_OCP_LOADER_EXPORT | CasADiControlProblem< EigenConfigd > |
template class CASADI_OCP_LOADER_EXPORT | CasADiControlProblem< DefaultConfig > |
struct alpaqa::ALMParams |
Class Members | ||
---|---|---|
real_t | tolerance = real_t(1e-5) | Primal tolerance (used for stopping criterion of inner solver). |
real_t | dual_tolerance = real_t(1e-5) | Dual tolerance (constraint violation and complementarity). |
real_t | penalty_update_factor = 10 | Factor used in updating the penalty parameters. |
real_t | penalty_update_factor_lower = real_t(0.8) | Factor to reduce penalty_update_factor when inner convergence fails. |
real_t | min_penalty_update_factor = real_t(1.1) | Minimum value for penalty_update_factor after reduction because of inner convergence failure. |
real_t | initial_penalty = 1 |
Initial penalty parameter. When set to zero (which is the default), it is computed automatically, based on the constraint violation in the starting point and the parameter initial_penalty_factor. |
real_t | initial_penalty_factor = 20 |
Initial penalty parameter factor. Active if initial_penalty is set to zero. |
real_t | initial_penalty_lower = real_t(0.6) | Factor to reduce the initial penalty factor by if convergence fails in in the first iteration. |
real_t | initial_tolerance = 1 | Initial primal tolerance. |
real_t | initial_tolerance_increase = real_t(1.1) | Factor to increase the initial primal tolerance if convergence fails in the first iteration. |
real_t | tolerance_update_factor = real_t(1e-1) | Update factor for primal tolerance. |
real_t | ρ_increase = real_t(2) | Factor to increase the primal tolerance update factor by if convergence fails. |
real_t | ρ_max = real_t(0.5) | Maximum value of tolerance_update_factor after increase because of inner convergence failure. |
real_t | rel_penalty_increase_threshold = real_t(0.1) | Error tolerance for penalty increase. |
real_t | max_multiplier = real_t(1e9) | Lagrange multiplier bound. |
real_t | max_penalty = real_t(1e9) | Maximum penalty factor. |
real_t | min_penalty = real_t(1e-9) | Minimum penalty factor (used during initialization). |
unsigned int | max_iter = 100 | Maximum number of outer ALM iterations. |
nanoseconds | max_time = std::chrono::minutes(5) | Maximum duration. |
unsigned | max_num_initial_retries = 0 | How many times can the initial penalty initial_penalty or initial_penalty_factor and the initial primal tolerance initial_tolerance be reduced. |
unsigned | max_num_retries = 0 | How many times can the penalty update factor penalty_update_factor and the primal tolerance factor tolerance_update_factor be reduced. |
unsigned | max_total_num_retries = 0 | Combined limit for max_num_initial_retries and max_num_retries. |
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. |
bool | single_penalty_factor = false | Use one penalty factor for all m constraints. |
struct alpaqa::AndersonAccelParams |
Class Members | ||
---|---|---|
length_t | memory = 10 |
Length of the history to keep (the number of columns in the QR factorization). If this number is greater than the problem dimension, the memory is set to the problem dimension (otherwise the system is underdetermined). |
real_t | min_div_fac = real_t(1e2) * std::numeric_limits<real_t>::epsilon() | Minimum divisor when solving close to singular systems, scaled by the maximum eigenvalue of R. |
struct alpaqa::AndersonDirectionParams |
struct alpaqa::EigenConfig |
Class Members | ||
---|---|---|
typedef RealT | real_t | Real scalar element type. |
typedef VectorX< real_t > | vec | Dynamic vector type. |
typedef Map< vec > | mvec | Map of vector type. |
typedef Map< const vec > | cmvec | Immutable map of vector type. |
typedef Ref< vec > | rvec | Reference to mutable vector. |
typedef Ref< const vec > | crvec | Reference to immutable vector. |
typedef MatrixX< real_t > | mat | Dynamic matrix type. |
typedef Map< mat > | mmat | Map of matrix type. |
typedef Map< const mat > | cmmat | Immutable map of matrix type. |
typedef Ref< mat > | rmat | Reference to mutable matrix. |
typedef Ref< const mat > | crmat | Reference to immutable matrix. |
typedef Index | length_t | Type for lengths and sizes. |
typedef Index | index_t | Type for vector and matrix indices. |
typedef VectorX< index_t > | indexvec | Dynamic vector of indices. |
typedef Ref< indexvec > | rindexvec | Reference to mutable index vector. |
typedef Ref< const indexvec > | crindexvec | Reference to immutable index vector. |
struct alpaqa::InnerSolveOptions |
Class Members | ||
---|---|---|
bool | always_overwrite_results = true | Return the final iterate and multipliers, even if the solver did not converge. |
optional< nanoseconds > | max_time = std::nullopt |
Maximum run time (in addition to the inner solver's own timeout). Zero means no timeout. |
real_t | tolerance = 0 |
Desired tolerance (overrides the solver's own tolerance). Zero means no tolerance (use solver's own tolerance). |
ostream * | os = nullptr | Output stream to print to. |
unsigned | outer_iter = 0 | The current iteration of the outer solver. |
bool | check = true | Call TypeErasedProblem::check() before starting to solve. |
struct alpaqa::InnerStatsAccumulator |
struct alpaqa::InnerStatsAccumulator< lbfgsb::LBFGSBStats > |
Class Members | ||
---|---|---|
nanoseconds | elapsed_time {} | Total elapsed time in the inner solver. |
unsigned | iterations = 0 | Total number of inner PANOC iterations. |
real_t | final_ψ = 0 | Final value of the smooth cost \( \psi(\hat x) \). |
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). |
struct alpaqa::InnerStatsAccumulator< lbfgspp::LBFGSBStats< Conf > > |
Class Members | ||
---|---|---|
nanoseconds | elapsed_time {} | Total elapsed time in the inner solver. |
unsigned | iterations = 0 | Total number of inner PANOC iterations. |
real_t | final_ψ = 0 | Final value of the smooth cost \( \psi(\hat x) \). |
struct alpaqa::InnerStatsAccumulator< PANOCOCPStats< Conf > > |
Class Members | ||
---|---|---|
nanoseconds | elapsed_time {} | Total elapsed time in the inner solver. |
nanoseconds | time_prox {} | Total time spent computing proximal mappings. |
nanoseconds | time_forward {} | Total time spent doing forward simulations. |
nanoseconds | time_backward {} | Total time spent doing backward gradient evaluations. |
nanoseconds | time_jacobians {} | Total time spent computing dynamics Jacobians. |
nanoseconds | time_hessians {} | Total time spent computing cost Hessians and Hessian-vector products. |
nanoseconds | time_indices {} | Total time spent determining active indices. |
nanoseconds | time_lqr_factor {} | Total time spent performing LQR factorizations. |
nanoseconds | time_lqr_solve {} | Total time spent solving the (factorized) LQR problem. |
nanoseconds | time_lbfgs_indices {} | Total time spent determining active indices for L-BFGS applications. |
nanoseconds | time_lbfgs_apply {} | Total time spent applying L-BFGS estimates. |
nanoseconds | time_lbfgs_update {} | Total time spent updating the L-BFGS estimate. |
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 \)). |
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 \)). |
struct alpaqa::InnerStatsAccumulator< PANTRStats< 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 PANTR iterations. |
unsigned | accelerated_step_rejected = 0 | Total number of PANTR rejected accelerated steps. |
unsigned | stepsize_backtracks = 0 | Total number of FB step size reductions. |
unsigned | direction_failures = 0 | Total number of times that the accelerated direction was not finite. |
unsigned | direction_update_rejected = 0 |
Total number of times that the direction update was rejected (e.g. it could have resulted in a non-positive definite Hessian estimate). |
real_t | final_γ = 0 | The final FB 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 \)). |
struct alpaqa::InnerStatsAccumulator< ZeroFPRStats< 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 ZeroFPR iterations. |
unsigned | linesearch_failures = 0 | Total number of ZeroFPR line search failures. |
unsigned | linesearch_backtracks = 0 | Total number of ZeroFPR line search backtracking steps. |
unsigned | stepsize_backtracks = 0 | Total number of ZeroFPR 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 ZeroFPR 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 \)). |
struct alpaqa::LBFGSDirectionParams |
struct alpaqa::LBFGSParams |
Class Members | ||
---|---|---|
length_t | memory = 10 | Length of the history to keep. |
real_t | min_div_fac = std::numeric_limits<real_t>::epsilon() | Reject update if \( y^\top s \le \text{min_div_fac} \cdot s^\top s \). |
real_t | min_abs_s | Reject update if \( s^\top s \le \text{min_abs_s} \). |
CBFGSParams< config_t > | cbfgs = {} |
Parameters in the cautious BFGS update condition. \[ \frac{y^\top s}{s^\top s} \ge \epsilon \| g \|^\alpha \] |
bool | force_pos_def = true |
If set to true, the inverse Hessian estimate should remain definite, i.e. a check is performed that rejects the update if \( y^\top s \le \text{min_div_fac} \cdot s^\top s \). If set to false, just try to prevent a singular Hessian by rejecting the update if \( \left| y^\top s \right| \le \text{min_div_fac} \cdot s^\top s \). |
LBFGSStepSize | stepsize = LBFGSStepSize::BasedOnCurvature |
|
struct alpaqa::NewtonTRDirectionParams |
struct alpaqa::OCPDim |
struct alpaqa::PANOCOCPParams |
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, line search parameter. |
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. |
unsigned | L_max_inc = 16 | Maximum number of times to double the Lipschitz constant estimate per iteration. |
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 | gn_interval = 1 | How often to use a Gauss-Newton step. Zero to disable GN entirely. |
bool | gn_sticky = true | |
bool | reset_lbfgs_on_gn_step = false | |
bool | lqr_factor_cholesky = true | |
LBFGSParams< config_t > | lbfgs_params | L-BFGS parameters (e.g. memory). |
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 | disable_acceleration = false |
struct alpaqa::PANOCOCPStats |
Class Members | ||
---|---|---|
SolverStatus | status = SolverStatus::Busy | |
real_t | ε = inf<config_t> | |
nanoseconds | elapsed_time {} | |
nanoseconds | time_prox {} | |
nanoseconds | time_forward {} | |
nanoseconds | time_backward {} | |
nanoseconds | time_jacobians {} | |
nanoseconds | time_hessians {} | |
nanoseconds | time_indices {} | |
nanoseconds | time_lqr_factor {} | |
nanoseconds | time_lqr_solve {} | |
nanoseconds | time_lbfgs_indices {} | |
nanoseconds | time_lbfgs_apply {} | |
nanoseconds | time_lbfgs_update {} | |
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::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 |
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::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::PANTRParams |
Class Members | ||
---|---|---|
LipschitzEstimateParams< config_t > | Lipschitz | Parameters related to the Lipschitz constant estimate and step size. |
unsigned | max_iter = 100 | Maximum number of inner PANTR iterations. |
nanoseconds | max_time = std::chrono::minutes(5) | Maximum duration. |
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 | TR_tolerance_factor = 10 * std::numeric_limits<real_t>::epsilon() | |
real_t | ratio_threshold_acceptable = real_t(0.2) | Minimal TR ratio to be accepted (successful). |
real_t | ratio_threshold_good = real_t(0.8) | Minimal TR ratio to increase radius (very successful). |
real_t | radius_factor_rejected = real_t(0.35) | TR radius decrease coefficient when unsuccessful. |
real_t | radius_factor_acceptable = real_t(0.999) | TR radius decrease coefficient when successful. |
real_t | radius_factor_good = real_t(2.5) | TR radius increase coefficient when very successful. |
real_t | initial_radius = NaN<config_t> | Initial trust radius. |
real_t | min_radius = 100 * std::numeric_limits<real_t>::epsilon() | Minimum trust radius. |
bool | compute_ratio_using_new_stepsize = false | Check the quadratic upperbound and update γ before computing the reduction of the TR step. |
bool | update_direction_on_prox_step = true | |
bool | recompute_last_prox_step_after_direction_reset = false | |
bool | disable_acceleration = false |
Don't compute accelerated steps, fall back to forward-backward splitting. For testing purposes. |
bool | ratio_approx_fbe_quadratic_model = true |
Compute the trust-region ratio using an approximation of the quadratic model of the FBE, rather than the quadratic model of the subproblem. Specifically, when set to false, the quadratic model used is \[ q(d) = \tfrac12 \inprod{\mathcal R_\gamma(\hat x) d}{d} + \inprod{R_\gamma(\hat x)}{d}. \] When set to true, the quadratic model used is \[ q_\mathrm{approx}(d) = \inv{(1-\alpha)} q(d), \] where \( \alpha = \) LipschitzParams::Lγ_factor. This is an approximation of the quadratic model of the FBE, \[ q_{\varphi_\gamma}(d) = \tfrac12 \inprod{\mathcal Q_\gamma(\hat x) \mathcal R_\gamma(\hat x) d}{d} + \inprod{\mathcal Q_\gamma(\hat x) R_\gamma(\hat x)}{d}, \] with \( \mathcal Q_\gamma(x) = \id - \gamma \nabla^2 \psi(x) \). |
struct alpaqa::PANTRProgressInfo |
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 | ρ | |
real_t | ε | |
crvec | Σ | |
crvec | y | |
unsigned | outer_iter | |
const TypeErasedProblem< config_t > * | problem | |
const PANTRParams< config_t > * | params |
struct alpaqa::PANTRStats |
Class Members | ||
---|---|---|
SolverStatus | status = SolverStatus::Busy | |
real_t | ε = inf<config_t> | |
nanoseconds | elapsed_time {} | |
nanoseconds | time_progress_callback {} | |
unsigned | iterations = 0 | |
unsigned | accelerated_step_rejected = 0 | |
unsigned | stepsize_backtracks = 0 | |
unsigned | direction_failures = 0 | |
unsigned | direction_update_rejected = 0 | |
real_t | final_γ = 0 | |
real_t | final_ψ = 0 | |
real_t | final_h = 0 | |
real_t | final_φγ = 0 |
struct alpaqa::ScopedMallocChecker |
struct alpaqa::SteihaugCGParams |
struct alpaqa::StructuredNewtonDirectionParams |
Class Members | ||
---|---|---|
real_t | hessian_vec_factor = 0 |
Set this option to a nonzero value to include the Hessian-vector product \( \nabla^2_{x_\mathcal{J}x_\mathcal{K}}\psi(x) q_\mathcal{K} \) from equation 12b in [2], scaled by this parameter. Set it to zero to leave out that term. |
struct alpaqa::StructuredNewtonRegularizationParams |
Class Members | ||
---|---|---|
real_t | min_eig = std::cbrt(std::numeric_limits<real_t>::epsilon()) | Minimum eigenvalue of the Hessian, scaled by \( 1 + |\lambda_\mathrm{max}| \), enforced by regularization using a multiple of identity. |
bool | print_eig = false | Print the minimum and maximum eigenvalue of the Hessian. |
struct alpaqa::ZeroFPRParams |
Class Members | ||
---|---|---|
LipschitzEstimateParams< config_t > | Lipschitz | Parameters related to the Lipschitz constant estimate and step size. |
unsigned | max_iter = 100 | Maximum number of inner ZeroFPR 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 | update_direction_from_prox_step = false |
struct alpaqa::ZeroFPRProgressInfo |
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 ZeroFPRParams< config_t > * | params |
struct alpaqa::ZeroFPRStats |
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 |
using real_t = typename Conf::real_t |
Definition at line 51 of file config.hpp.
using vec = typename Conf::vec |
Definition at line 52 of file config.hpp.
using mvec = typename Conf::mvec |
Definition at line 53 of file config.hpp.
using cmvec = typename Conf::cmvec |
Definition at line 54 of file config.hpp.
using rvec = typename Conf::rvec |
Definition at line 55 of file config.hpp.
using crvec = typename Conf::crvec |
Definition at line 56 of file config.hpp.
using mat = typename Conf::mat |
Definition at line 57 of file config.hpp.
using mmat = typename Conf::mmat |
Definition at line 58 of file config.hpp.
using cmmat = typename Conf::cmmat |
Definition at line 59 of file config.hpp.
using rmat = typename Conf::rmat |
Definition at line 60 of file config.hpp.
using crmat = typename Conf::crmat |
Definition at line 61 of file config.hpp.
using length_t = typename Conf::length_t |
Definition at line 62 of file config.hpp.
using index_t = typename Conf::index_t |
Definition at line 63 of file config.hpp.
using indexvec = typename Conf::indexvec |
Definition at line 64 of file config.hpp.
using rindexvec = typename Conf::rindexvec |
Definition at line 65 of file config.hpp.
using crindexvec = typename Conf::crindexvec |
Definition at line 66 of file config.hpp.
Definition at line 365 of file dl-problem.h.
Definition at line 366 of file dl-problem.h.
Definition at line 367 of file dl-problem.h.
Definition at line 368 of file dl-problem.h.
Definition at line 369 of file dl-problem.h.
|
strong |
Which method to use to select the L-BFGS step size.
Definition at line 25 of file accelerators/lbfgs.hpp.
|
strong |
Enumerator | |
---|---|
ApproxKKT | Find an ε-approximate KKT point in the ∞-norm: \[ \varepsilon = \left\| \gamma_k^{-1} (x^k - \hat x^k) + \nabla \psi(\hat x^k) - \nabla \psi(x^k) \right\|_\infty \] |
ApproxKKT2 | Find an ε-approximate KKT point in the 2-norm: \[ \varepsilon = \left\| \gamma_k^{-1} (x^k - \hat x^k) + \nabla \psi(\hat x^k) - \nabla \psi(x^k) \right\|_2 \] |
ProjGradNorm | ∞-norm of the projected gradient with step size γ: \[ \varepsilon = \left\| x^k - \Pi_C\left(x^k - \gamma_k \nabla \psi(x^k)\right) \right\|_\infty \] |
ProjGradNorm2 | 2-norm of the projected gradient with step size γ: \[ \varepsilon = \left\| x^k - \Pi_C\left(x^k - \gamma_k \nabla \psi(x^k)\right) \right\|_2 \] This is the same criterion as used by OpEn. |
ProjGradUnitNorm | ∞-norm of the projected gradient with unit step size: \[ \varepsilon = \left\| x^k - \Pi_C\left(x^k - \nabla \psi(x^k)\right) \right\|_\infty \] |
ProjGradUnitNorm2 | 2-norm of the projected gradient with unit step size: \[ \varepsilon = \left\| x^k - \Pi_C\left(x^k - \nabla \psi(x^k)\right) \right\|_2 \] |
FPRNorm | ∞-norm of fixed point residual: \[ \varepsilon = \gamma_k^{-1} \left\| x^k - \Pi_C\left(x^k - \gamma_k \nabla \psi(x^k)\right) \right\|_\infty \] |
FPRNorm2 | 2-norm of fixed point residual: \[ \varepsilon = \gamma_k^{-1} \left\| x^k - \Pi_C\left(x^k - \gamma_k \nabla \psi(x^k)\right) \right\|_2 \] |
Ipopt | The stopping criterion used by Ipopt, see https://link.springer.com/article/10.1007/s10107-004-0559-y equation (5). Given a candidate iterate \( \hat x^k \) and the corresponding candidate Lagrange multipliers \( \hat y^k \) for the general constraints \( g(x)\in D \), the multipliers \( w \) for the box constraints \( x\in C \) (that are otherwise not computed explicitly) are given by \[ w^k = v^k - \Pi_C(v^k), \] where \[ \begin{aligned} v^k &\triangleq \hat x^k - \nabla f(\hat x^k) - \nabla g(\hat x^k)\, \hat y^k \\ &= \hat x^k - \nabla \psi(\hat x^k) \end{aligned} \] The quantity that is compared to the (scaled) tolerance is then given by \[ \begin{aligned} \varepsilon' &= \left\| \nabla f(\hat x^k) + \nabla g(\hat x^k)\, \hat y^k + w^k \right\|_\infty \\ &= \left\| \hat x^k - \Pi_C\left(v^k\right) \right\|_\infty \end{aligned} \] Finally, the quantity is scaled by the factor \[ s_d \triangleq \max\left\{ s_\text{max},\;\frac{\|\hat y^k\|_1 + \|w^k\|_1}{2m + 2n} \right\} / s_\text{max}, \] i.e. \( \varepsilon = \varepsilon' / s_d \). |
LBFGSBpp | The stopping criterion used by LBFGS++, see https://lbfgspp.statr.me/doc/classLBFGSpp_1_1LBFGSBParam.html#afb20e8fd6c6808c1f736218841ba6947. \[ \varepsilon = \frac{\left\| x^k - \Pi_C\left(x^k - \nabla \psi(x^k)\right) \right\|_\infty} {\max\left\{1, \|x\|_2 \right\}} \] |
Definition at line 8 of file panoc-stop-crit.hpp.
|
strong |
Exit status of a numerical solver such as ALM or PANOC.
Definition at line 11 of file solverstatus.hpp.
|
inline |
Solve one step of Anderson acceleration to find a fixed point of a function g(x):
\( g(x^\star) - x^\star = 0 \)
Updates the QR factorization of \( \mathcal{R}_k = QR \), solves the least squares problem to find \( \gamma_\text{LS} \), computes the next iterate \( x_{k+1} \), and stores the current function value \( g_k \) in the matrix \( G \), which is used as a circular buffer.
\[ \begin{aligned} \def\gammaLS{\gamma_\text{LS}} m_k &= \min \{k, m\} \\ g_i &= g(x_i) \\ r_i &= r(x_i) g_i - x_i \\ \Delta r_i &= r_i - r_{i-1} \\ \mathcal{R}_k &= \begin{pmatrix} \Delta r_{k-m_k+1} & \dots & \Delta r_k \end{pmatrix} \in \R^{n\times m_k} \\ \gammaLS &= \argmin_{\gamma \in \R^{m_k}}\; \norm{\mathcal{R}_k \gamma - r_k}_2 \\ \alpha_i &= \begin{cases} \gammaLS[0] & i = 0 \\ \gammaLS[i] - \gammaLS[i-1] & 0 \lt i \lt m_k \\ 1 - \gammaLS[m_k - 1] & i = m_k \end{cases} \\ \tilde G_k &= \begin{pmatrix} g_{k - m_k} & \dots & g_{k-1} \end{pmatrix} \\ G_k &= \begin{pmatrix} g_{k - m_k} & \dots & g_{k} \end{pmatrix} \\ &= \begin{pmatrix} \tilde G_k & g_{k} \end{pmatrix} \\ x_{k+1} &= \sum_{i=0}^{m_k} \alpha_i\,g_{k - m_k + i} \\ &= G_k \alpha \\ \end{aligned} \]
[in,out] | qr | QR factorization of \( \mathcal{R}_k \) |
[in,out] | G̃ | Matrix of previous function values \( \tilde G_k \) (stored as ring buffer with the same indices as qr ) |
[in] | rₖ | Current residual \( r_k \) |
[in] | rₗₐₛₜ | Previous residual \( r_{k-1} \) |
[in] | gₖ | Current function value \( g_k \) |
[in] | min_div_fac | Minimum divisor when solving close to singular systems, scaled by the maximum eigenvalue of R |
[out] | γ_LS | Solution to the least squares system |
[out] | xₖ_aa | Next Anderson iterate |
Definition at line 39 of file anderson-helpers.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
std::string float_to_str | ( | F | value, |
int | precision | ||
) |
Definition at line 67 of file print.tpp.
void print_elem | ( | auto & | buf, |
F | value, | ||
std::ostream & | os | ||
) |
void print_elem | ( | auto & | buf, |
std::complex< F > | value, | ||
std::ostream & | os | ||
) |
std::ostream & print_csv_impl | ( | std::ostream & | os, |
const T & | M, | ||
std::string_view | sep, | ||
std::string_view | begin, | ||
std::string_view | end | ||
) |
std::ostream & print_matlab_impl | ( | std::ostream & | os, |
const T & | M, | ||
std::string_view | end | ||
) |
std::ostream & print_python_impl | ( | std::ostream & | os, |
const T & | M, | ||
std::string_view | end | ||
) |
|
constexpr |
Definition at line 15 of file ocp-vars.hpp.
|
inlineconstexpr |
std::ostream & operator<< | ( | std::ostream & | os, |
PANOCStopCrit | s | ||
) |
InnerStatsAccumulator< PANOCOCPStats< Conf > > & operator+= | ( | InnerStatsAccumulator< PANOCOCPStats< Conf > > & | acc, |
const PANOCOCPStats< Conf > & | s | ||
) |
Definition at line 255 of file panoc-ocp.hpp.
InnerStatsAccumulator< PANOCStats< Conf > > & operator+= | ( | InnerStatsAccumulator< PANOCStats< Conf > > & | acc, |
const PANOCStats< Conf > & | s | ||
) |
InnerStatsAccumulator< PANTRStats< Conf > > & operator+= | ( | InnerStatsAccumulator< PANTRStats< Conf > > & | acc, |
const PANTRStats< Conf > & | s | ||
) |
InnerStatsAccumulator< ZeroFPRStats< Conf > > & operator+= | ( | InnerStatsAccumulator< ZeroFPRStats< Conf > > & | acc, |
const ZeroFPRStats< Conf > & | s | ||
) |
Definition at line 230 of file zerofpr.hpp.
|
inline |
|
inline |
Get the difference between the given vector and its projection.
\[ v - \Pi_C(v) \]
[in] | v | The vector to project |
[in] | box | The box to project onto |
Definition at line 49 of file box.hpp.
|
inline |
Get the distance squared between the given vector and its projection.
\[ \left\| v - \Pi_C(v) \right\|_2^2 \]
[in] | v | The vector to project |
[in] | box | The box to project onto |
Definition at line 60 of file box.hpp.
|
inline |
Get the distance squared between the given vector and its projection in the Σ norm.
\[ \left\| v - \Pi_C(v) \right\|_\Sigma^2 = \left(v - \Pi_C(v)\right)^\top \Sigma \left(v - \Pi_C(v)\right) \]
[in] | v | The vector to project |
[in] | box | The box to project onto |
[in] | Σ | Diagonal matrix defining norm |
Definition at line 72 of file box.hpp.
KKTError< Conf > compute_kkt_error | ( | const alpaqa::TypeErasedProblem< Conf > & | problem, |
alpaqa::crvec< Conf > | x, | ||
alpaqa::crvec< Conf > | y | ||
) |
Definition at line 16 of file kkt-error.hpp.
std::ostream & operator<< | ( | std::ostream & | os, |
const OCPEvalCounter & | c | ||
) |
Definition at line 32 of file ocproblem-counters.cpp.
|
inline |
Definition at line 62 of file ocproblem-counters.hpp.
|
inline |
Definition at line 88 of file ocproblem-counters.hpp.
|
inline |
Definition at line 114 of file ocproblem-counters.hpp.
|
inline |
If the given vector v
is not finite, break or throw an exception with the given message msg
.
Definition at line 509 of file ocproblem.hpp.
|
inline |
Definition at line 517 of file ocproblem.hpp.
auto ocproblem_with_counters | ( | Problem && | p | ) |
Definition at line 649 of file ocproblem.hpp.
auto ocproblem_with_counters_ref | ( | Problem & | p | ) |
Definition at line 656 of file ocproblem.hpp.
std::ostream & operator<< | ( | std::ostream & | os, |
const EvalCounter & | c | ||
) |
Definition at line 32 of file problem-counters.cpp.
|
inline |
Definition at line 62 of file problem-counters.hpp.
|
inline |
Definition at line 88 of file problem-counters.hpp.
|
inline |
Definition at line 114 of file problem-counters.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
std::ostream & operator<< | ( | std::ostream & | os, |
SolverStatus | s | ||
) |
const char * enum_name | ( | CUTEstProblem::Report::Status | s | ) |
Definition at line 535 of file cutest-loader.cpp.
std::ostream & operator<< | ( | std::ostream & | os, |
CUTEstProblem::Report::Status | s | ||
) |
|
related |
Definition at line 552 of file cutest-loader.cpp.
void register_function | ( | function_dict_t *& | extra_functions, |
std::string | name, | ||
Func && | func | ||
) |
Make the given function available to alpaqa.
Definition at line 375 of file dl-problem.h.
void register_function | ( | problem_register_t & | result, |
std::string | name, | ||
Func && | func | ||
) |
void register_function | ( | control_problem_register_t & | result, |
std::string | name, | ||
Func && | func | ||
) |
void register_member_function | ( | Result & | result, |
std::string | name, | ||
Ret(T::*)(Args...) | member | ||
) |
|
static |
Wrap the given member function of signature into a lambda function that accepts the instance as a void pointer.
Ret Class::member(args...)
→ Ret(void *self, args...)
Ret Class::member(args...) const
→ Ret(const void *self, args...)
Type Class::member
→ Type &(void *self)
Type Class::member
→ const Type &(const void *self)
Definition at line 457 of file dl-problem.h.
|
inline |
Cleans up the extra functions registered by register_function.
Definition at line 468 of file dl-problem.h.
|
inline |
Definition at line 102 of file lbfgsb/include/alpaqa/lbfgsb/lbfgsb-adapter.hpp.
InnerStatsAccumulator< lbfgspp::LBFGSBStats< Conf > > & operator+= | ( | InnerStatsAccumulator< lbfgspp::LBFGSBStats< Conf > > & | acc, |
const lbfgspp::LBFGSBStats< Conf > & | s | ||
) |
Definition at line 106 of file lbfgspp/include/alpaqa/lbfgsb-adapter.hpp.
|
inlineconstexpr |
Definition at line 15 of file config.hpp.
|
constexpr |
Definition at line 69 of file config.hpp.
|
constexpr |
Definition at line 71 of file config.hpp.
Global empty vector for convenience.
Definition at line 143 of file config.hpp.
|
inlineconstexpr |
|
extern |
|
extern |