alpaqa matlab
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 optional_const_function_t = util::BasicVTable::optional_const_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.
 
template<class F >
using required_const_function_t = typename required_const_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_const_function_t< void(crvec z, rvec e)> eval_proj_diff_g
 
required_const_function_t< void(rvec y, real_t M)> eval_proj_multipliers
 
required_const_function_t< void(Box &U)> get_U
 
optional_const_function_t< void(Box &D)> get_D = nullptr
 
optional_const_function_t< void(Box &D)> get_D_N = &default_get_D_N
 
required_const_function_t< void(rvec x_init)> get_x_init
 
required_const_function_t< void(index_t timestep, crvec x, crvec u, rvec fxu)> eval_f
 
required_const_function_t< void(index_t timestep, crvec x, crvec u, rmat J_fxu)> eval_jac_f
 
required_const_function_t< void(index_t timestep, crvec x, crvec u, crvec p, rvec grad_fxu_p)> eval_grad_f_prod
 
optional_const_function_t< void(index_t timestep, crvec x, crvec u, rvec h)> eval_h = nullptr
 
optional_const_function_t< void(crvec x, rvec h)> eval_h_N = nullptr
 
required_const_function_t< real_t(index_t timestep, crvec h)> eval_l
 
required_const_function_t< real_t(crvec h)> eval_l_N
 
required_const_function_t< void(index_t timestep, crvec xu, crvec h, rvec qr)> eval_qr
 
required_const_function_t< void(crvec x, crvec h, rvec q)> eval_q_N
 
required_const_function_t< void(index_t timestep, crvec xu, crvec h, rmat Q)> eval_add_Q
 
optional_const_function_t< void(crvec x, crvec h, rmat Q)> eval_add_Q_N = &default_eval_add_Q_N
 
required_const_function_t< void(index_t timestep, crvec xu, crvec h, crindexvec mask, rmat R, rvec work)> eval_add_R_masked
 
required_const_function_t< void(index_t timestep, crvec xu, crvec h, crindexvec mask, rmat S, rvec work)> eval_add_S_masked
 
optional_const_function_t< void(index_t timestep, crvec xu, crvec h, crindexvec mask_J, crindexvec mask_K, crvec v, rvec out, rvec work)> eval_add_R_prod_masked = &default_eval_add_R_prod_masked
 
optional_const_function_t< void(index_t timestep, crvec xu, crvec h, crindexvec mask_K, crvec v, rvec out, rvec work)> eval_add_S_prod_masked = &default_eval_add_S_prod_masked
 
optional_const_function_t< length_t()> get_R_work_size = &default_get_R_work_size
 
optional_const_function_t< length_t()> get_S_work_size = &default_get_S_work_size
 
optional_const_function_t< void(index_t timestep, crvec x, rvec c)> eval_constr = nullptr
 
optional_const_function_t< void(crvec x, rvec c)> eval_constr_N = &default_eval_constr_N
 
optional_const_function_t< void(index_t timestep, crvec x, crvec p, rvec grad_cx_p)> eval_grad_constr_prod = nullptr
 
optional_const_function_t< void(crvec x, crvec p, rvec grad_cx_p)> eval_grad_constr_prod_N = &default_eval_grad_constr_prod_N
 
optional_const_function_t< void(index_t timestep, crvec x, crvec M, rmat out)> eval_add_gn_hess_constr = nullptr
 
optional_const_function_t< void(crvec x, crvec M, rmat out)> eval_add_gn_hess_constr_N = &default_eval_add_gn_hess_constr_N
 
required_const_function_t< void()> check
 
length_t N
 
length_t nu
 
length_t nx
 
length_t nh
 
length_t nh_N
 
length_t nc
 
length_t nc_N
 
required_const_function_t< void(void *storage)> copy = 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.

◆ optional_const_function_t

Definition at line 40 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 85 of file type-erasure.hpp.

◆ required_const_function_t

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

For const-qualified member functions.

