31 std::vector<VectorXs>
xs;
33 std::vector<VectorXs>
us;
41 return this->gains_[i].col(0);
46 return this->gains_[i].col(0);
51 return this->gains_[i].rightCols(this->get_ndx1(i));
56 return this->gains_[i].rightCols(this->get_ndx1(i));
60 const std::size_t N =
us.size();
61 std::vector<MatrixXs> out;
63 for (std::size_t i = 0; i < N; i++) {
64 const Eigen::Index nu =
us[i].rows();
71 const std::size_t N =
us.size();
72 std::vector<VectorXs> out;
74 for (std::size_t i = 0; i < N; i++) {
75 const Eigen::Index nu =
us[i].rows();
85 Eigen::Index get_ndx1(std::size_t i)
const {
86 return this->gains_[i].cols() - 1;
90template <
typename Scalar>
92 return fmt::format(
"\n num_iters: {:d},"
94 "\n traj. cost: {:.3e},"
95 "\n merit.value: {:.3e},"
96 "\n prim_infeas: {:.3e},"
97 "\n dual_infeas: {:.3e},",
102template <
typename Scalar>
105 return oss <<
"Results {" << self.
printBase() <<
"\n}";
110#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
111#include "results-base.txx"
std::ostream & operator<<(std::ostream &oss, const ExplicitDynamicsDataTpl< S > &self)
std::vector< VectorXs > us
bool isInitialized() const
std::vector< VectorXs > getCtrlFeedforwards() const
std::string printBase() const
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
virtual ~ResultsBaseTpl()=default
decltype(auto) getFeedback(std::size_t i) const
Get expression of the primal-dual feedback gains.
decltype(auto) getFeedforward(std::size_t i)
Get column expression of the primal-dual feedforward gain.
std::vector< VectorXs > xs
std::vector< MatrixXs > gains_
std::vector< MatrixXs > getCtrlFeedbacks() const
decltype(auto) getFeedforward(std::size_t i) const
Get column expression of the primal-dual feedforward gain.
decltype(auto) getFeedback(std::size_t i)
Get expression of the primal-dual feedback gains.