- 3.0.2 optimal control module.
|
interface base class for optimal control algorithms More...
#include <OptconSystemInterface.h>
Public Member Functions | |
OptconSystemInterface (const optConProblem_t &problem, const settings_t &settings) | |
constructor More... | |
virtual void | initialize () |
perform any required setup work More... | |
virtual void | configure (const settings_t &settings) |
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. More... | |
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 More... | |
virtual void | changeNumStages (const int numStages) |
set the number of stages/time steps More... | |
const optConProblem_t & | getOptConProblem () |
std::vector< typename optConProblem_t::DynamicsPtr_t > & | getNonlinearSystemsInstances () |
std::vector< typename optConProblem_t::LinearPtr_t > & | getLinearSystemsInstances () |
virtual void | changeNonlinearSystem (const typename optConProblem_t::DynamicsPtr_t &dyn)=0 |
virtual void | changeLinearSystem (const typename optConProblem_t::LinearPtr_t &lin)=0 |
virtual void | getSubstates (StateVectorArrayPtr &subStepsX, const size_t threadId) |
virtual void | getSubcontrols (ControlVectorArrayPtr &subStepsU, const size_t threadId) |
virtual void | setSubstepTrajectoryReference (const StateSubstepsPtr &xSubsteps, const ControlSubstepsPtr &uSubsteps, const size_t threadId) |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef ct::core::ControlVector< CONTROL_DIM, SCALAR > | control_vector_t |
Protected Attributes | |
std::vector< typename optConProblem_t::DynamicsPtr_t > | systems_ |
std::vector< typename optConProblem_t::LinearPtr_t > | linearSystems_ |
std::vector< ConstantControllerPtr, Eigen::aligned_allocator< ConstantControllerPtr > > | controller_ |
optConProblem_t | optConProblem_ |
the constant controller for forward-integration during one time-step More... | |
settings_t | settings_ |
instance of the optconProblem More... | |
interface base class for optimal control algorithms
Defines the unified interface for optimal control solvers. It bundles the optimal control problem with required tools to propagate the system dynamics and provide corresponding sensitivities.
STATE_DIM | size of state vector |
CONTROL_DIM | size of input vector |
OPTCONPROBLEM | type of the optConProblem (continuous or discrete) |
SCALAR | the underlying scalar type |
typedef ct::core::StateVector<STATE_DIM, SCALAR> ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::state_vector_t |
typedef ct::core::StateMatrix<STATE_DIM, SCALAR> ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::state_matrix_t |
typedef ct::core::StateControlMatrix<STATE_DIM, CONTROL_DIM, SCALAR> ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::state_control_matrix_t |
typedef ct::core::StateVectorArray<STATE_DIM, SCALAR> ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::StateVectorArray |
typedef std::shared_ptr<StateVectorArray> ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::StateVectorArrayPtr |
typedef std::vector<StateVectorArrayPtr, Eigen::aligned_allocator<StateVectorArrayPtr> > ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::StateSubsteps |
typedef std::shared_ptr<StateSubsteps> ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::StateSubstepsPtr |
typedef ct::core::ControlVectorArray<CONTROL_DIM, SCALAR> ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::ControlVectorArray |
typedef std::shared_ptr<ControlVectorArray> ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::ControlVectorArrayPtr |
typedef std::vector<ControlVectorArrayPtr, Eigen::aligned_allocator<ControlVectorArrayPtr> > ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::ControlSubsteps |
typedef std::shared_ptr<ControlSubsteps> ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::ControlSubstepsPtr |
typedef ct::core::ConstantController<STATE_DIM, CONTROL_DIM, SCALAR> ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::constant_controller_t |
typedef std::shared_ptr<constant_controller_t> ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::ConstantControllerPtr |
typedef OPTCONPROBLEM ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::optConProblem_t |
typedef NLOptConSettings ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::settings_t |
|
inline |
constructor
|
inlinevirtual |
perform any required setup work
Reimplemented in ct::optcon::OptconContinuousSystemInterface< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR >, and ct::optcon::OptconDiscreteSystemInterface< STATE_DIM, CONTROL_DIM, SCALAR >.
|
inlinevirtual |
|
pure virtual |
retrieve discrete-time linear system matrices A and B.
x | the state setpoint |
u | the control setpoint |
x_next | the next state |
n | the time setpoint |
subSteps | number of substeps of trajectory for which to get the sensitivity for |
A | the resulting linear system matrix A |
B | the resulting linear system matrix B |
threadId | which thread specific instantiations to use |
|
pure virtual |
propagate discrete-time dynamics
state | start state to propagate from |
n | discrete time index to propagate the dynamics at |
control | the control input to apply. This is a constant control input applied during the discretization interval |
stateNext | the resulting propagated state |
threadId | which thread specific instantiations to use |
|
inlinevirtual |
set the number of stages/time steps
Reimplemented in ct::optcon::OptconContinuousSystemInterface< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR >.
|
inline |
|
inline |
|
inline |
|
pure virtual |
|
pure virtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef ct::core::ControlVector<CONTROL_DIM, SCALAR> ct::optcon::OptconSystemInterface< STATE_DIM, CONTROL_DIM, OPTCONPROBLEM, SCALAR >::control_vector_t |
|
protected |
of the following objects, we have nThreads+1 instantiations in form of a vector. Every instantiation is dedicated to a certain thread in the multi-thread implementation
|
protected |
|
protected |
|
protected |
the constant controller for forward-integration during one time-step
|
protected |
instance of the optconProblem