All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ipopt-common.hxx File Reference
#include <stdexcept>
#include <string>
#include <boost/mpl/vector.hpp>
#include <coin/IpSmartPtr.hpp>
#include <coin/IpIpoptApplication.hpp>
#include <coin/IpoptConfig.h>
#include "roboptim/core/plugin/ipopt/ipopt-parameters-updater.hh"
#include "roboptim/core/plugin/ipopt/ipopt-common.hh"

Namespaces

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

Macros

#define IPOPT_DEFAULT_LINEAR_SOLVER   "mumps"
 
#define SWITCH_ERROR(NAME, ERROR)
 
#define SWITCH_FATAL(NAME, ERROR)
 
#define SWITCH_OK(NAME, CASES)
 
#define MAP_IPOPT_ERRORS(MACRO)
 
#define MAP_IPOPT_FATALS(MACRO)   MACRO(Ipopt::NonIpopt_Exception_Thrown, "Non-Ipopt exception thrown")
 
#define MAP_IPOPT_OKS(MACRO)
 
#define DEFINE_PARAMETER(KEY, DESCRIPTION, VALUE)
 

Macro Definition Documentation

#define DEFINE_PARAMETER (   KEY,
  DESCRIPTION,
  VALUE 
)
Value:
do { \
this->parameters_[KEY].description = DESCRIPTION; \
this->parameters_[KEY].value = VALUE; \
} while (0)
#define IPOPT_DEFAULT_LINEAR_SOLVER   "mumps"
#define MAP_IPOPT_ERRORS (   MACRO)
Value:
MACRO (Ipopt::Infeasible_Problem_Detected, \
"Infeasible problem detected"); \
MACRO (Ipopt::Search_Direction_Becomes_Too_Small, \
"Search direction too small"); \
MACRO (Ipopt::Diverging_Iterates, "Diverging iterates"); \
MACRO (Ipopt::Maximum_Iterations_Exceeded, \
"Maximum iterations exceeded"); \
MACRO (Ipopt::Restoration_Failed, "Restoration failed"); \
MACRO (Ipopt::Error_In_Step_Computation, "Error in step computation"); \
MACRO (Ipopt::Not_Enough_Degrees_Of_Freedom, \
"Not enough degrees of freedom"); \
MACRO (Ipopt::Invalid_Problem_Definition, \
"Invalid problem definition"); \
MACRO (Ipopt::Invalid_Option, "Invalid option"); \
MACRO (Ipopt::Invalid_Number_Detected, "Invalid number detected"); \
MACRO (Ipopt::Unrecoverable_Exception, "Unrecoverable exception"); \
MACRO (Ipopt::Insufficient_Memory, "Insufficient memory"); \
MACRO (Ipopt::Internal_Error, "Internal error"); \
MACRO (Ipopt::Maximum_CpuTime_Exceeded, "Maximum CPU time exceeded")

Referenced by roboptim::IpoptSolverCommon< T >::solve().

#define MAP_IPOPT_FATALS (   MACRO)    MACRO(Ipopt::NonIpopt_Exception_Thrown, "Non-Ipopt exception thrown")
#define MAP_IPOPT_OKS (   MACRO)
Value:
MACRO (Ipopt::Solve_Succeeded, MAP_IPOPT_ERRORS(SWITCH_ERROR); \
MAP_IPOPT_FATALS(SWITCH_FATAL)); \
MACRO (Ipopt::Solved_To_Acceptable_Level, MAP_IPOPT_ERRORS(SWITCH_ERROR); \
MAP_IPOPT_FATALS(SWITCH_FATAL)); \
MACRO (Ipopt::Feasible_Point_Found, MAP_IPOPT_ERRORS(SWITCH_ERROR); \
MAP_IPOPT_FATALS(SWITCH_FATAL)); \
MACRO (Ipopt::User_Requested_Stop, MAP_IPOPT_ERRORS(SWITCH_ERROR); \
MAP_IPOPT_FATALS(SWITCH_FATAL))

Referenced by roboptim::IpoptSolverCommon< T >::solve().

#define SWITCH_ERROR (   NAME,
  ERROR 
)
Value:
case NAME: \
break

Referenced by roboptim::IpoptSolverCommon< T >::solve().

#define SWITCH_FATAL (   NAME,
  ERROR 
)
Value:
case NAME: \
throw std::runtime_error (ERROR)

Referenced by roboptim::IpoptSolverCommon< T >::solve().

#define SWITCH_OK (   NAME,
  CASES 
)
Value:
case NAME: \
{ \
int status; \
if (solveCounter_ == 0) \
status = app_->OptimizeTNLP (nlp_); \
else \
status = app_->ReOptimizeTNLP (nlp_); \
solveCounter_++; \
switch (status) \
{ \
CASES; \
} \
} \
break

Referenced by roboptim::IpoptSolverCommon< T >::solve().