MyTMINLP.hpp

Go to the documentation of this file.
00001 // (C) Copyright Carnegie Mellon University 2006
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // Authors :
00006 // P. Bonami, Carnegie Mellon University
00007 //
00008 // Date :  03/17/2006
00009 #ifndef MyTNLP_HPP
00010 #define MyTNLP_HPP
00011 #include "TMINLP.hpp"
00012 using namespace  Ipopt;
00027 class MyTMINLP : public TMINLP
00028 {
00029 public:
00031   MyTMINLP(){}
00032   
00034   virtual ~MyTMINLP(){}
00035 
00036   
00038   MyTMINLP(const MyTMINLP &){}
00040   //MyTMINLP& operator=(const MyTMINLP&) {}
00041 
00042   
00049   virtual bool get_var_types(Index n, VariableType* var_types);
00050  
00055   virtual bool get_constraints_types(Index m, ConstraintType* const_types);
00057     
00070   virtual bool get_nlp_info(Index& n, Index&m, Index& nnz_jac_g,
00071                             Index& nnz_h_lag, TNLP::IndexStyleEnum& index_style);
00072   
00081   virtual bool get_bounds_info(Index n, Number* x_l, Number* x_u,
00082                                Index m, Number* g_l, Number* g_u);
00083   
00091   virtual bool get_starting_point(Index n, bool init_x, Number* x,
00092                                   bool init_z, Number* z_L, Number* z_U,
00093                                   Index m, bool init_lambda,
00094                                   Number* lambda);
00095   
00103   virtual bool eval_f(Index n, const Number* x, bool new_x, Number& obj_value);
00104 
00112   virtual bool eval_grad_f(Index n, const Number* x, bool new_x, Number* grad_f);
00113 
00123   virtual bool eval_g(Index n, const Number* x, bool new_x, Index m, Number* g);
00124 
00136   virtual bool eval_jac_g(Index n, const Number* x, bool new_x,
00137                           Index m, Index nele_jac, Index* iRow, Index *jCol,
00138                           Number* values);
00139   
00151   virtual bool eval_h(Index n, const Number* x, bool new_x,
00152                       Number obj_factor, Index m, const Number* lambda,
00153                       bool new_lambda, Index nele_hess, Index* iRow,
00154                       Index* jCol, Number* values);
00155 
00156   
00158   virtual void finalize_solution(SolverReturn status,
00159                                  Index n, const Number* x, Number obj_value) const;
00160   
00162 
00163   virtual const SosInfo * sosConstraints() const{return NULL;}
00164   virtual const BranchingInfo* branchingInfo() const{return NULL;}
00165 };
00166 
00167 #endif

Generated on Fri May 16 21:06:01 2008 for Bonmin by  doxygen 1.4.7