#include <alpaqa/cutest/cutest-loader.hpp>
Wrapper for CUTEst problems loaded from an external shared library.
Definition at line 18 of file cutest-loader.hpp.
Classes | |
struct | Report |
The report generated by CUTEst. More... | |
struct | SparseStorage |
Public Types | |
using | Sparsity = alpaqa::Sparsity< config_t > |
using | Box = alpaqa::Box< config_t > |
Static Public Member Functions | |
static real_t | eval_proj_grad_step_box (const Box &C, real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p) |
Projected gradient step for rectangular box C. | |
static void | eval_prox_grad_step_box_l1_impl (const Box &C, const auto &λ, real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p) |
Proximal gradient step for rectangular box C with ℓ₁-regularization. | |
static real_t | eval_prox_grad_step_box_l1 (const Box &C, const auto &λ, real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p) |
Proximal gradient step for rectangular box C with ℓ₁-regularization. | |
static real_t | eval_prox_grad_step_box_l1_scal (const Box &C, real_t λ, real_t γ, crvec x, crvec grad_ψ, rvec x̂, rvec p) |
Proximal gradient step for rectangular box C with ℓ₁-regularization. | |
static void | eval_proj_multipliers_box (const Box &D, rvec y, real_t M, index_t penalty_alm_split) |
Public Attributes | |
std::string | name = "<UNKNOWN>" |
Problem name. | |
vec | x0 |
Initial value of decision variables. | |
vec | y0 |
Initial value of Lagrange multipliers. | |
length_t | n |
Number of decision variables, dimension of x. | |
length_t | m |
Number of constraints, dimension of g(x) and z. | |
Box | C |
Constraints of the decision variables, \( x \in C \). | |
Box | D |
Other constraints, \( g(x) \in D \). | |
vec | l1_reg |
\( \ell_1 \) (1-norm) regularization parameter. | |
index_t | penalty_alm_split |
Components of the constraint function with indices below this number are handled using a quadratic penalty method rather than using an augmented Lagrangian method. | |
Private Attributes | |
util::copyable_unique_ptr< class CUTEstLoader > | impl |
bool | sparse = false |
int | nnz_H = -1 |
int | nnz_J = -1 |
struct alpaqa::CUTEstProblem::SparseStorage | storage_jac_g |
struct alpaqa::CUTEstProblem::SparseStorage | storage_hess_L |
struct alpaqa::CUTEstProblem::Report |
struct alpaqa::CUTEstProblem::SparseStorage |
using Sparsity = alpaqa::Sparsity<config_t> |
Definition at line 22 of file cutest-loader.hpp.
|
inherited |
Definition at line 19 of file box-constr-problem.hpp.
Load a CUTEst problem from the given shared library and OUTSDIF.d file.
If so_fname
points to a directory, "PROBLEM.so"
is appended automatically. If outsdif_fname
is nullptr
, the same directory as so_fname
is used.
Definition at line 253 of file cutest-loader.cpp.
|
default |
|
defaultnoexcept |
|
default |
|
default |
|
defaultnoexcept |
auto get_report | ( | ) | const |
Definition at line 271 of file cutest-loader.cpp.
Definition at line 539 of file cutest-loader.cpp.
|
inline |
Definition at line 74 of file cutest-loader.hpp.
Definition at line 291 of file cutest-loader.cpp.
Definition at line 299 of file cutest-loader.cpp.
Definition at line 316 of file cutest-loader.cpp.
Definition at line 328 of file cutest-loader.cpp.
auto get_jac_g_sparsity | ( | ) | const |
Definition at line 354 of file cutest-loader.cpp.
Definition at line 383 of file cutest-loader.cpp.
Definition at line 450 of file cutest-loader.cpp.
auto get_hess_L_sparsity | ( | ) | const |
Definition at line 483 of file cutest-loader.cpp.
Definition at line 512 of file cutest-loader.cpp.
Definition at line 521 of file cutest-loader.cpp.
Definition at line 529 of file cutest-loader.cpp.
|
inline |
Definition at line 110 of file cutest-loader.hpp.
Change the dimensions of the problem (number of decision variables and number of constaints).
Destructive: resizes and/or resets the members C, D, l1_reg and penalty_alm_split.
n | Number of decision variables |
m | Number of constraints |
Definition at line 45 of file box-constr-problem.hpp.
|
inlineinherited |
Number of decision variables, n.
Definition at line 81 of file box-constr-problem.hpp.
|
inlineinherited |
Number of constraints, m.
Definition at line 83 of file box-constr-problem.hpp.
|
inlinestaticinherited |
Projected gradient step for rectangular box C.
\[ \begin{aligned} \hat x &= \Pi_C(x - \gamma\nabla\psi(x)) \\ p &= \hat x - x \\ &= \max(\underline x - x, \;\min(-\gamma\nabla\psi(x), \overline x - x) \end{aligned} \]
Definition at line 90 of file box-constr-problem.hpp.
|
inlinestaticinherited |
Proximal gradient step for rectangular box C with ℓ₁-regularization.
\[ \begin{aligned} h(x) &= \|x\|_1 + \delta_C(x) \\ \hat x &= \prox_{\gamma h}(x - \gamma\nabla\psi(x)) \\ &= -\max\big( x - \overline x, \;\min\big( x - \underline x, \;\min\big( \gamma(\nabla\psi(x) + \lambda), \;\max\big( \gamma(\nabla\psi(x) - \lambda), x \big) \big) \big) \big) \end{aligned} \]
Definition at line 113 of file box-constr-problem.hpp.
|
inlinestaticinherited |
Proximal gradient step for rectangular box C with ℓ₁-regularization.
\[ \begin{aligned} h(x) &= \|x\|_1 + \delta_C(x) \\ \hat x &= \prox_{\gamma h}(x - \gamma\nabla\psi(x)) \\ &= -\max\big( x - \overline x, \;\min\big( x - \underline x, \;\min\big( \gamma(\nabla\psi(x) + \lambda), \;\max\big( \gamma(\nabla\psi(x) - \lambda), x \big) \big) \big) \big) \end{aligned} \]
Definition at line 122 of file box-constr-problem.hpp.
|
inlinestaticinherited |
Proximal gradient step for rectangular box C with ℓ₁-regularization.
\[ \begin{aligned} h(x) &= \|x\|_1 + \delta_C(x) \\ \hat x &= \prox_{\gamma h}(x - \gamma\nabla\psi(x)) \\ &= -\max\big( x - \overline x, \;\min\big( x - \underline x, \;\min\big( \gamma(\nabla\psi(x) + \lambda), \;\max\big( \gamma(\nabla\psi(x) - \lambda), x \big) \big) \big) \big) \end{aligned} \]
Definition at line 130 of file box-constr-problem.hpp.
|
inlineinherited |
Definition at line 140 of file box-constr-problem.hpp.
Definition at line 150 of file box-constr-problem.hpp.
|
inlinestaticinherited |
Definition at line 152 of file box-constr-problem.hpp.
Definition at line 168 of file box-constr-problem.hpp.
Definition at line 173 of file box-constr-problem.hpp.
Definition at line 175 of file box-constr-problem.hpp.
|
inlineinherited |
Only supported if the ℓ₁-regularization term is zero.
Definition at line 179 of file box-constr-problem.hpp.
|
inlineinherited |
Definition at line 185 of file box-constr-problem.hpp.
|
inlineinherited |
Definition at line 222 of file box-constr-problem.hpp.
std::string name = "<UNKNOWN>" |
Problem name.
Definition at line 79 of file cutest-loader.hpp.
vec x0 |
Initial value of decision variables.
Definition at line 80 of file cutest-loader.hpp.
vec y0 |
Initial value of Lagrange multipliers.
Definition at line 81 of file cutest-loader.hpp.
|
private |
Definition at line 84 of file cutest-loader.hpp.
Definition at line 85 of file cutest-loader.hpp.
|
mutableprivate |
Definition at line 86 of file cutest-loader.hpp.
|
mutableprivate |
Definition at line 87 of file cutest-loader.hpp.
|
private |
|
private |
|
inherited |
Number of decision variables, dimension of x.
Definition at line 22 of file box-constr-problem.hpp.
|
inherited |
Number of constraints, dimension of g(x) and z.
Definition at line 24 of file box-constr-problem.hpp.
|
inherited |
Constraints of the decision variables, \( x \in C \).
Definition at line 65 of file box-constr-problem.hpp.
|
inherited |
Other constraints, \( g(x) \in D \).
Definition at line 67 of file box-constr-problem.hpp.
|
inherited |
\( \ell_1 \) (1-norm) regularization parameter.
Possible dimensions are: \( 0 \) (no regularization), \( 1 \) (a single scalar factor), or \( n \) (a different factor for each variable).
Definition at line 72 of file box-constr-problem.hpp.
|
inherited |
Components of the constraint function with indices below this number are handled using a quadratic penalty method rather than using an augmented Lagrangian method.
Specifically, the Lagrange multipliers for these components (which determine the shifts in ALM) are kept at zero.
Definition at line 78 of file box-constr-problem.hpp.