DART  6.7.3
dart::optimizer::DartTNLP Class Reference

class DartTNLP More...

#include <IpoptSolver.hpp>

Inheritance diagram for dart::optimizer::DartTNLP:

Public Member Functions

virtual ~DartTNLP ()
 
bool get_nlp_info (Ipopt::Index &n, Ipopt::Index &m, Ipopt::Index &nnz_jac_g, Ipopt::Index &nnz_h_lag, Ipopt::TNLP::IndexStyleEnum &index_style) override
 Method to return some info about the nlp. More...
 
bool get_bounds_info (Ipopt::Index n, Ipopt::Number *x_l, Ipopt::Number *x_u, Ipopt::Index m, Ipopt::Number *g_l, Ipopt::Number *g_u) override
 Method to return the bounds for my problem. More...
 
bool get_starting_point (Ipopt::Index n, bool init_x, Ipopt::Number *x, bool init_z, Ipopt::Number *z_L, Ipopt::Number *z_U, Ipopt::Index m, bool init_lambda, Ipopt::Number *lambda) override
 Method to return the starting point for the algorithm. More...
 
bool eval_f (Ipopt::Index _n, const Ipopt::Number *_x, bool _new_x, Ipopt::Number &_obj_value) override
 Method to return the objective value. More...
 
bool eval_grad_f (Ipopt::Index _n, const Ipopt::Number *_x, bool _new_x, Ipopt::Number *_grad_f) override
 Method to return the gradient of the objective. More...
 
bool eval_g (Ipopt::Index _n, const Ipopt::Number *_x, bool _new_x, Ipopt::Index _m, Ipopt::Number *_g) override
 Method to return the constraint residuals. More...
 
bool eval_jac_g (Ipopt::Index _n, const Ipopt::Number *_x, bool _new_x, Ipopt::Index _m, Ipopt::Index _nele_jac, Ipopt::Index *_iRow, Ipopt::Index *_jCol, Ipopt::Number *_values) override
 Method to return: 1) The structure of the jacobian (if "values" is nullptr) 2) The values of the jacobian (if "values" is not nullptr) More...
 
bool eval_h (Ipopt::Index _n, const Ipopt::Number *_x, bool _new_x, Ipopt::Number _obj_factor, Ipopt::Index _m, const Ipopt::Number *_lambda, bool _new_lambda, Ipopt::Index _nele_hess, Ipopt::Index *_iRow, Ipopt::Index *_jCol, Ipopt::Number *_values) override
 Method to return: 1) The structure of the hessian of the lagrangian (if "values" is nullptr) 2) The values of the hessian of the lagrangian (if "values" is not nullptr) More...
 
void finalize_solution (Ipopt::SolverReturn _status, Ipopt::Index _n, const Ipopt::Number *_x, const Ipopt::Number *_z_L, const Ipopt::Number *_z_U, Ipopt::Index _m, const Ipopt::Number *_g, const Ipopt::Number *_lambda, Ipopt::Number _obj_value, const Ipopt::IpoptData *_ip_data, Ipopt::IpoptCalculatedQuantities *_ip_cq) override
 This method is called when the algorithm is complete so the TNLP can store/write the solution. More...
 

Private Member Functions

 DartTNLP (IpoptSolver *_solver)
 

Private Attributes

IpoptSolvermSolver
 DART optimization problem. More...
 
Ipopt::Number mObjValue
 Objective value. More...
 
Eigen::VectorXd mObjGradient
 Objective gradient. More...
 
Eigen::MatrixXd mObjHessian
 Objective Hessian. More...
 

Friends

class IpoptSolver
 

Detailed Description

class DartTNLP

Constructor & Destructor Documentation

◆ ~DartTNLP()

dart::optimizer::DartTNLP::~DartTNLP ( )
virtual

◆ DartTNLP()

dart::optimizer::DartTNLP::DartTNLP ( IpoptSolver _solver)
explicitprivate

Member Function Documentation

◆ eval_f()

bool dart::optimizer::DartTNLP::eval_f ( Ipopt::Index  _n,
const Ipopt::Number *  _x,
bool  _new_x,
Ipopt::Number &  _obj_value 
)
override

