#include <alpaqa/dl/dl-problem.hpp>
Class that loads an optimal control problem using dlopen
.
The shared library should export a C function with the name <symbol_prefix>_register
that accepts a void pointer with user data, and returns a struct of type alpaqa_control_problem_register_t that contains all data to represent the problem, as well as function pointers for all required operations. See C++/DLProblem/main.cpp
Definition at line 199 of file dl-problem.hpp.
Public Types | |
using | Box = alpaqa::Box< config_t > |
using | instance_t = ExtraFuncs::instance_t |
Private Attributes | |
std::shared_ptr< void > | handle |
Handle to the shared module defining the problem. | |
std::shared_ptr< void > | instance |
Problem instance created by the registration function, including the deleter to destroy it. | |
control_problem_functions_t * | functions = nullptr |
Pointer to the struct of function pointers for evaluating the objective, constraints, their gradients, etc. | |
ExtraFuncs | extra_funcs |
Dictionary of extra functions that were registered by the problem. | |
using Box = alpaqa::Box<config_t> |
Definition at line 202 of file dl-problem.hpp.
using instance_t = ExtraFuncs::instance_t |
Definition at line 280 of file dl-problem.hpp.
DLControlProblem | ( | const std::string & | so_filename, |
std::string | symbol_prefix = "alpaqa_control_problem" , |
||
void * | user_param = nullptr |
||
) |
Load a problem from a shared library.
so_filename | Filename of the shared library to load. |
symbol_prefix | Prefix of the registration function. |
user_param | Pointer to custom user data to pass to the registration function. |
Definition at line 263 of file dl-problem.cpp.
|
inline |
Definition at line 226 of file dl-problem.hpp.
|
inline |
Definition at line 227 of file dl-problem.hpp.
|
inline |
Definition at line 228 of file dl-problem.hpp.
|
inline |
Definition at line 229 of file dl-problem.hpp.
|
inline |
Definition at line 230 of file dl-problem.hpp.
|
inline |
Definition at line 231 of file dl-problem.hpp.
|
inline |
Definition at line 232 of file dl-problem.hpp.
|
inline |
Definition at line 234 of file dl-problem.hpp.
Definition at line 298 of file dl-problem.cpp.
Definition at line 299 of file dl-problem.cpp.
Definition at line 300 of file dl-problem.cpp.
Definition at line 301 of file dl-problem.cpp.
Definition at line 302 of file dl-problem.cpp.
Definition at line 303 of file dl-problem.cpp.
Definition at line 304 of file dl-problem.cpp.
Definition at line 305 of file dl-problem.cpp.
Definition at line 306 of file dl-problem.cpp.
Definition at line 307 of file dl-problem.cpp.
Definition at line 308 of file dl-problem.cpp.
Definition at line 309 of file dl-problem.cpp.
Definition at line 311 of file dl-problem.cpp.
auto eval_add_R_masked | ( | index_t | timestep, |
crvec | xu, | ||
crvec | h, | ||
crindexvec | mask, | ||
rmat | R, | ||
rvec | work | ||
) | const |
Definition at line 313 of file dl-problem.cpp.
auto eval_add_S_masked | ( | index_t | timestep, |
crvec | xu, | ||
crvec | h, | ||
crindexvec | mask, | ||
rmat | S, | ||
rvec | work | ||
) | const |
Definition at line 314 of file dl-problem.cpp.
auto eval_add_R_prod_masked | ( | index_t | timestep, |
crvec | xu, | ||
crvec | h, | ||
crindexvec | mask_J, | ||
crindexvec | mask_K, | ||
crvec | v, | ||
rvec | out, | ||
rvec | work | ||
) | const |
Definition at line 315 of file dl-problem.cpp.
auto eval_add_S_prod_masked | ( | index_t | timestep, |
crvec | xu, | ||
crvec | h, | ||
crindexvec | mask_K, | ||
crvec | v, | ||
rvec | out, | ||
rvec | work | ||
) | const |
Definition at line 316 of file dl-problem.cpp.
auto get_R_work_size | ( | ) | const |
Definition at line 317 of file dl-problem.cpp.
auto get_S_work_size | ( | ) | const |
Definition at line 318 of file dl-problem.cpp.
Definition at line 319 of file dl-problem.cpp.
Definition at line 320 of file dl-problem.cpp.
Definition at line 321 of file dl-problem.cpp.
Definition at line 322 of file dl-problem.cpp.
Definition at line 323 of file dl-problem.cpp.
Definition at line 324 of file dl-problem.cpp.
bool provides_get_D | ( | ) | const |
Definition at line 326 of file dl-problem.cpp.
bool provides_get_D_N | ( | ) | const |
Definition at line 327 of file dl-problem.cpp.
bool provides_eval_add_Q_N | ( | ) | const |
Definition at line 328 of file dl-problem.cpp.
bool provides_eval_add_R_prod_masked | ( | ) | const |
Definition at line 329 of file dl-problem.cpp.
bool provides_eval_add_S_prod_masked | ( | ) | const |
Definition at line 330 of file dl-problem.cpp.
bool provides_get_R_work_size | ( | ) | const |
Definition at line 331 of file dl-problem.cpp.
bool provides_get_S_work_size | ( | ) | const |
Definition at line 332 of file dl-problem.cpp.
bool provides_eval_constr | ( | ) | const |
Definition at line 333 of file dl-problem.cpp.
bool provides_eval_constr_N | ( | ) | const |
Definition at line 334 of file dl-problem.cpp.
bool provides_eval_grad_constr_prod | ( | ) | const |
Definition at line 335 of file dl-problem.cpp.
bool provides_eval_grad_constr_prod_N | ( | ) | const |
Definition at line 336 of file dl-problem.cpp.
bool provides_eval_add_gn_hess_constr | ( | ) | const |
Definition at line 337 of file dl-problem.cpp.
bool provides_eval_add_gn_hess_constr_N | ( | ) | const |
Definition at line 338 of file dl-problem.cpp.
|
private |
Handle to the shared module defining the problem.
Definition at line 215 of file dl-problem.hpp.
|
private |
Problem instance created by the registration function, including the deleter to destroy it.
Definition at line 218 of file dl-problem.hpp.
|
private |
Pointer to the struct of function pointers for evaluating the objective, constraints, their gradients, etc.
Definition at line 221 of file dl-problem.hpp.
|
private |
Dictionary of extra functions that were registered by the problem.
Definition at line 223 of file dl-problem.hpp.