|
| DmsProblem (DmsSettings settings, std::vector< typename OptConProblem_t::DynamicsPtr_t > systemPtrs, std::vector< typename OptConProblem_t::LinearPtr_t > linearPtrs, std::vector< typename OptConProblem_t::CostFunctionPtr_t > costPtrs, std::vector< typename OptConProblem_t::ConstraintPtr_t > inputBoxConstraints, std::vector< typename OptConProblem_t::ConstraintPtr_t > stateBoxConstraints, std::vector< typename OptConProblem_t::ConstraintPtr_t > generalConstraints, const state_vector_t &x0) |
| Custom constructor, sets up the objects needed for the Dms algorithm depending on the settings. More...
|
|
| ~DmsProblem () override=default |
| Destructor. More...
|
|
void | updateProblem () override |
| { This method gets called at each update of the Optimization variables. This can be used to distribute or rearrange the optimization variables appropriately } More...
|
|
void | configure (const DmsSettings &settings) |
| Updates the settings. More...
|
|
const state_vector_array_t & | getStateSolution () |
| Retrieves the solution state trajectory at every shot. More...
|
|
const control_vector_array_t & | getInputSolution () |
| Retrieves the solution control trajectory at every shot. More...
|
|
const time_array_t & | getTimeSolution () |
| Retrieves the solution time trajectory at every shot. More...
|
|
const state_vector_array_t & | getStateTrajectory () |
| Retrieves a dense state solution trajectory. More...
|
|
const control_vector_array_t & | getInputTrajectory () |
| Retrieves a dense input solution trajectory. More...
|
|
const time_array_t & | getTimeArray () |
| Retrieves a dense time solution trajectory. More...
|
|
void | setInitialGuess (const state_vector_array_t &x_init_guess, const control_vector_array_t &u_init_guess, const time_array_t &t_init_guess=time_array_t(0.0)) |
| Sets the initial guess of the optimization. More...
|
|
const core::Time | getTimeHorizon () const |
| Return the timehorizon of the problem. More...
|
|
void | changeTimeHorizon (const SCALAR tf) |
| Updates the timehorizon. More...
|
|
void | changeInitialState (const state_vector_t &x0) |
| Updates the initial state. More...
|
|
void | printSolution () |
| Prints the solution trajectories. More...
|
|
| Nlp ()=default |
| Default constructor. More...
|
|
virtual | ~Nlp ()=default |
| Destructor. More...
|
|
SCALAR | evaluateCostFun () |
| { Evaluates the costfunction at the current nlp iteration } More...
|
|
void | evaluateCostGradient (const size_t n, MapVecXs &grad) |
| { Evaluates the gradient of the costfunction} More...
|
|
void | evaluateConstraints (MapVecXs &values) |
| { Evaluates the constraints } More...
|
|
void | evaluateConstraintJacobian (const int nele_jac, MapVecXs &jac) |
| { Evaluates the constraint jacobian } More...
|
|
void | evaluateHessian (const int nele_hes, MapVecXs &hes, const SCALAR obj_fac, MapConstVecXs &lambda) |
| Evaluates the hessian of the lagrangian. More...
|
|
void | getSparsityPatternJacobian (const int nele_jac, MapVecXi &iRow, MapVecXi &jCol) const |
| Gets the sparsity pattern. More...
|
|
void | getSparsityPatternHessian (const int nele_hes, MapVecXi &iRow, MapVecXi &jCol) const |
| Gets the sparsity pattern of the Hessian of the Lagrangian. More...
|
|
size_t | getConstraintsCount () const |
| Returns the number of constraints in the NLP. More...
|
|
size_t | getNonZeroJacobianCount () const |
| Returns the number of the non zero elements of the constraint jacobian. More...
|
|
size_t | getNonZeroHessianCount () |
| Returns the number of non zeros in the Hessian. More...
|
|
void | getConstraintBounds (MapVecXs &lowerBound, MapVecXs &upperBound, const size_t m) const |
| Reads the bounds of the constraints. More...
|
|
size_t | getVarCount () const |
| Returns the number of Optimization optimization variables. More...
|
|
void | getVariableBounds (MapVecXs &lowerBound, MapVecXs &upperBound, const size_t n) const |
| Reads the bounds on the Optimization optimization variables. More...
|
|
void | extractOptimizationVars (const MapConstVecXs &x, bool isNew) |
| {Extracts the Optimization optimization variables from the nlp solvers between nlp iterations} More...
|
|
void | getInitialGuess (const size_t n, MapVecXs &x) const |
| Gets the Optimization variables. More...
|
|
void | getOptimizationMultState (const size_t n, MapVecXs &xMul, MapVecXi &xState) const |
| Gets the variable multiplier and the variable state, used in the NLP solver SNOPT. See the snopt documentation for further explanations. More...
|
|
void | getConstraintsMultState (const size_t m, MapVecXs &zMul, MapVecXi &zState) const |
| Gets the constraint multiplier and state, used in the NLP solver SNOPT. More...
|
|
void | getBoundMultipliers (size_t n, MapVecXs &zLow, MapVecXs &zUp) const |
| Gets the bound multipliers used in the NLP solver IPOPT. More...
|
|
void | getLambdaVars (size_t m, MapVecXs &lambda) const |
| Gets the values of the constraint multipliers. More...
|
|
void | extractIpoptSolution (const MapConstVecXs &x, const MapConstVecXs &zL, const MapConstVecXs &zU, const MapConstVecXs &lambda) |
| { Extracts the solution values from IPOPT } More...
|
|
void | extractSnoptSolution (const MapVecXs &x, const MapVecXs &xMul, const MapVecXi &xState, const MapVecXs &fMul, const MapVecXi &fState) |
| { Extracts the solution values from SNOPT } More...
|
|
template<size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
class ct::optcon::DmsProblem< STATE_DIM, CONTROL_DIM, SCALAR >
This class sets up the DMS problem.