Method to return the objective value.

◆ eval_g()

bool dart::optimizer::DartTNLP::eval_g ( Ipopt::Index  _n,
const Ipopt::Number *  _x,
bool  _new_x,
Ipopt::Index  _m,
Ipopt::Number *  _g 
)
override

Method to return the constraint residuals.

◆ eval_grad_f()

bool dart::optimizer::DartTNLP::eval_grad_f ( Ipopt::Index  _n,
const Ipopt::Number *  _x,
bool  _new_x,
Ipopt::Number *  _grad_f 
)
override

Method to return the gradient of the objective.

◆ eval_h()

bool dart::optimizer::DartTNLP::eval_h ( Ipopt::Index  _n,
const Ipopt::Number *  _x,
bool  _new_x,
Ipopt::Number  _obj_factor,
Ipopt::Index  _m,
const Ipopt::Number *  _lambda,
bool  _new_lambda,
Ipopt::Index  _nele_hess,
Ipopt::Index *  _iRow,
Ipopt::Index *  _jCol,
Ipopt::Number *  _values 
)
override

Method to return: 1) The structure of the hessian of the lagrangian (if "values" is nullptr) 2) The values of the hessian of the lagrangian (if "values" is not nullptr)

◆ eval_jac_g()

bool dart::optimizer::DartTNLP::eval_jac_g ( Ipopt::Index  _n,
const Ipopt::Number *  _x,
bool  _new_x,
Ipopt::Index  _m,
Ipopt::Index  _nele_jac,
Ipopt::Index *  _iRow,
Ipopt::Index *  _jCol,
Ipopt::Number *  _values 
)
override

Method to return: 1) The structure of the jacobian (if "values" is nullptr) 2) The values of the jacobian (if "values" is not nullptr)

◆ finalize_solution()

void dart::optimizer::DartTNLP::finalize_solution ( Ipopt::SolverReturn  _status,
Ipopt::Index  _n,
const Ipopt::Number *  _x,
const Ipopt::Number *  _z_L,
const Ipopt::Number *  _z_U,
Ipopt::Index  _m,
const Ipopt::Number *  _g,
const Ipopt::Number *  _lambda,
Ipopt::Number  _obj_value,
const Ipopt::IpoptData *  _ip_data,
Ipopt::IpoptCalculatedQuantities *  _ip_cq 
)
override

This method is called when the algorithm is complete so the TNLP can store/write the solution.

◆ get_bounds_info()

bool dart::optimizer::DartTNLP::get_bounds_info ( Ipopt::Index  n,
Ipopt::Number *  x_l,
Ipopt::Number *  x_u,
Ipopt::Index  m,
Ipopt::Number *  g_l,
Ipopt::Number *  g_u 
)
override

Method to return the bounds for my problem.

◆ get_nlp_info()

bool dart::optimizer::DartTNLP::get_nlp_info ( Ipopt::Index &  n,
Ipopt::Index &  m,
Ipopt::Index &  nnz_jac_g,
Ipopt::Index &  nnz_h_lag,
Ipopt::TNLP::IndexStyleEnum &  index_style 
)
override

Method to return some info about the nlp.

◆ get_starting_point()

bool dart::optimizer::DartTNLP::get_starting_point ( Ipopt::Index  n,
bool  init_x,
Ipopt::Number *  x,
bool  init_z,
Ipopt::Number *  z_L,
Ipopt::Number *  z_U,
Ipopt::Index  m,
bool  init_lambda,
Ipopt::Number *  lambda 
)
override

Method to return the starting point for the algorithm.

Friends And Related Function Documentation

◆ IpoptSolver

friend class IpoptSolver
friend

Member Data Documentation

◆ mObjGradient

Eigen::VectorXd dart::optimizer::DartTNLP::mObjGradient
private

Objective gradient.

◆ mObjHessian

Eigen::MatrixXd dart::optimizer::DartTNLP::mObjHessian
private

Objective Hessian.

◆ mObjValue

Ipopt::Number dart::optimizer::DartTNLP::mObjValue
private

Objective value.

◆ mSolver

IpoptSolver* dart::optimizer::DartTNLP::mSolver
private

DART optimization problem.