source: branches/devel/Bonmin/src/BonminAmplInterface/BonAmplInterface.hpp @ 62

Last change on this file since 62 was 62, checked in by pbonami, 13 years ago

astyled the devel branch

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 1.3 KB
Line 
1#ifndef BonminAmplInterface_H
2#define BonminAmplInterface_H
3#include "BonIpoptInterface.hpp"
4#include "BonAmplTMINLP.hpp"
5
6namespace Bonmin
7{
8  /** Class for providing an Osi interface to Ipopt with an ampl nl file as input. */
9  class AmplInterface: public IpoptInterface
10  {
11  public:
12    /** Default constructor */
13    AmplInterface();
14    /** Constructor with inputed ampl command line (reads model from nl file)*/
15    AmplInterface(char **& amplArgs);
16    /** Copy constructor */
17    AmplInterface(const AmplInterface &other);
18    /// Clone
19    virtual AmplInterface * clone(bool CopyData = true);
20
21    ///Destructor
22    virtual ~AmplInterface();
23
24    /**@name Methods to input a problem */
25    //@{
26    /** Read an ampl . nl file from the given filename */
27    virtual void readAmplNlFile(char**& filename,
28        std::string* ipopt_file_content =NULL,
29        std::string* nl_file_content = NULL);
30    /** write ampl solution file */
31    void writeAmplSolFile(std::string message,const double * primalSol = NULL,const double * dualSol = NULL);
32    //@}
33
34    /** Fast access to AmplTMINLP */
35    const AmplTMINLP * amplModel() const
36    {
37      return GetRawPtr(amplTminlp_);
38    }
39
40  protected:
41    /** TMINLP problem (the original problem usually an AmplTMINLP).*/
42    Ipopt::SmartPtr<Bonmin::AmplTMINLP> amplTminlp_;
43  };
44}
45#endif
Note: See TracBrowser for help on using the repository browser.