24 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename OPTCONPROBLEM,
typename SCALAR =
double>
28 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
37 typedef std::vector<StateVectorArrayPtr, Eigen::aligned_allocator<StateVectorArrayPtr>>
StateSubsteps;
42 typedef std::vector<ControlVectorArrayPtr, Eigen::aligned_allocator<ControlVectorArrayPtr>>
ControlSubsteps;
63 virtual void configure(
const settings_t& settings) {}
75 virtual void getAandB(
const state_vector_t&
x,
76 const control_vector_t&
u,
77 const state_vector_t& x_next,
81 state_control_matrix_t& B,
82 const size_t threadId) = 0;
95 const control_vector_t& control,
96 state_vector_t& stateNext,
97 const size_t threadId) = 0;
107 virtual void getSubstates(StateVectorArrayPtr& subStepsX,
const size_t threadId) {}
108 virtual void getSubcontrols(ControlVectorArrayPtr& subStepsU,
const size_t threadId) {}
110 const ControlSubstepsPtr& uSubsteps,
111 const size_t threadId){};
118 std::vector<typename optConProblem_t::DynamicsPtr_t>
systems_;
122 std::vector<ConstantControllerPtr, Eigen::aligned_allocator<ConstantControllerPtr>>
virtual void changeNumStages(const int numStages)
set the number of stages/time steps
Definition: OptconSystemInterface.h:100
std::vector< ConstantControllerPtr, Eigen::aligned_allocator< ConstantControllerPtr > > controller_
Definition: OptconSystemInterface.h:123
std::vector< typename optConProblem_t::DynamicsPtr_t > systems_
Definition: OptconSystemInterface.h:111
std::shared_ptr< constant_controller_t > ConstantControllerPtr
Definition: OptconSystemInterface.h:46
std::vector< StateVectorArrayPtr, Eigen::aligned_allocator< StateVectorArrayPtr > > StateSubsteps
Definition: OptconSystemInterface.h:37
virtual void getAandB(const state_vector_t &x, const control_vector_t &u, const state_vector_t &x_next, const int n, size_t subSteps, state_matrix_t &A, state_control_matrix_t &B, const size_t threadId)=0
retrieve discrete-time linear system matrices A and B.
std::vector< typename optConProblem_t::LinearPtr_t > linearSystems_
Definition: OptconSystemInterface.h:119
ct::core::StateMatrix< STATE_DIM, SCALAR > state_matrix_t
Definition: OptconSystemInterface.h:32
virtual void changeNonlinearSystem(const typename optConProblem_t::DynamicsPtr_t &dyn)=0
ct::core::ControlVector< control_dim > u
Definition: LoadFromFileTest.cpp:21
settings_t settings_
instance of the optconProblem
Definition: OptconSystemInterface.h:127
std::shared_ptr< StateVectorArray > StateVectorArrayPtr
Definition: OptconSystemInterface.h:36
virtual void changeLinearSystem(const typename optConProblem_t::LinearPtr_t &lin)=0
OPTCONPROBLEM optConProblem_t
Definition: OptconSystemInterface.h:48
ct::core::ConstantController< STATE_DIM, CONTROL_DIM, SCALAR > constant_controller_t
Definition: OptconSystemInterface.h:45
interface base class for optimal control algorithms
Definition: OptconSystemInterface.h:25
std::vector< typename optConProblem_t::LinearPtr_t > & getLinearSystemsInstances()
Definition: OptconSystemInterface.h:103
std::vector< ControlVectorArrayPtr, Eigen::aligned_allocator< ControlVectorArrayPtr > > ControlSubsteps
Definition: OptconSystemInterface.h:42
Settings for the NLOptCon algorithm.
Definition: NLOptConSettings.hpp:198
NLOptConSettings settings_t
Definition: OptconSystemInterface.h:49
ct::core::StateVectorArray< STATE_DIM, SCALAR > StateVectorArray
Definition: OptconSystemInterface.h:35
virtual void getSubstates(StateVectorArrayPtr &subStepsX, const size_t threadId)
Definition: OptconSystemInterface.h:107
const optConProblem_t & getOptConProblem()
Definition: OptconSystemInterface.h:101
virtual void initialize()
perform any required setup work
Definition: OptconSystemInterface.h:62
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef ct::core::ControlVector< CONTROL_DIM, SCALAR > control_vector_t
Definition: OptconSystemInterface.h:30
optConProblem_t optConProblem_
the constant controller for forward-integration during one time-step
Definition: OptconSystemInterface.h:125
ct::core::StateVector< state_dim > x
Definition: LoadFromFileTest.cpp:20
std::shared_ptr< LINEAR_SYSTEM_T > LinearPtr_t
Definition: OptConProblemBase.h:51
OptconSystemInterface(const optConProblem_t &problem, const settings_t &settings)
constructor
Definition: OptconSystemInterface.h:52
virtual void getSubcontrols(ControlVectorArrayPtr &subStepsU, const size_t threadId)
Definition: OptconSystemInterface.h:108
ct::core::ControlVectorArray< CONTROL_DIM, SCALAR > ControlVectorArray
Definition: OptconSystemInterface.h:40
virtual void setSubstepTrajectoryReference(const StateSubstepsPtr &xSubsteps, const ControlSubstepsPtr &uSubsteps, const size_t threadId)
Definition: OptconSystemInterface.h:109
std::vector< typename optConProblem_t::DynamicsPtr_t > & getNonlinearSystemsInstances()
Definition: OptconSystemInterface.h:102
std::shared_ptr< ControlVectorArray > ControlVectorArrayPtr
Definition: OptconSystemInterface.h:41
std::shared_ptr< ControlSubsteps > ControlSubstepsPtr
Definition: OptconSystemInterface.h:43
virtual void configure(const settings_t &settings)
Definition: OptconSystemInterface.h:63
virtual void propagateControlledDynamics(const state_vector_t &state, const time_t n, const control_vector_t &control, state_vector_t &stateNext, const size_t threadId)=0
propagate discrete-time dynamics
ct::core::StateControlMatrix< STATE_DIM, CONTROL_DIM, SCALAR > state_control_matrix_t
Definition: OptconSystemInterface.h:33
std::shared_ptr< StateSubsteps > StateSubstepsPtr
Definition: OptconSystemInterface.h:38
ct::core::StateVector< STATE_DIM, SCALAR > state_vector_t
Definition: OptconSystemInterface.h:31
std::shared_ptr< SYSTEM_T > DynamicsPtr_t
Definition: OptConProblemBase.h:50