alpaqa 1.0.0a16
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ControlProblemVTable< Conf > Struct Template Reference

#include <alpaqa/problem/ocproblem.hpp>

Detailed Description

template<Config Conf>
struct alpaqa::ControlProblemVTable< Conf >

Definition at line 33 of file ocproblem.hpp.

+ Inheritance diagram for ControlProblemVTable< Conf >:
+ Collaboration diagram for ControlProblemVTable< Conf >:

Public Types

using Box = alpaqa::Box< config_t >
 
template<class F >
using optional_function_t = util::BasicVTable::optional_function_t< F, ControlProblemVTable >
 
template<class F >
using required_function_t = typename required_function< F >::type
 A required function includes a void pointer to self, in addition to the arguments of F.
 

Public Member Functions

template<class P >
 ControlProblemVTable (std::in_place_t, P &p)
 
 ControlProblemVTable ()=default
 

Static Public Member Functions

static void default_get_D_N (const void *self, Box &D, const ControlProblemVTable &vtable)
 
static void default_eval_add_Q_N (const void *self, crvec x, crvec h, rmat Q, const ControlProblemVTable &vtable)
 
static void default_eval_add_R_prod_masked (const void *, index_t, crvec, crvec, crindexvec, crindexvec, crvec, rvec, rvec, const ControlProblemVTable &)
 
static void default_eval_add_S_prod_masked (const void *, index_t, crvec, crvec, crindexvec, crvec, rvec, rvec, const ControlProblemVTable &)
 
static length_t default_get_R_work_size (const void *, const ControlProblemVTable &)
 
static length_t default_get_S_work_size (const void *, const ControlProblemVTable &)
 
static void default_eval_constr_N (const void *self, crvec x, rvec c, const ControlProblemVTable &vtable)
 
static void default_eval_grad_constr_prod_N (const void *self, crvec x, crvec p, rvec grad_cx_p, const ControlProblemVTable &vtable)
 
static void default_eval_add_gn_hess_constr_N (const void *self, crvec x, crvec M, rmat out, const ControlProblemVTable &vtable)
 

Public Attributes

required_function_t< void(crvec z, rvec e) consteval_proj_diff_g
 
required_function_t< void(rvec y, real_t M) consteval_proj_multipliers
 
required_function_t< void(Box &U) constget_U
 
optional_function_t< void(Box &D) constget_D = nullptr
 
optional_function_t< void(Box &D) constget_D_N = &default_get_D_N
 
required_function_t< void(rvec x_init) constget_x_init
 
required_function_t< void(index_t timestep, crvec x, crvec u, rvec fxu) consteval_f
 
required_function_t< void(index_t timestep, crvec x, crvec u, rmat J_fxu) consteval_jac_f
 
required_function_t< void(index_t timestep, crvec x, crvec u, crvec p, rvec grad_fxu_p) consteval_grad_f_prod
 
optional_function_t< void(index_t timestep, crvec x, crvec u, rvec h) consteval_h = nullptr
 
optional_function_t< void(crvec x, rvec h) consteval_h_N = nullptr
 
required_function_t< real_t(index_t timestep, crvec h) consteval_l
 
required_function_t< real_t(crvec h) consteval_l_N
 
required_function_t< void(index_t timestep, crvec xu, crvec h, rvec qr) consteval_qr
 
required_function_t< void(crvec x, crvec h, rvec q) consteval_q_N
 
required_function_t< void(index_t timestep, crvec xu, crvec h, rmat Q) consteval_add_Q
 
optional_function_t< void(crvec x, crvec h, rmat Q) consteval_add_Q_N = &default_eval_add_Q_N
 
required_function_t< void(index_t timestep, crvec xu, crvec h, crindexvec mask, rmat R, rvec work) consteval_add_R_masked
 
required_function_t< void(index_t timestep, crvec xu, crvec h, crindexvec mask, rmat S, rvec work) consteval_add_S_masked
 
optional_function_t< void(index_t timestep, crvec xu, crvec h, crindexvec mask_J, crindexvec mask_K, crvec v, rvec out, rvec work) consteval_add_R_prod_masked = &default_eval_add_R_prod_masked
 
