alpaqa develop
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:96
typename Conf::index_t index_t
Definition config.hpp:104
typename Conf::length_t length_t
Definition config.hpp:103
constexpr const auto inf
Definition config.hpp:112
typename Conf::rvec rvec
Definition config.hpp:91
typename Conf::crvec crvec
Definition config.hpp:92
typename Conf::crindexvec crindexvec
Definition config.hpp:107
optional_function_t< void(index_t timestep, crvec x, crvec M, rmat out) const > eval_add_gn_hess_constr
Definition ocproblem.hpp:96
optional_function_t< void(index_t timestep, crvec x, rvec c) const > eval_constr
Definition ocproblem.hpp:88
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_function_t< void(index_t timestep, crvec x, crvec p, rvec grad_cx_p) const > eval_grad_constr_prod
Definition ocproblem.hpp:92
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
optional_function_t< void(Box &D) const > get_D
Definition ocproblem.hpp:48
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
required_function_t< void(index_t timestep, crvec xu, crvec h, rmat Q) const > eval_add_Q
Definition ocproblem.hpp:72