34 template <
size_t STATE_DIM,
37 typename LINEAR_SYSTEM_T,
38 typename LINEARIZER_T,
43 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
52 typedef std::shared_ptr<optcon::CostFunctionQuadratic<STATE_DIM, CONTROL_DIM, SCALAR>>
CostFunctionPtr_t;
53 typedef std::shared_ptr<optcon::LinearConstraintContainer<STATE_DIM, CONTROL_DIM, SCALAR>>
ConstraintPtr_t;
54 typedef typename SYSTEM_T::time_t
time_t;
67 OptConProblemBase(DynamicsPtr_t nonlinDynamics, CostFunctionPtr_t costFunction, LinearPtr_t linearSystem =
nullptr);
78 const state_vector_t&
x0,
79 DynamicsPtr_t nonlinDynamics,
80 CostFunctionPtr_t costFunction,
81 LinearPtr_t linearSystem =
nullptr);
97 CostFunctionPtr_t costFunction,
98 ConstraintPtr_t inputBoxConstraints,
99 ConstraintPtr_t stateBoxConstraints,
100 ConstraintPtr_t generalConstraints,
101 LinearPtr_t linearSystem =
nullptr);
119 const state_vector_t&
x0,
120 DynamicsPtr_t nonlinDynamics,
121 CostFunctionPtr_t costFunction,
122 ConstraintPtr_t inputBoxConstraints,
123 ConstraintPtr_t stateBoxConstraints,
124 ConstraintPtr_t generalConstraints,
125 LinearPtr_t linearSystem =
nullptr);
227 DynamicsPtr_t controlledSystem_;
228 CostFunctionPtr_t costFunction_;
229 LinearPtr_t linearizedSystem_;
236 ConstraintPtr_t inputBoxConstraints_;
243 ConstraintPtr_t stateBoxConstraints_;
250 ConstraintPtr_t generalConstraints_;
void setInputBoxConstraints(const ConstraintPtr_t constraint)
Definition: OptConProblemBase-impl.h:211
ct::core::StateVector< STATE_DIM, SCALAR > state_vector_t
Definition: OptConProblemBase.h:49
const LinearPtr_t getLinearSystem() const
Definition: OptConProblemBase-impl.h:151
const ConstraintPtr_t getInputBoxConstraints() const
Retrieve the input box constraints.
Definition: OptConProblemBase-impl.h:255
void setStateBoxConstraints(const ConstraintPtr_t constraint)
Definition: OptConProblemBase-impl.h:225
const DynamicsPtr_t getNonlinearSystem() const
Definition: OptConProblemBase-impl.h:138
const state_vector_t getInitialState() const
Definition: OptConProblemBase-impl.h:297
std::shared_ptr< optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR > > CostFunctionPtr_t
Definition: OptConProblemBase.h:52
void setLinearSystem(const LinearPtr_t lin)
Definition: OptConProblemBase-impl.h:187
void setNonlinearSystem(const DynamicsPtr_t dyn)
Definition: OptConProblemBase-impl.h:175
const CostFunctionPtr_t getCostFunction() const
Definition: OptConProblemBase-impl.h:164
void setCostFunction(const CostFunctionPtr_t cost)
Definition: OptConProblemBase-impl.h:199
std::shared_ptr< optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR > > ConstraintPtr_t
Definition: OptConProblemBase.h:53
CppAD::AD< CppAD::cg::CG< double > > SCALAR
OptConProblemBase()=default
void setInitialState(const state_vector_t &x0)
Definition: OptConProblemBase-impl.h:308
SYSTEM_T::time_t time_t
Definition: OptConProblemBase.h:54
time_t getTimeHorizon() const
Definition: OptConProblemBase-impl.h:321
std::shared_ptr< LINEAR_SYSTEM_T > LinearPtr_t
Definition: OptConProblemBase.h:51
const ConstraintPtr_t getGeneralConstraints() const
Retrieves the general constraints.
Definition: OptConProblemBase-impl.h:283
const ConstraintPtr_t getStateBoxConstraints() const
Retrieve the state box constraints.
Definition: OptConProblemBase-impl.h:269
static const size_t CONTROL_D
Definition: OptConProblemBase.h:46
void setGeneralConstraints(const ConstraintPtr_t constraint)
Definition: OptConProblemBase-impl.h:239
void setTimeHorizon(const time_t tf)
Definition: OptConProblemBase-impl.h:332
StateVector< state_dim > x0
Definition: ConstrainedNLOCTest.cpp:14
Definition: OptConProblemBase.h:40
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW const size_t STATE_D
Definition: OptConProblemBase.h:45
void verify() const
check if all the ingredients for an unconstrained optimal control problem are there ...
Definition: OptConProblemBase-impl.h:110
std::shared_ptr< SYSTEM_T > DynamicsPtr_t
Definition: OptConProblemBase.h:50