Bonmin  1.8.8
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,
31  Ipopt::SmartPtr<Ipopt::OptionsList> options,
32  Ipopt::SmartPtr<Ipopt::Journalist> journalist,
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  }
50  virtual void setAppDefaultOptions(Ipopt::SmartPtr<Ipopt::OptionsList> Options);
51 
52  protected:
54  void readNames() ;
55 
57  Ipopt::SmartPtr<Bonmin::AmplTMINLP> amplTminlp_;
58 
59  private:
62  };
63 }
64 #endif
virtual ~AmplInterface()
Destructor.
virtual void setAppDefaultOptions(Ipopt::SmartPtr< Ipopt::OptionsList > Options)
To set some application specific defaults.
virtual OsiSolverInterface * clone(bool CopyData=true)
Clone.
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.
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)
AmplInterface()
Default constructor.
Ipopt::SmartPtr< Bonmin::AmplTMINLP > amplTminlp_
TMINLP problem (the original problem usually an AmplTMINLP).
const Ipopt::SmartPtr< Ipopt::OptionsList > options() const
Retrieve OsiTMINLPApplication option list.
Ampl MINLP Interface.
const AmplTMINLP * amplModel() const
Fast access to AmplTMINLP.
int writeAmplSolFile_
Write the ampl solution file or write a bonmin one?