All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tnlp.hxx File Reference
#include <boost/shared_ptr.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/size.hpp>
#include <boost/mpl/vector.hpp>
#include <roboptim/core/plugin/ipopt/ipopt-td.hh>
#include <roboptim/core/plugin/ipopt/ipopt-sparse.hh>
#include <roboptim/core/debug.hh>
#include <roboptim/core/result.hh>
#include <coin/IpIpoptCalculatedQuantities.hpp>
#include <coin/IpIpoptData.hpp>
#include <coin/IpOrigIpoptNLP.hpp>
#include <coin/IpTNLPAdapter.hpp>

Namespaces

namespace  roboptim
 Meta-functions, functions and solvers related classes.
 
namespace  roboptim::detail
 

Macros

#define FILL_RESULT()
 
#define SWITCH_ERROR(NAME, ERROR)
 
#define SWITCH_WARNING(NAME, WARNING)
 
#define MAP_IPOPT_ERRORS(MACRO)
 
#define MAP_IPOPT_WARNINGS(MACRO)
 

Functions

template<typename T , typename F >
void roboptim::detail::IpoptCheckGradient (const F &, unsigned, const Eigen::Map< const Function::vector_t > &, int, T &)
 
template<typename T >
void roboptim::detail::fillMultipliers (Function::vector_t &multipliers, const Function::value_type *z_L, const Function::value_type *z_U, const Function::value_type *lambda, Function::size_type n, Function::size_type m, const Solver< T > &solver)
 ROBOPTIM_CORE_IPOPT_PLUGIN_CHECK_GRADIENT. More...
 
void roboptim::detail::jacobianFromGradients (DerivableFunction::matrix_t &jac, const IpoptSolver::problem_t::constraints_t &c, const DerivableFunction::vector_t &x)
 
template<typename T >
Tnlp< T >::size_type roboptim::detail::computeConstraintsOutputSize (const T &solver)
 

Macro Definition Documentation

#define FILL_RESULT ( )
Value:
res.x = Eigen::Map<const Function::argument_t> (x, n); \
res.constraints = Eigen::Map<const Function::vector_t> (g, m); \
res.constraint_violation = ip_cq->unscaled_curr_nlp_constraint_violation \
(Ipopt::NORM_MAX); \
res.lambda = Eigen::Map<const Function::vector_t> (lambda, m); \
fillMultipliers (res.lambda, z_L, z_U, lambda, n, m, solver_); \
res.value (0) = obj_value

Referenced by roboptim::detail::Tnlp< T >::finalize_solution().

#define MAP_IPOPT_ERRORS (   MACRO)
Value:
MACRO(MAXITER_EXCEEDED, "Max iteration exceeded"); \
MACRO(STOP_AT_TINY_STEP, \
"Algorithm proceeds with very little progress"); \
MACRO(LOCAL_INFEASIBILITY, \
"Algorithm converged to a point of local infeasibility"); \
MACRO(DIVERGING_ITERATES, "Iterate diverges"); \
MACRO(RESTORATION_FAILURE, "Restoration phase failed"); \
MACRO(ERROR_IN_STEP_COMPUTATION, \
"Unrecoverable error while Ipopt tried to compute" \
" the search direction"); \
MACRO(INVALID_NUMBER_DETECTED, \
"Ipopt received an invalid number"); \
MACRO(INTERNAL_ERROR, "Unknown internal error"); \
MACRO(TOO_FEW_DEGREES_OF_FREEDOM, "Two few degrees of freedom"); \
MACRO(INVALID_OPTION, "Invalid option"); \
MACRO(OUT_OF_MEMORY, "Out of memory"); \
MACRO(CPUTIME_EXCEEDED, "CPU time exceeded")

Referenced by roboptim::detail::Tnlp< T >::finalize_solution().

#define MAP_IPOPT_WARNINGS (   MACRO)
Value:
MACRO(USER_REQUESTED_STOP, "User-requested stop"); \
MACRO(STOP_AT_ACCEPTABLE_POINT, "Acceptable point")

Referenced by roboptim::detail::Tnlp< T >::finalize_solution().

#define SWITCH_ERROR (   NAME,
  ERROR 
)
Value:
case NAME: \
{ \
Result res (n, 1); \
FILL_RESULT (); \
solver_.result_ = SolverError (ERROR, res); \
} \
break

Referenced by roboptim::detail::Tnlp< T >::finalize_solution().

#define SWITCH_WARNING (   NAME,
  WARNING 
)
Value:
case NAME: \
{ \
Result res (n, 1); \
FILL_RESULT (); \
res.warnings.push_back (SolverWarning (WARNING)); \
solver_.result_ = res; \
} \
break

Referenced by roboptim::detail::Tnlp< T >::finalize_solution().