Bonmin  1.7
BonAmplInterface.hpp
Go to the documentation of this file.
00001 // (C) Copyright International Business Machines Corporation and
00002 // Carnegie Mellon University 2004, 2007
00003 //
00004 // All Rights Reserved.
00005 // This code is published under the Common Public License.
00006 //
00007 // Authors :
00008 // Pierre Bonami, Carnegie Mellon University,
00009 // Andreas Waechter, International Business Machines Corporation
00010 //
00011 // Date : 12/01/2004
00012 
00013 #ifndef BonminAmplInterface_H
00014 #define BonminAmplInterface_H
00015 #include "BonOsiTMINLPInterface.hpp"
00016 #include "BonAmplTMINLP.hpp"
00017 
00018 class BM_lp;
00019 namespace Bonmin
00020 {
00022   class AmplInterface: public OsiTMINLPInterface
00023   {
00024   public:
00027     AmplInterface();
00030     virtual void readAmplNlFile(char **& argv, Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
00031         Ipopt::SmartPtr<Ipopt::OptionsList> options,
00032         Ipopt::SmartPtr<Ipopt::Journalist> journalist,
00033         std::string* nl_file_content  = NULL);
00035 
00036     AmplInterface(const AmplInterface &other);
00038     virtual OsiSolverInterface * clone(bool CopyData = true);
00039 
00041     virtual ~AmplInterface();
00042 
00043 
00045     const AmplTMINLP * amplModel() const
00046     {
00047       return GetRawPtr(amplTminlp_);
00048     }
00050     virtual void setAppDefaultOptions(Ipopt::SmartPtr<Ipopt::OptionsList> Options);
00051 
00052   protected:
00054     void readNames() ;
00055 
00057     Ipopt::SmartPtr<Bonmin::AmplTMINLP> amplTminlp_;
00058 
00059   private:
00061     int writeAmplSolFile_;
00062   };
00063 }
00064 #endif