00001 // $Id: CouenneOSInterface.hpp 488 2011-01-10 17:06:41Z pbelotti $ 00002 // 00003 // (C) Copyright XXX 2009 00004 // All Rights Reserved. 00005 // This code is published under the Eclipse Public License (EPL). 00006 // 00007 // Authors : 00008 // Pietro Belotti, Lehigh University 00009 // Stefan Vigerske, Humboldt University 00010 // 00011 // Date : 07/18/2009 00012 00013 #ifndef COUENNEOSINTERFACE_HPP_ 00014 #define COUENNEOSINTERFACE_HPP_ 00015 00016 #include "CouenneUserInterface.hpp" 00017 #include "BonRegisteredOptions.hpp" 00018 00019 namespace Bonmin { 00020 class RegisteredOptions; 00021 class TMINLP; 00022 class Bab; 00023 } 00024 00025 namespace Ipopt { 00026 class OptionsList; 00027 class Journalist; 00028 } 00029 00030 using Ipopt::SmartPtr; 00031 00032 class OSInstance; 00033 00034 namespace Couenne { 00035 00036 class CouenneOSInterface : public CouenneUserInterface { 00037 private: 00038 CouenneProblem* problem; 00039 Ipopt::SmartPtr<Bonmin::TMINLP> tminlp; 00040 00041 OSInstance* osinstance; 00042 00043 public: 00044 static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions); 00045 00046 CouenneOSInterface(Ipopt::SmartPtr<Ipopt::OptionsList> options_, Ipopt::SmartPtr<Ipopt::Journalist> jnlst_) 00047 : CouenneUserInterface(options_, jnlst_), problem(NULL), osinstance(NULL) 00048 { } 00049 00050 ~CouenneOSInterface(); 00051 00052 CouenneProblem* getCouenneProblem(); 00053 00054 Ipopt::SmartPtr<Bonmin::TMINLP> getTMINLP(); 00055 00056 bool writeSolution(Bonmin::Bab& bab); 00057 }; 00058 00059 } 00060 00061 #endif