All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
roboptim::detail::Tnlp< T > Class Template Reference

#include <tnlp.hh>

Inheritance diagram for roboptim::detail::Tnlp< T >:

Public Types

typedef T solver_t
 
typedef SolverState< typename
solver_t::problem_t > 
solverState_t
 
typedef Function::size_type size_type
 

Public Member Functions

 Tnlp (const typename solver_t::problem_t &pb, solver_t &solver)
 
size_type constraintsOutputSize ()
 
virtual bool get_nlp_info (Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, TNLP::IndexStyleEnum &index_style)
 
virtual bool get_bounds_info (Index n, Number *x_l, Number *x_u, Index m, Number *g_l, Number *g_u)
 
virtual bool get_scaling_parameters (Number &, bool &use_x_scaling, Index n, Number *x_scaling, bool &use_g_scaling, Index m, Number *g_scaling)
 
virtual bool get_variables_linearity (Index n, LinearityType *var_types)
 
virtual bool get_constraints_linearity (Index m, LinearityType *const_types)
 
virtual bool get_starting_point (Index n, bool init_x, Number *x, bool init_z, Number *z_L, Number *z_U, Index m, bool init_lambda, Number *)
 
virtual bool get_warm_start_iterate (Ipopt::IteratesVector &)
 
virtual bool eval_f (Index n, const Number *x, bool new_x, Number &obj_value)
 
virtual bool eval_grad_f (Index n, const Number *x, bool new_x, Number *grad_f)
 
virtual bool eval_g (Index n, const Number *x, bool new_x, Index m, Number *g)
 
virtual bool eval_jac_g (Index n, const Number *x, bool new_x, Index m, Index, Index *iRow, Index *jCol, Number *values)
 
virtual bool eval_h (Index n, const Number *x, bool, Number obj_factor, Index m, const Number *lambda, bool, Index nele_hess, Index *iRow, Index *jCol, Number *values)
 
virtual void finalize_solution (Ipopt::SolverReturn status, Index n, const Number *x, const Number *, const Number *, Index m, const Number *g, const Number *lambda, Number obj_value, const Ipopt::IpoptData *, Ipopt::IpoptCalculatedQuantities *)
 
virtual bool intermediate_callback (Ipopt::AlgorithmMode, Index, Number, Number, Number, Number, Number, Number, Number, Number, Index, const Ipopt::IpoptData *, Ipopt::IpoptCalculatedQuantities *)
 
virtual Index get_number_of_nonlinear_variables ()
 
virtual bool get_list_of_nonlinear_variables (Index, Index *)
 
template<>
bool get_nlp_info (Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, TNLP::IndexStyleEnum &index_style)
 
template<>
bool eval_jac_g (Index n, const Number *x, bool, Index ROBOPTIM_DEBUG_ONLY(m), Index nele_jac, Index *iRow, Index *jCol, Number *values)
 
template<>
bool get_nlp_info (Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, TNLP::IndexStyleEnum &index_style)
 
template<>
bool eval_jac_g (Index n, const Number *x, bool, Index m, Index nele_jac, Index *iRow, Index *jCol, Number *values)
 
template<>
bool eval_h (Index n, const Number *x, bool, Number obj_factor, Index ROBOPTIM_DEBUG_ONLY(m), const Number *lambda, bool, Index ROBOPTIM_DEBUG_ONLY(nele_hess), Index *iRow, Index *jCol, Number *values)
 

Protected Member Functions

void compute_hessian (TwiceDifferentiableFunction::hessian_t &h, const typename solver_t::vector_t &x, Number obj_factor, const Number *lambda)
 
template<>
void compute_hessian (TwiceDifferentiableFunction::hessian_t &h, const solver_t::vector_t &x, Number obj_factor, const Number *lambda)
 

Static Protected Attributes

static log4cxx::LoggerPtr logger
 Pointer to function logger (see log4cxx documentation). More...
 

Member Typedef Documentation

template<typename T>
typedef Function::size_type roboptim::detail::Tnlp< T >::size_type
template<typename T>
typedef T roboptim::detail::Tnlp< T >::solver_t
template<typename T>
typedef SolverState<typename solver_t::problem_t> roboptim::detail::Tnlp< T >::solverState_t

Constructor & Destructor Documentation

template<typename T >
roboptim::detail::Tnlp< T >::Tnlp ( const typename solver_t::problem_t &  pb,
solver_t solver 
)

Member Function Documentation