Definition at line 89 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 109 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_const_function_t<void(crvec z, rvec e)> eval_proj_diff_g

Definition at line 45 of file ocproblem.hpp.

◆ eval_proj_multipliers

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

Definition at line 47 of file ocproblem.hpp.

◆ get_U

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

Definition at line 49 of file ocproblem.hpp.

◆ get_D

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

Definition at line 51 of file ocproblem.hpp.

◆ get_D_N

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

Definition at line 53 of file ocproblem.hpp.

◆ get_x_init

template<Config Conf>
required_const_function_t<void(rvec x_init)> get_x_init

Definition at line 55 of file ocproblem.hpp.

◆ eval_f

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

Definition at line 57 of file ocproblem.hpp.

◆ eval_jac_f

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

Definition at line 59 of file ocproblem.hpp.

◆ eval_grad_f_prod

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

Definition at line 61 of file ocproblem.hpp.

◆ eval_h

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

Definition at line 63 of file ocproblem.hpp.

◆ eval_h_N

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

Definition at line 65 of file ocproblem.hpp.

◆ eval_l

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

Definition at line 67 of file ocproblem.hpp.

◆ eval_l_N

template<Config Conf>
required_const_function_t<real_t(crvec h)> eval_l_N

Definition at line 69 of file ocproblem.hpp.

◆ eval_qr

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

Definition at line 71 of file ocproblem.hpp.

◆ eval_q_N

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

Definition at line 73 of file ocproblem.hpp.

◆ eval_add_Q

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

Definition at line 75 of file ocproblem.hpp.

◆ eval_add_Q_N

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

Definition at line 77 of file ocproblem.hpp.

◆ eval_add_R_masked

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

Definition at line 79 of file ocproblem.hpp.

◆ eval_add_S_masked

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

Definition at line 81 of file ocproblem.hpp.

◆ eval_add_R_prod_masked

Definition at line 83 of file ocproblem.hpp.

◆ eval_add_S_prod_masked

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

Definition at line 85 of file ocproblem.hpp.

◆ get_R_work_size

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

Definition at line 87 of file ocproblem.hpp.

◆ get_S_work_size

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

Definition at line 89 of file ocproblem.hpp.

◆ eval_constr

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

Definition at line 91 of file ocproblem.hpp.

◆ eval_constr_N

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

Definition at line 93 of file ocproblem.hpp.

◆ eval_grad_constr_prod

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

Definition at line 95 of file ocproblem.hpp.

◆ eval_grad_constr_prod_N

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

Definition at line 97 of file ocproblem.hpp.

◆ eval_add_gn_hess_constr

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

Definition at line 99 of file ocproblem.hpp.

◆ eval_add_gn_hess_constr_N

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

Definition at line 101 of file ocproblem.hpp.

◆ check

template<Config Conf>
required_const_function_t<void()> check

Definition at line 103 of file ocproblem.hpp.

◆ N

template<Config Conf>
length_t N

Definition at line 106 of file ocproblem.hpp.

◆ nu

template<Config Conf>
length_t nu

Definition at line 106 of file ocproblem.hpp.

◆ nx

template<Config Conf>
length_t nx

Definition at line 106 of file ocproblem.hpp.

◆ nh

template<Config Conf>
length_t nh

Definition at line 106 of file ocproblem.hpp.

◆ nh_N

template<Config Conf>
length_t nh_N

Definition at line 106 of file ocproblem.hpp.

◆ nc

template<Config Conf>
length_t nc

Definition at line 106 of file ocproblem.hpp.

◆ nc_N

template<Config Conf>
length_t nc_N

Definition at line 106 of file ocproblem.hpp.

◆ copy

required_const_function_t<void(void *storage)> copy = nullptr
inherited

Copy-construct a new instance into storage.

Definition at line 102 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 104 of file type-erasure.hpp.

◆ destroy

required_function_t<void()> destroy = nullptr
inherited

Destruct the given instance.

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

◆ type

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

The original type of the stored object.

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


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