36 template <
size_t STATE_DIM,
size_t CONTROL_DIM,
typename SCALAR =
double>
40 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
129 void setInitGuess(
const state_vector_t&
x0,
const state_vector_t& x_f,
const control_vector_t& u0);
137 void setInitGuess(
const state_vector_array_t& x_init,
const control_vector_array_t& u_init);
167 const size_t numPairs_;
169 std::map<size_t, size_t> pairNumToStateIdx_;
170 std::map<size_t, size_t> pairNumToControlIdx_;
172 state_vector_array_t stateSolution_;
173 control_vector_array_t inputSolution_;
size_t getStateIndex(const size_t pairNum) const
Returns the starting index for the state at shot pairNum inside the optimization vector.
Definition: OptVectorDms-impl.h:66
const control_vector_array_t & getOptimizedInputs()
Returns the optimized control inputs for all shots.
Definition: OptVectorDms-impl.h:56
state_vector_t getOptimizedState(const size_t pairNum) const
Returns the optimized state for a specific shot.
Definition: OptVectorDms-impl.h:29
size_t getControlIndex(const size_t pairNum) const
Returns the starting index for the control input at shot pairNum inside the optimization vector...
Definition: OptVectorDms-impl.h:73
control_vector_t getOptimizedControl(const size_t pairNum) const
Returns the optimized control input for a specific shot.
Definition: OptVectorDms-impl.h:37
void changeDesiredState(const state_vector_t &xF)
Updates the final state.
Definition: OptVectorDms-impl.h:86
This class is a wrapper around the NLP Optvector. It wraps the Vectors from the NLP solvers into stat...
Definition: OptVectorDms.h:37
void printoutSolution()
Prints out the solution trajectories.
Definition: OptVectorDms-impl.h:142
void changeInitialState(const state_vector_t &x0)
Updates the initial state.
Definition: OptVectorDms-impl.h:79
const state_vector_array_t & getOptimizedStates()
Returns the optimized state for all shots.
Definition: OptVectorDms-impl.h:45
DIMENSIONS::control_vector_array_t control_vector_array_t
Definition: OptVectorDms.h:48
~OptVectorDms() override=default
Destructor.
DIMENSIONS::state_vector_array_t state_vector_array_t
Definition: OptVectorDms.h:47
Defines basic types used in the DMS algorithm.
Definition: DmsDimensions.h:18
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef DmsDimensions< STATE_DIM, CONTROL_DIM, SCALAR > DIMENSIONS
Definition: OptVectorDms.h:42
DIMENSIONS::control_matrix_t control_matrix_t
Definition: OptVectorDms.h:49
void setInitGuess(const state_vector_t &x0, const state_vector_t &x_f, const control_vector_t &u0)
Sets an initial guess for the optimal solution. The optimal solution is set as a linear interpolation...
Definition: OptVectorDms-impl.h:93
Class containing and managing all the optimization variables used for in the NLP solver IPOPT and SNO...
Definition: OptVector.h:21
Defines the DMS settings.
Definition: DmsSettings.h:23
DIMENSIONS::time_array_t time_array_t
Definition: OptVectorDms.h:50
tpl::OptVector< SCALAR > Base
Definition: OptVectorDms.h:43
StateVector< state_dim > x0
Definition: ConstrainedNLOCTest.cpp:14
DIMENSIONS::state_vector_t state_vector_t
Definition: OptVectorDms.h:45
DIMENSIONS::control_vector_t control_vector_t
Definition: OptVectorDms.h:46
size_t numPairs()
Returns the number of pairs.
Definition: OptVectorDms.h:158
OptVectorDms(size_t n, const DmsSettings &settings)
Custom constructor.
Definition: OptVectorDms-impl.h:10