BonAmplInterface.hpp
Go to the documentation of this file.
1 // (C) Copyright International Business Machines Corporation and
2 // Carnegie Mellon University 2004, 2007
3 //
4 // All Rights Reserved.
5 // This code is published under the Eclipse Public License.
6 //
7 // Authors :
8 // Pierre Bonami, Carnegie Mellon University,
9 // Andreas Waechter, International Business Machines Corporation
10 //
11 // Date : 12/01/2004
12 
13 #ifndef BonminAmplInterface_H
14 #define BonminAmplInterface_H
16 #include "BonAmplTMINLP.hpp"
17 
18 class BM_lp;
19 namespace Bonmin
20 {
23  {
24  public:
27  AmplInterface();
30  virtual void readAmplNlFile(char **& argv, Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
33  std::string* nl_file_content = NULL);
35 
36  AmplInterface(const AmplInterface &other);
38  virtual OsiSolverInterface * clone(bool CopyData = true);
39 
41  virtual ~AmplInterface();
42 
43 
45  const AmplTMINLP * amplModel() const
46  {
47  return GetRawPtr(amplTminlp_);
48  }
51 
52  protected:
54  void readNames() ;
55 
58 
59  private:
62  };
63 }
64 #endif
virtual ~AmplInterface()
Destructor.
virtual OsiSolverInterface * clone(bool CopyData=true)
Clone.
const Ipopt::SmartPtr< Ipopt::OptionsList > options() const
Retrieve OsiTMINLPApplication option list.
This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so ...
void readNames()
Read variables and row names in .col and .row files.
Definition: BM.hpp:273
Class for providing an Osi interface to Ipopt with an ampl nl file as input.
virtual void readAmplNlFile(char **&argv, Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions, Ipopt::SmartPtr< Ipopt::OptionsList > options, Ipopt::SmartPtr< Ipopt::Journalist > journalist, std::string *nl_file_content=NULL)
U * GetRawPtr(const OSSmartPtr< U > &smart_ptr)
Definition: OSSmartPtr.hpp:452
AmplInterface()
Default constructor.
Ipopt::SmartPtr< Bonmin::AmplTMINLP > amplTminlp_
TMINLP problem (the original problem usually an AmplTMINLP).
Ampl MINLP Interface.
const AmplTMINLP * amplModel() const
Fast access to AmplTMINLP.
virtual void setAppDefaultOptions(Ipopt::SmartPtr< Ipopt::OptionsList > Options)
To set some application specific defaults.
int writeAmplSolFile_
Write the ampl solution file or write a bonmin one?