00001 /* $Id: BonCouenneInterface.hpp 154 2009-06-16 18:52:53Z pbelotti $ */ 00002 // (C) Copyright International Business Machines Corporation (IBM) 2006-09 00003 // All Rights Reserved. 00004 // This code is published under the Common Public License. 00005 // 00006 // Authors : 00007 // Pietro Belotti, Carnegie Mellon University 00008 // Pierre Bonami, International Business Machines Corporation 00009 // 00010 // Date : 12/19/2006 00011 00012 #ifndef CouenneInterface_H 00013 #define CouenneInterface_H 00014 00015 #include "CouenneCutGenerator.hpp" 00016 00017 #ifdef COIN_HAS_ASL 00018 #include "BonAmplInterface.hpp" 00019 00020 struct ASL; 00021 struct ASL *readASLfg (char **); 00022 #else 00023 #define AmplInterface OsiTMINLPInterface 00024 #endif 00025 00026 namespace Bonmin { 00027 class CouenneInterface : public AmplInterface 00028 { 00029 public: 00031 CouenneInterface(); 00032 00034 CouenneInterface(const CouenneInterface &other); 00035 00037 virtual CouenneInterface * clone(bool CopyData); 00038 00040 virtual ~CouenneInterface(); 00041 00042 // My name is Couenne [ku:en] 00043 virtual std::string appName() {return "couenne";} 00044 00045 #ifdef COIN_HAS_ASL 00046 00047 virtual void readAmplNlFile(char **& argv, Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions, 00048 Ipopt::SmartPtr<Ipopt::OptionsList> options, 00049 Ipopt::SmartPtr<Ipopt::Journalist> journalist); 00050 #endif 00051 00058 virtual void extractLinearRelaxation 00059 (OsiSolverInterface &si, CouenneCutGenerator & couenneCg, bool getObj = 1, bool solveNlp = 1); 00060 00061 00063 virtual void setAppDefaultOptions(Ipopt::SmartPtr<Ipopt::OptionsList> Options); 00064 00066 bool haveNlpSolution () 00067 {return have_nlp_solution_;} 00068 00069 protected: 00070 00072 bool have_nlp_solution_; 00073 }; 00074 00075 } 00076 #endif