alpaqa 1.0.0a11
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

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

using required_function_t = typename required_function<F>::type
inherited

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

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

Constructor & Destructor Documentation

◆ ControlProblemVTable() [1/2]

ControlProblemVTable ( std::in_place_t  ,
P &  p 
)
inline

Definition at line 109 of file ocproblem.hpp.

◆ ControlProblemVTable() [2/2]

ControlProblemVTable ( )
default

Member Function Documentation

◆ default_get_D_N()

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()

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()

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()

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()

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()

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

Definition at line 36 of file ocproblem.tpp.

◆ default_eval_constr_N()

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()

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()

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

required_const_function_t<void(crvec z, rvec e)> eval_proj_diff_g

Definition at line 45 of file ocproblem.hpp.

◆ eval_proj_multipliers

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

Definition at line 47 of file ocproblem.hpp.

◆ get_U

required_const_function_t<void(Box &U)> get_U

Definition at line 49 of file ocproblem.hpp.

◆ get_D

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

Definition at line 51 of file ocproblem.hpp.

◆ get_D_N

Definition at line 53 of file ocproblem.hpp.

◆ get_x_init

required_const_function_t<void(rvec x_init)> get_x_init

Definition at line 55 of file ocproblem.hpp.

◆ eval_f

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

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

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

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

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

Definition at line 65 of file ocproblem.hpp.

◆ eval_l

Definition at line 67 of file ocproblem.hpp.

◆ eval_l_N

Definition at line 69 of file ocproblem.hpp.

◆ eval_qr

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

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

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

Definition at line 77 of file ocproblem.hpp.

◆ eval_add_R_masked

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

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

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

Definition at line 83 of file ocproblem.hpp.

◆ eval_add_S_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

Definition at line 85 of file ocproblem.hpp.

◆ get_R_work_size

Definition at line 87 of file ocproblem.hpp.

◆ get_S_work_size

Definition at line 89 of file ocproblem.hpp.

◆ eval_constr

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

Definition at line 93 of file ocproblem.hpp.

◆ eval_grad_constr_prod

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

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

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

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

Definition at line 103 of file ocproblem.hpp.

◆ N

Definition at line 106 of file ocproblem.hpp.

◆ nu

Definition at line 106 of file ocproblem.hpp.

◆ nx

Definition at line 106 of file ocproblem.hpp.

◆ nh

Definition at line 106 of file ocproblem.hpp.

◆ nh_N

length_t nh_N

Definition at line 106 of file ocproblem.hpp.

◆ nc

Definition at line 106 of file ocproblem.hpp.

◆ nc_N

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 95 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 97 of file type-erasure.hpp.

◆ destroy

required_function_t<void()> destroy = nullptr
inherited

Destruct the given instance.

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

◆ type

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

The original type of the stored object.

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


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