#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 function_name 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.
Definition at line 239 of file dl-problem.hpp.
Collaboration diagram for DLControlProblem: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 242 of file dl-problem.hpp.
| using instance_t = ExtraFuncs::instance_t |
Definition at line 322 of file dl-problem.hpp.
| DLControlProblem | ( | const std::filesystem::path & | so_filename, |
| const std::string & | function_name = "register_alpaqa_control_problem", |
||
| alpaqa_register_arg_t | user_param = {} |
||
| ) |
Load a problem from a shared library.
| so_filename | Filename of the shared library to load. |
| function_name | Name of the problem registration function. Should have signature alpaqa_control_problem_register_t(alpaqa_register_arg_t user_param). |
| user_param | Pointer to custom user data to pass to the registration function. |
Definition at line 367 of file dl-problem.cpp.
|
inline |
Definition at line 268 of file dl-problem.hpp.
|
inline |
Definition at line 269 of file dl-problem.hpp.
|
inline |
Definition at line 270 of file dl-problem.hpp.
|
inline |
Definition at line 271 of file dl-problem.hpp.
|
inline |
Definition at line 272 of file dl-problem.hpp.
|
inline |
Definition at line 273 of file dl-problem.hpp.
|
inline |
Definition at line 274 of file dl-problem.hpp.
|
inline |
Definition at line 276 of file dl-problem.hpp.
Definition at line 415 of file dl-problem.cpp.
Definition at line 416 of file dl-problem.cpp.
Definition at line 417 of file dl-problem.cpp.
Definition at line 418 of file dl-problem.cpp.
Definition at line 419 of file dl-problem.cpp.
Definition at line 420 of file dl-problem.cpp.
Definition at line 421 of file dl-problem.cpp.
Definition at line 422 of file dl-problem.cpp.
Definition at line 423 of file dl-problem.cpp.
Definition at line 424 of file dl-problem.cpp.
Definition at line 425 of file dl-problem.cpp.
Definition at line 426 of file dl-problem.cpp.
Definition at line 428 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 430 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 431 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 432 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 433 of file dl-problem.cpp.
| auto get_R_work_size | ( | ) | const |
Definition at line 434 of file dl-problem.cpp.
| auto get_S_work_size | ( | ) | const |
Definition at line 435 of file dl-problem.cpp.
Definition at line 436 of file dl-problem.cpp.
Definition at line 437 of file dl-problem.cpp.
Definition at line 438 of file dl-problem.cpp.
Definition at line 439 of file dl-problem.cpp.
Definition at line 440 of file dl-problem.cpp.
Definition at line 441 of file dl-problem.cpp.
| bool provides_get_D | ( | ) | const |
Definition at line 443 of file dl-problem.cpp.
| bool provides_get_D_N | ( | ) | const |
Definition at line 444 of file dl-problem.cpp.
| bool provides_eval_add_Q_N | ( | ) | const |
Definition at line 445 of file dl-problem.cpp.
| bool provides_eval_add_R_prod_masked | ( | ) | const |
Definition at line 446 of file dl-problem.cpp.
| bool provides_eval_add_S_prod_masked | ( | ) | const |
Definition at line 447 of file dl-problem.cpp.
| bool provides_get_R_work_size | ( | ) | const |
Definition at line 448 of file dl-problem.cpp.
| bool provides_get_S_work_size | ( | ) | const |
Definition at line 449 of file dl-problem.cpp.
| bool provides_eval_constr | ( | ) | const |
Definition at line 450 of file dl-problem.cpp.
| bool provides_eval_constr_N | ( | ) | const |
Definition at line 451 of file dl-problem.cpp.
| bool provides_eval_grad_constr_prod | ( | ) | const |
Definition at line 452 of file dl-problem.cpp.
| bool provides_eval_grad_constr_prod_N | ( | ) | const |
Definition at line 453 of file dl-problem.cpp.
| bool provides_eval_add_gn_hess_constr | ( | ) | const |
Definition at line 454 of file dl-problem.cpp.
| bool provides_eval_add_gn_hess_constr_N | ( | ) | const |
Definition at line 455 of file dl-problem.cpp.
|
private |
Handle to the shared module defining the problem.
Definition at line 257 of file dl-problem.hpp.
|
private |
Problem instance created by the registration function, including the deleter to destroy it.
Definition at line 260 of file dl-problem.hpp.
|
private |
Pointer to the struct of function pointers for evaluating the objective, constraints, their gradients, etc.
Definition at line 263 of file dl-problem.hpp.
|
private |
Dictionary of extra functions that were registered by the problem.
Definition at line 265 of file dl-problem.hpp.