optional_function_t< void(index_t timestep, crvec xu, crvec h, crindexvec mask_K, crvec v, rvec out, rvec work) consteval_add_S_prod_masked = &default_eval_add_S_prod_masked
 
optional_function_t< length_t() constget_R_work_size = &default_get_R_work_size
 
optional_function_t< length_t() constget_S_work_size = &default_get_S_work_size
 
optional_function_t< void(index_t timestep, crvec x, rvec c) consteval_constr = nullptr
 
optional_function_t< void(crvec x, rvec c) consteval_constr_N = &default_eval_constr_N
 
optional_function_t< void(index_t timestep, crvec x, crvec p, rvec grad_cx_p) consteval_grad_constr_prod = nullptr
 
optional_function_t< void(crvec x, crvec p, rvec grad_cx_p) consteval_grad_constr_prod_N = &default_eval_grad_constr_prod_N
 
optional_function_t< void(index_t timestep, crvec x, crvec M, rmat out) consteval_add_gn_hess_constr = nullptr
 
optional_function_t< void(crvec x, crvec M, rmat out) consteval_add_gn_hess_constr_N = &default_eval_add_gn_hess_constr_N
 
required_function_t< void() constcheck
 
length_t N
 
length_t nu
 
length_t nx
 
length_t nh
 
length_t nh_N
 
length_t nc
 
length_t nc_N
 
required_function_t< void(void *storage) constcopy = nullptr
 Copy-construct a new instance into storage.
 
required_function_t< void(void *storage)> move = nullptr
 Move-construct a new instance into storage.
 
required_function_t< void()> destroy = nullptr
 Destruct the given instance.
 
const std::type_info * type = &typeid(void)
 The original type of the stored object.
 

Member Typedef Documentation

◆ Box

template<Config Conf>
using Box = alpaqa::Box<config_t>

Definition at line 35 of file ocproblem.hpp.

◆ optional_function_t

Definition at line 38 of file ocproblem.hpp.

◆ required_function_t

A required function includes a void pointer to self, in addition to the arguments of F.

Definition at line 81 of file type-erasure.hpp.

Constructor & Destructor Documentation

◆ ControlProblemVTable() [1/2]

template<Config Conf>
template<class P >
ControlProblemVTable ( std::in_place_t  ,
P &  p 
)
inline

Definition at line 106 of file ocproblem.hpp.

◆ ControlProblemVTable() [2/2]

template<Config Conf>
ControlProblemVTable ( )
default

Member Function Documentation

◆ default_get_D_N()

template<Config Conf>
void default_get_D_N ( const void self,
Box D,
const ControlProblemVTable< Conf > &  vtable 
)
static

Definition at line 8 of file ocproblem.tpp.

◆ default_eval_add_Q_N()

template<Config Conf>
void default_eval_add_Q_N ( const void self,
crvec  x,
crvec  h,
rmat  Q,
const ControlProblemVTable< Conf > &  vtable 
)
static

Definition at line 13 of file ocproblem.tpp.

◆ default_eval_add_R_prod_masked()

template<Config Conf>
void default_eval_add_R_prod_masked ( const void ,
index_t  ,
crvec  ,
crvec  ,
crindexvec  ,
crindexvec  ,
crvec  ,
rvec  ,
rvec  ,
const ControlProblemVTable< Conf > &   
)
static

Definition at line 18 of file ocproblem.tpp.

◆ default_eval_add_S_prod_masked()

template<Config Conf>
void default_eval_add_S_prod_masked ( const void ,
index_t  ,
crvec  ,
crvec  ,
crindexvec  ,
crvec  ,
rvec  ,
rvec  ,
const ControlProblemVTable< Conf > &   
)
static

Definition at line 25 of file ocproblem.tpp.

◆ default_get_R_work_size()

template<Config Conf>
auto default_get_R_work_size ( const void ,
const ControlProblemVTable< Conf > &   
)
static

Definition at line 31 of file ocproblem.tpp.

◆ default_get_S_work_size()

template<Config Conf>
auto default_get_S_work_size ( const void ,
const ControlProblemVTable< Conf > &   
)
static

Definition at line 36 of file ocproblem.tpp.

◆ default_eval_constr_N()

template<Config Conf>
void default_eval_constr_N ( const void self,
crvec  x,
rvec  c,
const ControlProblemVTable< Conf > &  vtable 
)
static

