alpaqa sparse
Nonconvex constrained optimization
Loading...
Searching...
No Matches
ocproblem.tpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace alpaqa {
6
7template <Config Conf>
9 const ControlProblemVTable &vtable) {
10 vtable.get_D(self, D, vtable);
11}
12template <Config Conf>
14 const ControlProblemVTable &vtable) {
15 vtable.eval_add_Q(self, vtable.N, x, h, Q);
16}
17template <Config Conf>
20 rvec,
21 const ControlProblemVTable &) {
22 throw not_implemented_error("default_eval_add_R_prod_masked");
23}
24template <Config Conf>
27 const ControlProblemVTable &) {
28 throw not_implemented_error("default_eval_add_S_prod_masked");
29}
30template <Config Conf>
32 -> length_t {
33 return 0;
34}
35template <Config Conf>
37 -> length_t {
38 return 0;
39}
40template <Config Conf>
42 const ControlProblemVTable &vtable) {
43 vtable.eval_constr(self, vtable.N, x, c, vtable);
44}
45template <Config Conf>
47 const void *self, crvec x, crvec p, rvec grad_cx_p, const ControlProblemVTable &vtable) {
48 vtable.eval_grad_constr_prod(self, vtable.N, x, p, grad_cx_p, vtable);
49}
50template <Config Conf>
52 const void *self, crvec x, crvec M, rmat out, const ControlProblemVTable &vtable) {
53 vtable.eval_add_gn_hess_constr(self, vtable.N, x, M, out, vtable);
54}
55
56} // namespace alpaqa
typename Conf::rmat rmat
Definition config.hpp:74
typename Conf::index_t index_t
Definition config.hpp:77
typename Conf::length_t length_t
Definition config.hpp:76
constexpr const auto inf
Definition config.hpp:85
typename Conf::rvec rvec
Definition config.hpp:69
typename Conf::crvec crvec
Definition config.hpp:70
typename Conf::crindexvec crindexvec
Definition config.hpp:80
optional_const_function_t< void(index_t timestep, crvec x, crvec p, rvec grad_cx_p)> eval_grad_constr_prod
Definition ocproblem.hpp:95
static length_t default_get_R_work_size(const void *, const ControlProblemVTable &)
Definition ocproblem.tpp:31
static length_t default_get_S_work_size(const void *, const ControlProblemVTable &)
Definition ocproblem.tpp:36
static void default_eval_add_S_prod_masked(const void *, index_t, crvec, crvec, crindexvec, crvec, rvec, rvec, const ControlProblemVTable &)
Definition ocproblem.tpp:25
optional_const_function_t< void(Box &D)> get_D
Definition ocproblem.hpp:51
static void default_eval_constr_N(const void *self, crvec x, rvec c, const ControlProblemVTable &vtable)
Definition ocproblem.tpp:41
static void default_eval_add_R_prod_masked(const void *, index_t, crvec, crvec, crindexvec, crindexvec, crvec, rvec, rvec, const ControlProblemVTable &)
Definition ocproblem.tpp:18
static void default_eval_grad_constr_prod_N(const void *self, crvec x, crvec p, rvec grad_cx_p, const ControlProblemVTable &vtable)
Definition ocproblem.tpp:46
static void default_eval_add_gn_hess_constr_N(const void *self, crvec x, crvec M, rmat out, const ControlProblemVTable &vtable)
Definition ocproblem.tpp:51
static void default_eval_add_Q_N(const void *self, crvec x, crvec h, rmat Q, const ControlProblemVTable &vtable)
Definition ocproblem.tpp:13
static void default_get_D_N(const void *self, Box &D, const ControlProblemVTable &vtable)
Definition ocproblem.tpp:8
optional_const_function_t< void(index_t timestep, crvec x, crvec M, rmat out)> eval_add_gn_hess_constr
Definition ocproblem.hpp:99
required_const_function_t< void(index_t timestep, crvec xu, crvec h, rmat Q)> eval_add_Q
Definition ocproblem.hpp:75
optional_const_function_t< void(index_t timestep, crvec x, rvec c)> eval_constr
Definition ocproblem.hpp:91