15namespace casadi_loader {
104 "Length of problem.U.lowerbound does not "
105 "match problem size problem.nu");
107 "Length of problem.U.upperbound does not "
108 "match problem size problem.nu");
110 "Length of problem.D.lowerbound does not "
111 "match problem size problem.nc");
113 "Length of problem.D.upperbound does not "
114 "match problem size problem.nc");
116 "Length of problem.D_N.lowerbound does "
117 "not match problem size problem.nc_N");
119 "Length of problem.D_N.upperbound does "
120 "not match problem size problem.nc_N");
122 throw std::invalid_argument(
"Invalid penalty_alm_split");
124 throw std::invalid_argument(
"Invalid penalty_alm_split_N");
138 e.segment(t *
nc,
nc) =
139 projecting_difference(z.segment(t *
nc,
nc),
D);
141 projecting_difference(z.segment(
N *
nc,
nc_N),
D_N);
148 return std::max(y,
y_lb);
153 return std::min(y,
y_ub);
157 auto &&
yt = y.segment(t *
nc,
nc);
#define BEGIN_ALPAQA_CASADI_LOADER_NAMESPACE
#define END_ALPAQA_CASADI_LOADER_NAMESPACE
#define CASADI_OCP_LOADER_EXPORT_EXTERN_TEMPLATE(strcls, name,...)
void eval_jac_f(index_t timestep, crvec x, crvec u, rmat J_fxu) const
CasADiControlProblem(const CasADiControlProblem &)
void 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
CasADiControlProblem & operator=(const CasADiControlProblem &)
void eval_add_gn_hess_constr_N(crvec x, crvec M, rmat out) const
length_t get_S_work_size() const
void eval_qr(index_t timestep, crvec xu, crvec h, rvec qr) const
index_t penalty_alm_split_N
Same as penalty_alm_split, but for the terminal constraint.
void eval_add_S_prod_masked(index_t timestep, crvec xu, crvec h, crindexvec mask_K, crvec v, rvec out, rvec work) const
void eval_constr_N(crvec x, rvec c) const
void load_numerical_data(const std::filesystem::path &filepath, char sep=',')
Load the numerical problem data (bounds and parameters) from a CSV file.
void eval_grad_constr_prod_N(crvec x, crvec p, rvec grad_cx_p) const
void eval_add_R_masked(index_t timestep, crvec xu, crvec h, crindexvec mask, rmat R, rvec work) const
real_t eval_l_N(crvec h) const
real_t eval_l(index_t timestep, crvec h) const
length_t get_nc_N() const
void eval_grad_f_prod(index_t timestep, crvec x, crvec u, crvec p, rvec grad_fxu_p) const
index_t penalty_alm_split
Components of the constraint function with indices below this number are handled using a quadratic pe...
void eval_add_gn_hess_constr(index_t timestep, crvec x, crvec M, rmat out) const
void eval_constr(index_t timestep, crvec x, rvec c) const
length_t get_nh_N() const
void eval_h(index_t timestep, crvec x, crvec u, rvec h) const
util::copyable_unique_ptr< Functions > impl
length_t get_R_work_size() const
void eval_add_S_masked(index_t timestep, crvec xu, crvec h, crindexvec mask, rmat S, rvec work) const
void get_x_init(rvec x_init) const
void eval_proj_multipliers(rvec y, real_t M) const
void eval_q_N(crvec x, crvec h, rvec q) const
void eval_add_Q_N(crvec x, crvec h, rmat Q) const
void eval_grad_constr_prod(index_t timestep, crvec x, crvec p, rvec grad_cx_p) const
void eval_add_Q(index_t timestep, crvec xu, crvec h, rmat Q) const
void eval_proj_diff_g(crvec z, rvec e) const
void eval_f(index_t timestep, crvec x, crvec u, rvec fxu) const
void eval_h_N(crvec x, rvec h) const
void get_D_N(Box &D_N) const
CasADiControlProblem(CasADiControlProblem &&) noexcept
#define USING_ALPAQA_CONFIG(Conf)
void check_dim_msg(const V &v, auto sz, std::string msg)
typename Conf::real_t real_t
typename Conf::index_t index_t
typename Conf::length_t length_t
typename Conf::crvec crvec
typename Conf::crindexvec crindexvec
Flags to be passed to dlopen.
Double-precision double configuration.