Definition at line 41 of file ocproblem.tpp.

◆ default_eval_grad_constr_prod_N()

template<Config Conf>
void default_eval_grad_constr_prod_N ( const void self,
crvec  x,
crvec  p,
rvec  grad_cx_p,
const ControlProblemVTable< Conf > &  vtable 
)
static

Definition at line 46 of file ocproblem.tpp.

◆ default_eval_add_gn_hess_constr_N()

template<Config Conf>
void default_eval_add_gn_hess_constr_N ( const void self,
crvec  x,
crvec  M,
rmat  out,
const ControlProblemVTable< Conf > &  vtable 
)
static

Definition at line 51 of file ocproblem.tpp.

Member Data Documentation

◆ eval_proj_diff_g

template<Config Conf>
required_function_t<void(crvec z, rvec e) const> eval_proj_diff_g

Definition at line 42 of file ocproblem.hpp.

◆ eval_proj_multipliers

template<Config Conf>
required_function_t<void(rvec y, real_t M) const> eval_proj_multipliers

Definition at line 44 of file ocproblem.hpp.

◆ get_U

template<Config Conf>
required_function_t<void(Box &U) const> get_U

Definition at line 46 of file ocproblem.hpp.

◆ get_D

template<Config Conf>
optional_function_t<void(Box &D) const> get_D = nullptr

Definition at line 48 of file ocproblem.hpp.

◆ get_D_N

template<Config Conf>
optional_function_t<void(Box &D) const> get_D_N = &default_get_D_N

Definition at line 50 of file ocproblem.hpp.

◆ get_x_init

template<Config Conf>
required_function_t<void(rvec x_init) const> get_x_init

Definition at line 52 of file ocproblem.hpp.

◆ eval_f

template<Config Conf>
required_function_t<void(index_t timestep, crvec x, crvec u, rvec fxu) const> eval_f

Definition at line 54 of file ocproblem.hpp.

◆ eval_jac_f

template<Config Conf>
required_function_t<void(index_t timestep, crvec x, crvec u, rmat J_fxu) const> eval_jac_f

Definition at line 56 of file ocproblem.hpp.

◆ eval_grad_f_prod

template<Config Conf>
required_function_t<void(index_t timestep, crvec x, crvec u, crvec p, rvec grad_fxu_p) const> eval_grad_f_prod

Definition at line 58 of file ocproblem.hpp.

◆ eval_h

template<Config Conf>
optional_function_t<void(index_t timestep, crvec x, crvec u, rvec h) const> eval_h = nullptr

Definition at line 60 of file ocproblem.hpp.

◆ eval_h_N

template<Config Conf>
optional_function_t<void(crvec x, rvec h) const> eval_h_N = nullptr

Definition at line 62 of file ocproblem.hpp.

◆ eval_l

template<Config Conf>
required_function_t<real_t(index_t timestep, crvec h) const> eval_l

Definition at line 64 of file ocproblem.hpp.

◆ eval_l_N

template<Config Conf>
required_function_t<real_t(crvec h) const> eval_l_N

Definition at line 66 of file ocproblem.hpp.

◆ eval_qr

template<Config Conf>
required_function_t<void(index_t timestep, crvec xu, crvec h, rvec qr) const> eval_qr

Definition at line 68 of file ocproblem.hpp.

◆ eval_q_N

template<Config Conf>
required_function_t<void(crvec x, crvec h, rvec q) const> eval_q_N

Definition at line 70 of file ocproblem.hpp.

◆ eval_add_Q

template<Config Conf>
required_function_t<void(index_t timestep, crvec xu, crvec h, rmat Q) const> eval_add_Q

Definition at line 72 of file ocproblem.hpp.

◆ eval_add_Q_N

template<Config Conf>
optional_function_t<void(crvec x, crvec h, rmat Q) const> eval_add_Q_N = &default_eval_add_Q_N

Definition at line 74 of file ocproblem.hpp.

◆ eval_add_R_masked

template<Config Conf>
required_function_t<void(index_t timestep, crvec xu, crvec h, crindexvec mask, rmat R, rvec work) const> eval_add_R_masked

Definition at line 76 of file ocproblem.hpp.

◆ eval_add_S_masked

