DirectTrajectoryOptimization
v0.3
|
Class interfacing Ipopt NLP with a DirectTrajectoryOptimization problem. More...
#include <ipopt.hpp>
Public Member Functions | |
DTOIpoptInterface (std::shared_ptr< DTOMethodInterface< DIMENSIONS > > method, bool ipopt_verbose) | |
Create a new ipopt interface instance. More... | |
virtual void | InitializeSolver (const std::string &problemName, const std::string &outputFile, const std::string ¶mFile, const bool &computeJacobian) override |
DTO initializes the solver using this method. More... | |
virtual void | Solve (bool warminit=false) override |
DTO request the solver to proceed with the NLP. More... | |
virtual void | GetDTOSolution (state_vector_array_t &yTraj, control_vector_array_t &uTraj, Eigen::VectorXd &hTraj) override |
Method to get the current values of the solution. More... | |
virtual void | GetDTOSolution (state_vector_array_t &y_trajectory, control_vector_array_t &u_trajectory, Eigen::VectorXd &h_trajectory, std::vector< int > &phaseId) override |
Method to get the current values of the solution. More... | |
virtual void | GetFVector (Eigen::VectorXd &fVec) override |
Returns the vector of NLP-constraints. More... | |
virtual void | InitializeDecisionVariablesFromTrajectory (const state_vector_array_t &y_sol, const control_vector_array_t &u_sol, const Eigen::VectorXd &h_sol) override |
Initial solution point for the solver. More... | |
void | SetupSolverParameters () override |
Setting up solver parameters. More... | |
Public Member Functions inherited from DirectTrajectoryOptimization::DTOSolverInterface< DIMENSIONS > | |
virtual void | GetDTOSolution (state_vector_array_t &yTraj, state_vector_array_t &ydotTraj, control_vector_array_t &uTraj, Eigen::VectorXd &hTraj, std::vector< int > &phaseId) |
Method to get the current values of the solution. More... | |
virtual void | GetSolverSolutionVariables (Eigen::VectorXi &_x_state, Eigen::VectorXd &_x_mul, Eigen::VectorXi &_f_state, Eigen::VectorXd &_f_mul) |
Method to get final values of internal solver variables. More... | |
virtual void | WarmSolverInitialization (const Eigen::VectorXi &x_state, const Eigen::VectorXd &x_mul, const Eigen::VectorXi &f_state, const Eigen::VectorXd &f_mul) |
Warm Initialization of NLP Solver. More... | |
void | SetVerbosity (bool verb) |
Set verbosity of the solver. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from DirectTrajectoryOptimization::DTOSolverInterface< DIMENSIONS > | |
DTOSolverInterface () | |
Construct an instance of the DTOSolverInterface class. More... | |
Class interfacing Ipopt NLP with a DirectTrajectoryOptimization problem.
|
inline |
Create a new ipopt interface instance.
[in] | method | The method of direct transcription to employ - see enum for options. |
[in] | ipopt_verbose | The flag setting the verbosity |
|
overridevirtual |
Method to get the current values of the solution.
this point is not necessarily feasible or optimal
[out] | yTraj | The state space trajectory |
[out] | uTraj | The control trajectory |
[out] | hTraj | The time increments between the discretization points |
Implements DirectTrajectoryOptimization::DTOSolverInterface< DIMENSIONS >.
|
overridevirtual |
Method to get the current values of the solution.
overloaded to also return the phase ID for each node
[out] | yTraj | The state space trajectory |
[out] | uTraj | The control trajectory |
[out] | hTraj | The time increments between the discretization points |
[out] | phaseId | The vector of phases ID's of the corresponding nodes |
Implements DirectTrajectoryOptimization::DTOSolverInterface< DIMENSIONS >.
|
overridevirtual |
Returns the vector of NLP-constraints.
[out] | fVec | The vector of NLP-constraints |
Implements DirectTrajectoryOptimization::DTOSolverInterface< DIMENSIONS >.
|
overridevirtual |
Initial solution point for the solver.
Set the decision variables to the values given by a trajectory
[in] | y_sol | vector of states describing the trajectory |
[in] | u_sol | vector of controls describing the trajectory |
[in] | h_sol | vector of time increments between discretization points |
Implements DirectTrajectoryOptimization::DTOSolverInterface< DIMENSIONS >.
|
overridevirtual |
DTO initializes the solver using this method.
[in] | problemName | The name of the problem provided by user |
[in] | outputFile | The name of the outputfile provided by user |
[in] | paramFile | The name of the parameters file (solver dependent) |
[in] | computeJacobian | The flag to use solver numerical differentiation |
Implements DirectTrajectoryOptimization::DTOSolverInterface< DIMENSIONS >.
|
overridevirtual |
Setting up solver parameters.
set solver specific parameters
Implements DirectTrajectoryOptimization::DTOSolverInterface< DIMENSIONS >.
|
overridevirtual |
DTO request the solver to proceed with the NLP.
[in] | warminit | The flag indicating the type of optimization |
Implements DirectTrajectoryOptimization::DTOSolverInterface< DIMENSIONS >.