21 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR =
double>
25 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
42 void setProblem(std::shared_ptr<LQOCProblem_t> lqocProblem)
54 throw std::runtime_error(
"input box constraints are not available for this solver.");
60 throw std::runtime_error(
"state box constraints are not available for this solver.");
67 throw std::runtime_error(
"general constraints are not available for this solver.");
74 virtual void solve() = 0;
78 throw std::runtime_error(
"solveSingleStage not available for this solver.");
100 throw std::runtime_error(
"getSmallestEigenvalue not available for this solver.");
105 virtual void setProblemImpl(std::shared_ptr<LQOCProblem_t> lqocProblem) = 0;
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef LQOCProblem< STATE_DIM, CONTROL_DIM, SCALAR > LQOCProblem_t
Definition: LQOCSolver.hpp:27
const ct::core::ControlVectorArray< CONTROL_DIM, SCALAR > & getSolutionControl()
return solution for control
Definition: LQOCSolver.hpp:86
virtual const ct::core::ControlVectorArray< CONTROL_DIM, SCALAR > & get_lv()
return iLQR-style feedforward lv
Definition: LQOCSolver.hpp:95
virtual bool configureStateBoxConstraints(std::shared_ptr< LQOCProblem< STATE_DIM, CONTROL_DIM >> lqocProblem)
Definition: LQOCSolver.hpp:58
ct::core::FeedbackArray< STATE_DIM, CONTROL_DIM, SCALAR > L_
Definition: LQOCSolver.hpp:111
LQOCSolver(const std::shared_ptr< LQOCProblem_t > &lqocProblem=nullptr)
Definition: LQOCSolver.hpp:33
virtual bool configureGeneralConstraints(std::shared_ptr< LQOCProblem< STATE_DIM, CONTROL_DIM >> lqocProblem)
setup and configure the general (in)equality constraints
Definition: LQOCSolver.hpp:65
virtual void setProblemImpl(std::shared_ptr< LQOCProblem_t > lqocProblem)=0
virtual void solveSingleStage(int N)
Definition: LQOCSolver.hpp:76
virtual SCALAR getSmallestEigenvalue()
return the smallest eigenvalue
Definition: LQOCSolver.hpp:98
virtual void initializeAndAllocate()=0
a method reserved for memory allocation (e.g. required for HPIPM)
virtual void computeStatesAndControls()=0
extract the solution (can be overriden if additional extraction steps required in specific solver) ...
Settings for the NLOptCon algorithm.
Definition: NLOptConSettings.hpp:198
CppAD::AD< CppAD::cg::CG< double > > SCALAR
std::shared_ptr< LQOCProblem_t > lqocProblem_
Definition: LQOCSolver.hpp:107
virtual void computeFeedbackMatrices()=0
return TVLQR feedback matrices
Defines a Linear-Quadratic Optimal Control Problem, which is optionally constrained.
Definition: LQOCProblem.hpp:57
virtual void compute_lv()=0
compute iLQR-style lv
void setProblem(std::shared_ptr< LQOCProblem_t > lqocProblem)
Definition: LQOCSolver.hpp:42
const ct::core::FeedbackArray< STATE_DIM, CONTROL_DIM, SCALAR > & getSolutionFeedback()
Definition: LQOCSolver.hpp:90
virtual void configure(const NLOptConSettings &settings)=0
core::ControlVectorArray< CONTROL_DIM, SCALAR > u_sol_
Definition: LQOCSolver.hpp:110
virtual void solve()=0
solve the LQOC problem
ct::core::ControlVectorArray< CONTROL_DIM, SCALAR > lv_
Definition: LQOCSolver.hpp:112
virtual bool configureInputBoxConstraints(std::shared_ptr< LQOCProblem< STATE_DIM, CONTROL_DIM >> lqocProblem)
setup and configure the box constraints
Definition: LQOCSolver.hpp:52
const ct::core::StateVectorArray< STATE_DIM, SCALAR > & getSolutionState()
return solution for state
Definition: LQOCSolver.hpp:84
core::StateVectorArray< STATE_DIM, SCALAR > x_sol_
Definition: LQOCSolver.hpp:109
virtual ~LQOCSolver()=default
Definition: LQOCSolver.hpp:22