12 #include <boost/thread.hpp> 19 template<
int Max_Ineq_Rows,
int Max_Eq_Rows,
int Num_OptVars>
23 RtModel(YAML::Node params);
28 virtual void update(){}
31 template <
typename VecDer>
32 double inequalitySlack(Eigen::MatrixBase<VecDer>& dist);
33 template <
typename Mat>
34 void reduceColumns(Eigen::EigenBase<Mat>& mat)
const;
35 template<
int Max_Rows,
typename Mat_Type,
typename Vec_Type>
36 void appendRowsOfRank(
int rank_to_add,
const typename rt_solver::RtVector<Max_Rows>::i& ranks,
37 const Eigen::MatrixBase<Mat_Type>& subst_mat,
const Eigen::MatrixBase<Vec_Type>& subst_vec,
bool append_to_equalities,
int starting_column);
40 typename rt_solver::RtVector<Max_Eq_Rows>::d& nextEqCostVec() {
return next_eq_cost_vec_; }
41 typename rt_solver::RtVector<Max_Ineq_Rows>::d& nextIneqCostVec() {
return next_ineq_cost_vec_; }
42 typename rt_solver::RtMatrix<Max_Eq_Rows, Num_OptVars>::d& nextEqCostMat() {
return next_eq_cost_mat_; }
43 typename rt_solver::RtMatrix<Max_Ineq_Rows, Num_OptVars>::d& nextIneqCostMat() {
return next_ineq_cost_mat_; }
45 const typename rt_solver::RtVector<Max_Eq_Rows>::d& nextEqCostVec()
const {
return next_eq_cost_vec_; }
46 const typename rt_solver::RtVector<Max_Ineq_Rows>::d& nextIneqCostVec()
const {
return next_ineq_cost_vec_; }
47 const typename rt_solver::RtMatrix<Max_Eq_Rows, Num_OptVars>::d& nextEqCostMat()
const {
return next_eq_cost_mat_; }
48 const typename rt_solver::RtMatrix<Max_Ineq_Rows, Num_OptVars>::d& nextIneqCostMat()
const {
return next_ineq_cost_mat_; }
50 std::vector<rt_solver::RtHQPCost*>& subCostComposers() {
return sub_cost_composers_; }
55 bool checkIfHigherRanksLeft(
const int rank);
56 void checkSlacknessOfHierarchy(
const int rank);
61 std::vector<int>& hierarchiesWithoutSlacks() {
return hierarchies_without_slacks_; }
62 const std::vector<int>& hierarchiesWithoutSlacks()
const {
return hierarchies_without_slacks_; }
65 double n_solved_ranks_;
66 bool is_solution_valid_;
67 int num_variables_optimized_;
68 std::vector<double> qp_dur_, svd_wait_;
69 Eigen::Matrix<int, Num_OptVars, 1> full_to_opt_variable_index_;
73 std::vector<solver::Var> vars_;
74 std::vector<int> hierarchies_without_slacks_;
75 std::vector<std::tuple<int, solver::LinExpr>> leqcons_, lineqcons_;
77 std::vector<rt_solver::RtHQPCost*> sub_cost_composers_;
78 typename rt_solver::RtVector<Max_Eq_Rows>::d next_eq_cost_vec_;
79 typename rt_solver::RtVector<Max_Ineq_Rows>::d next_ineq_cost_vec_;
80 typename rt_solver::RtMatrix<Max_Eq_Rows, Num_OptVars>::d next_eq_cost_mat_;
81 typename rt_solver::RtMatrix<Max_Ineq_Rows, Num_OptVars>::d next_ineq_cost_mat_;
void addCostsToHierarchy(const int rank_to_add)
Definition: RtModel.h:250
Helper class to define an optimization variable, used in the construction of linear and quadratic exp...
Definition: Var.hpp:36
Helper class to ease the construction of a linear expression (e.g.
Definition: Exprs.hpp:19