template<Config Conf>
required_function_t<void(index_t timestep, crvec xu, crvec h, crindexvec mask, rmat S, rvec work) const> eval_add_S_masked

Definition at line 78 of file ocproblem.hpp.

◆ eval_add_R_prod_masked

template<Config Conf>
optional_function_t<void(index_t timestep, crvec xu, crvec h, crindexvec mask_J, crindexvec mask_K, crvec v, rvec out, rvec work) const> eval_add_R_prod_masked = &default_eval_add_R_prod_masked

Definition at line 80 of file ocproblem.hpp.

◆ eval_add_S_prod_masked

template<Config Conf>
optional_function_t<void(index_t timestep, crvec xu, crvec h, crindexvec mask_K, crvec v, rvec out, rvec work) const> eval_add_S_prod_masked = &default_eval_add_S_prod_masked

Definition at line 82 of file ocproblem.hpp.

◆ get_R_work_size

template<Config Conf>
optional_function_t<length_t() const> get_R_work_size = &default_get_R_work_size

Definition at line 84 of file ocproblem.hpp.

◆ get_S_work_size

template<Config Conf>
optional_function_t<length_t() const> get_S_work_size = &default_get_S_work_size

Definition at line 86 of file ocproblem.hpp.

◆ eval_constr

template<Config Conf>
optional_function_t<void(index_t timestep, crvec x, rvec c) const> eval_constr = nullptr

Definition at line 88 of file ocproblem.hpp.

◆ eval_constr_N

template<Config Conf>
optional_function_t<void(crvec x, rvec c) const> eval_constr_N = &default_eval_constr_N

Definition at line 90 of file ocproblem.hpp.

◆ eval_grad_constr_prod

template<Config Conf>
optional_function_t<void(index_t timestep, crvec x, crvec p, rvec grad_cx_p) const> eval_grad_constr_prod = nullptr

Definition at line 92 of file ocproblem.hpp.

◆ eval_grad_constr_prod_N

template<Config Conf>
optional_function_t<void(crvec x, crvec p, rvec grad_cx_p) const> eval_grad_constr_prod_N = &default_eval_grad_constr_prod_N

Definition at line 94 of file ocproblem.hpp.

◆ eval_add_gn_hess_constr

template<Config Conf>
optional_function_t<void(index_t timestep, crvec x, crvec M, rmat out) const> eval_add_gn_hess_constr = nullptr

Definition at line 96 of file ocproblem.hpp.

◆ eval_add_gn_hess_constr_N

template<Config Conf>
optional_function_t<void(crvec x, crvec M, rmat out) const> eval_add_gn_hess_constr_N = &default_eval_add_gn_hess_constr_N

Definition at line 98 of file ocproblem.hpp.

◆ check

template<Config Conf>
required_function_t<void() const> check

Definition at line 100 of file ocproblem.hpp.

◆ N

template<Config Conf>
length_t N

Definition at line 103 of file ocproblem.hpp.

◆ nu

template<Config Conf>
length_t nu

Definition at line 103 of file ocproblem.hpp.

◆ nx

template<Config Conf>
length_t nx

Definition at line 103 of file ocproblem.hpp.

◆ nh

template<Config Conf>
length_t nh

Definition at line 103 of file ocproblem.hpp.

◆ nh_N

template<Config Conf>
length_t nh_N

Definition at line 103 of file ocproblem.hpp.

◆ nc

template<Config Conf>
length_t nc

Definition at line 103 of file ocproblem.hpp.

◆ nc_N

template<Config Conf>
length_t nc_N

Definition at line 103 of file ocproblem.hpp.

◆ copy

required_function_t<void(void *storage) const> copy = nullptr
inherited

Copy-construct a new instance into storage.

Definition at line 89 of file type-erasure.hpp.

◆ move

required_function_t<void(void *storage)> move = nullptr
inherited

Move-construct a new instance into storage.

Definition at line 91 of file type-erasure.hpp.

◆ destroy

required_function_t<void()> destroy = nullptr
inherited

Destruct the given instance.

Definition at line 93 of file type-erasure.hpp.

◆ type

const std::type_info* type = &typeid(void)
inherited

The original type of the stored object.

Definition at line 95 of file type-erasure.hpp.


The documentation for this struct was generated from the following files: