19 template <
typename t_Scalar,
int... t_Parameters>
27 template <
typename t_Type>
29 const typename std::enable_if<t_Type::IsVectorAtCompileTime, ReturnStatus>::type;
30 template <
typename t_Type>
32 const typename std::enable_if<t_Type::ColsAtCompileTime != 1, ReturnStatus>::type;
36 using MatrixConstRef =
const Eigen::Ref<const Eigen::Matrix<t_Scalar, Eigen::Dynamic, Eigen::Dynamic>>;
37 using VectorConstRef =
const Eigen::Ref<const Eigen::Matrix<t_Scalar, Eigen::Dynamic, 1>>;
49 template <
class t_primal,
class... t_Args>
52 return (
solve1(primal, std::forward<t_Args>(args)...));
55 template <
class... t_Args>
58 return (
solve1(primal, std::forward<t_Args>(args)...));
63 template <
class t_primal,
class t_H,
class... t_Args>
66 return (
solve2(primal, H, std::forward<t_Args>(args)...));
69 template <
class t_primal,
class... t_Args>
72 return (
solve2(primal, H, std::forward<t_Args>(args)...));
77 template <
class t_primal,
class t_H,
class t_h,
class... t_Args>
80 return (
solve3(primal, H, h, std::forward<t_Args>(args)...));
83 template <
class t_primal,
class t_H,
class... t_Args>
86 return (
solve3(primal, H, h, std::forward<t_Args>(args)...));
91 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class... t_Args>
94 return (
solve4(primal, H, h, lb, std::forward<t_Args>(args)...));
97 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class... t_Args>
100 return (
solve4(primal, H, h, lb, std::forward<t_Args>(args)...));
103 template <
class t_primal,
class t_H,
class t_h,
class t_A,
class... t_Args>
113 std::forward<t_Args>(args)...));
116 template <
class t_primal,
class t_H,
class t_h,
class... t_Args>
126 std::forward<t_Args>(args)...));
131 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub>
138 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub,
class... t_Args>
147 return (
solve5(primal, H, h, lb, ub, std::forward<t_Args>(args)...));
150 template <
class t_primal,
class t_H,
class t_h,
class t_lb>
157 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class... t_Args>
160 return (
solve5(primal, H, h, lb, ub, std::forward<t_Args>(args)...));
165 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub>
186 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub,
class t_A,
class... t_Args>
196 return (
solve6(primal, H, h, lb, ub, A, std::forward<t_Args>(args)...));
199 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub,
class... t_Args>
209 return (
solve6(primal, H, h, lb, ub, A, std::forward<t_Args>(args)...));
214 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub,
class t_A,
class t_Alb>
227 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub,
class t_A,
class t_Alb,
class... t_Args>
238 return (
solve7(primal, H, h, lb, ub, A, Alb, std::forward<t_Args>(args)...));
241 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub,
class t_A>
254 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub,
class t_A,
class... t_Args>
265 return (
solve7(primal, H, h, lb, ub, A, Alb, std::forward<t_Args>(args)...));
270 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub,
class t_A,
class t_Alb,
class t_Aub>
305 return (
solve8(primal, H, h, lb, ub, A, Alb, Aub, std::forward<t_Args>(args)...));
308 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub,
class t_A,
class t_Alb>
322 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub,
class t_A,
class t_Alb,
class... t_Args>
334 return (
solve8(primal, H, h, lb, ub, A, Alb, Aub, std::forward<t_Args>(args)...));
339 template <
class t_primal,
class t_H,
class t_h,
class t_lb,
class t_ub,
class t_A,
class t_Alb,
class t_Aub>
365 "Vector of lower simple bounds has wrong size (1).");
367 ub.rows() == this->num_simple_bounds_,
"Vector of upper simple bounds has wrong size (1).");
371 "Vector of lower simple bounds has wrong size (2).");
374 "Vector of upper simple bounds has wrong size (2).");
380 (A.cols() == this->primal_size_) || ((0 == this->num_general_constraints_) && (0 == A.cols())),
381 "Matrix of general constraints has wrong size.");
384 Alb.rows() == this->num_general_constraints_,
385 "Vector of lower bounds of general constraints has wrong size (1).");
387 Aub.rows() == this->num_general_constraints_,
388 "Vector of upper bounds of general constraints has wrong size (1).");
392 "Vector of lower bounds of general constraints has wrong size (2).");
395 "Vector of upper bounds of general constraints has wrong size (2).");
397 return (this->
solveGeneric(primal, H, h, lb, ub, A, Alb, Aub, param));
422 template <
class... t_Args>
425 return (
solve0(std::forward<t_Args>(args)...));
ReturnStatus solveGeneric(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, const t_A &A, const t_Alb &Alb, const t_Aub &Aub, const SolverParameters ¶m)
MatrixIndex num_general_constraints_
MatrixIndex num_simple_bounds_
Eigen::Ref< Eigen::Matrix< t_Scalar, Eigen::Dynamic, Eigen::Dynamic > > MatrixRef
Eigen::Ref< Eigen::Matrix< t_Scalar, Eigen::Dynamic, 1 > > VectorRef
VectorEnablerReturnType< t_Alb > solve6(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, const t_A &A, const t_Alb &Alb)
const struct qpmad::SolverTemplate::InputPlaceholders input_placeholders_
ReturnStatus solve6(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, const t_A &A, VectorConstRef Alb, t_Args &&...args)
VectorEnablerReturnType< t_Alb > solve6(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, const t_A &A, const t_Alb &Alb, t_Args &&...args)
MatrixEnablerReturnType< t_A > solve5(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, const t_A &A, t_Args &&...args)
ReturnStatus solve3(t_primal &primal, t_H &H, const t_h &h, MatrixConstRef A, t_Args &&...args)
VectorEnablerReturnType< t_Aub > solve7(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, const t_A &A, const t_Alb &Alb, const t_Aub &Aub, t_Args &&...args)
VectorEnablerReturnType< t_ub > solve4(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, t_Args &&...args)
ReturnStatus solve2(t_primal &primal, t_H &H, VectorConstRef h, t_Args &&...args)
ReturnStatus solve3(t_primal &primal, t_H &H, const t_h &h, VectorConstRef lb, t_Args &&...args)
VectorEnablerReturnType< t_h > solve2(t_primal &primal, t_H &H, const t_h &h, t_Args &&...args)
const Eigen::Ref< const Eigen::Matrix< t_Scalar, Eigen::Dynamic, 1 > > VectorConstRef
VectorEnablerReturnType< t_ub > solve4(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub)
ReturnStatus solve5(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, MatrixConstRef A, t_Args &&...args)
const typename std::enable_if< t_Type::ColsAtCompileTime !=1, ReturnStatus >::type MatrixEnablerReturnType
ReturnStatus solve7(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, const t_A &A, const t_Alb &Alb, VectorConstRef Aub, t_Args &&...args)
VectorEnablerReturnType< t_lb > solve3(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, t_Args &&...args)
ReturnStatus solve4(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, VectorConstRef ub, t_Args &&...args)
ReturnStatus solve7(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, const t_A &A, const t_Alb &Alb, VectorConstRef Aub)
VectorEnablerReturnType< t_primal > solve0(t_primal &primal, t_Args &&...args)
ReturnStatus solve1(t_primal &primal, MatrixRef H, t_Args &&...args)
ReturnStatus solve5(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, const SolverParameters ¶m)
ReturnStatus solve8(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, const t_A &A, const t_Alb &Alb, const t_Aub &Aub, const SolverParameters ¶m)
ReturnStatus solve(t_Args &&...args)
Solve QP.
MatrixEnablerReturnType< t_H > solve1(t_primal &primal, t_H &H, t_Args &&...args)
ReturnStatus solve4(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, VectorConstRef ub)
VectorEnablerReturnType< t_Aub > solve7(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, const t_A &A, const t_Alb &Alb, const t_Aub &Aub)
const typename std::enable_if< t_Type::IsVectorAtCompileTime, ReturnStatus >::type VectorEnablerReturnType
MatrixEnablerReturnType< t_A > solve3(t_primal &primal, t_H &H, const t_h &h, const t_A &A, t_Args &&...args)
const Eigen::Ref< const Eigen::Matrix< t_Scalar, Eigen::Dynamic, Eigen::Dynamic > > MatrixConstRef
ReturnStatus solve6(t_primal &primal, t_H &H, const t_h &h, const t_lb &lb, const t_ub &ub, const t_A &A, VectorConstRef Alb)
ReturnStatus solve0(VectorRef primal, t_Args &&...args)
#define QPMAD_UTILS_PERSISTENT_ASSERT(condition,...)