25 #ifndef __MYADOLCNLP_HPP__ 26 #define __MYADOLCNLP_HPP__ 35 using namespace Ipopt;
49 virtual bool get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,
50 Index& nnz_h_lag, IndexStyleEnum& index_style);
53 virtual bool get_bounds_info(Index n, Number* x_l, Number* x_u,
54 Index m, Number* g_l, Number* g_u);
57 virtual bool get_starting_point(Index n,
bool init_x, Number* x,
58 bool init_z, Number* z_L, Number* z_U,
59 Index m,
bool init_lambda,
63 template<
class T>
bool eval_obj(Index n,
const T *x, T& obj_value);
67 template<
class T>
bool eval_constraints(Index n,
const T *x, Index m, T *g);
71 virtual bool eval_f(Index n,
const Number* x,
bool new_x, Number& obj_value);
75 virtual bool eval_grad_f(Index n,
const Number* x,
bool new_x, Number* grad_f);
79 virtual bool eval_g(Index n,
const Number* x,
bool new_x, Index m, Number* g);
86 virtual bool eval_jac_g(Index n,
const Number* x,
bool new_x,
87 Index m, Index nele_jac, Index* iRow, Index *jCol,
95 virtual bool eval_h(Index n,
const Number* x,
bool new_x,
96 Number obj_factor, Index m,
const Number* lambda,
97 bool new_lambda, Index nele_hess, Index* iRow,
98 Index* jCol, Number* values);
105 virtual void finalize_solution(SolverReturn status,
106 Index n,
const Number* x,
const Number* z_L,
const Number* z_U,
107 Index m,
const Number* g,
const Number* lambda,
109 const IpoptData* ip_data,
110 IpoptCalculatedQuantities* ip_cq);
116 virtual void generate_tapes(Index n, Index m);