template<typename T>
void roboptim::detail::Tnlp< T >::compute_hessian ( TwiceDifferentiableFunction::hessian_t &  h,
const typename solver_t::vector_t &  x,
Number  obj_factor,
const Number lambda 
)
protected
template<>
void roboptim::detail::Tnlp< IpoptSolverTd >::compute_hessian ( TwiceDifferentiableFunction::hessian_t &  h,
const solver_t::vector_t &  x,
Number  obj_factor,
const Number lambda 
)
inlineprotected
template<typename T >
Tnlp< T >::size_type roboptim::detail::Tnlp< T >::constraintsOutputSize ( )
template<typename T >
bool roboptim::detail::Tnlp< T >::eval_f ( Index  n,
const Number x,
bool  new_x,
Number obj_value 
)
virtual
template<typename T >
bool roboptim::detail::Tnlp< T >::eval_g ( Index  n,
const Number x,
bool  new_x,
Index  m,
Number g 
)
virtual
template<typename T >
bool roboptim::detail::Tnlp< T >::eval_grad_f ( Index  n,
const Number x,
bool  new_x,
Number grad_f 
)
virtual
template<typename T >
bool roboptim::detail::Tnlp< T >::eval_h ( Index  n,
const Number x,
bool  ,
Number  obj_factor,
Index  m,
const Number lambda,
bool  ,
Index  nele_hess,
Index iRow,
Index jCol,
Number values 
)
virtual
template<>
bool roboptim::detail::Tnlp< IpoptSolverTd >::eval_h ( Index  n,
const Number x,
bool  ,
Number  obj_factor,
Index   ROBOPTIM_DEBUG_ONLYm,
const Number lambda,
bool  ,
Index   ROBOPTIM_DEBUG_ONLYnele_hess,
Index iRow,
Index jCol,
Number values 
)
inline
template<>
bool roboptim::detail::Tnlp< IpoptSolverSparse >::eval_jac_g ( Index  n,
const Number x,
bool  ,
Index   ROBOPTIM_DEBUG_ONLYm,
Index  nele_jac,
Index iRow,
Index jCol,
Number values 
)
template<typename T >
bool roboptim::detail::Tnlp< T >::eval_jac_g ( Index  n,
const Number x,
bool  new_x,
Index  m,
Index  ,
Index iRow,
Index jCol,
Number values 
)
virtual
template<>
bool roboptim::detail::Tnlp< IpoptSolverSparse >::eval_jac_g ( Index  n,
const Number x,
bool  ,
Index  m,
Index  nele_jac,
Index iRow,
Index jCol,
Number values 
)
template<typename T>
void roboptim::detail::Tnlp< T >::finalize_solution ( Ipopt::SolverReturn  status,
Index  n,
const Number x,
const Number ,
const Number ,
Index  m,
const Number g,
const Number lambda,
Number  obj_value,
const Ipopt::IpoptData *  ,
Ipopt::IpoptCalculatedQuantities *   
)
virtual
template<typename T>
bool roboptim::detail::Tnlp< T >::get_bounds_info ( Index  n,
Number x_l,
Number x_u,
Index  m,
Number g_l,
Number g_u 
)
virtual
template<typename T>
bool roboptim::detail::Tnlp< T >::get_constraints_linearity ( Index  m,
LinearityType *  const_types 
)
virtual
template<typename T >
bool roboptim::detail::Tnlp< T >::get_list_of_nonlinear_variables ( Index  ,
Index  
)
virtual
template<>
bool roboptim::detail::Tnlp< IpoptSolverSparse >::get_nlp_info ( Index n,
Index m,
Index nnz_jac_g,
Index nnz_h_lag,
TNLP::IndexStyleEnum &  index_style 
)
template<typename T >
bool roboptim::detail::Tnlp< T >::get_nlp_info ( Index n,
Index m,
Index nnz_jac_g,
Index nnz_h_lag,
TNLP::IndexStyleEnum &  index_style 
)
virtual
template<>
bool roboptim::detail::Tnlp< IpoptSolverSparse >::get_nlp_info ( Index n,
Index m,
Index nnz_jac_g,
Index nnz_h_lag,
TNLP::IndexStyleEnum &  index_style 
)
template<typename T >
Index roboptim::detail::Tnlp< T >::get_number_of_nonlinear_variables ( )
virtual
template<typename T>
bool roboptim::detail::Tnlp< T >::get_scaling_parameters ( Number ,
bool &  use_x_scaling,
Index  n,
Number x_scaling,
bool &  use_g_scaling,
Index  m,
Number g_scaling 
)
virtual
template<typename T>
bool roboptim::detail::Tnlp< T >::get_starting_point ( Index  n,
bool  init_x,
Number x,
bool  init_z,
Number z_L,
Number z_U,
Index  m,
bool  init_lambda,
Number  
)
virtual
template<typename T >
bool roboptim::detail::Tnlp< T >::get_variables_linearity ( Index  n,
LinearityType *  var_types 
)
virtual
template<typename T>
bool roboptim::detail::Tnlp< T >::get_warm_start_iterate ( Ipopt::IteratesVector &  )
virtual
template<typename T>
bool roboptim::detail::Tnlp< T >::intermediate_callback ( Ipopt::AlgorithmMode  ,
Index  ,
Number  ,
Number  ,
Number  ,
Number  ,
Number  ,
Number  ,
Number  ,
Number  ,
Index  ,
const Ipopt::IpoptData *  ,
Ipopt::IpoptCalculatedQuantities *   
)
virtual

Member Data Documentation

template<typename T>
log4cxx::LoggerPtr roboptim::detail::Tnlp< T >::logger
staticprotected

Pointer to function logger (see log4cxx documentation).