source: stable/0.1/Couenne/src/main/BonCouenneInterface.hpp @ 83

Last change on this file since 83 was 83, checked in by pbelotti, 11 years ago

outputting the right name

File size: 2.1 KB
Line 
1// (C) Copyright International Business Machines Corporation (IBM) 2006, 2007
2// All Rights Reserved.
3// This code is published under the Common Public License.
4//
5// Authors :
6// Pietro Belotti, Carnegie Mellon University
7// Pierre Bonami, International Business Machines Corporation
8//
9// Date : 12/19/2006
10
11#ifndef CouenneInterface_H
12#define CouenneInterface_H
13
14#include "CouenneCutGenerator.hpp"
15
16#ifdef COIN_HAS_ASL
17#include "BonAmplInterface.hpp"
18
19struct ASL;
20struct ASL *readASLfg (char **);
21#else
22#define AmplInterface OsiTMINLPInterface
23#endif
24
25namespace Bonmin {
26class CouenneInterface : public AmplInterface
27{
28  public:
29  /** Default constructor. */
30  CouenneInterface();
31
32  /** Copy constructor. */
33  CouenneInterface(const CouenneInterface &other);
34
35  /** virutal copy constructor. */
36  virtual CouenneInterface * clone(bool CopyData);
37
38  /** Destructor. */
39  virtual ~CouenneInterface();
40
41  // My name is Couenne [ku:en]
42  virtual std::string  appName() {return "couenne";}
43
44#ifdef COIN_HAS_ASL   
45  /** read ampl file using inputed options, journalist....*/
46  virtual void readAmplNlFile(char **& argv, Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
47                              Ipopt::SmartPtr<Ipopt::OptionsList> options,
48                              Ipopt::SmartPtr<Ipopt::Journalist> journalist);
49#endif
50  /** \name Overloaded methods to build outer approximations */
51  //@{
52  /** \brief Extract a linear relaxation of the MINLP.
53   * Solve the continuous relaxation and takes first-order
54   * outer-approximation constraints at the optimum.
55   * The put everything in an OsiSolverInterface.
56   */
57  virtual void extractLinearRelaxation
58  (OsiSolverInterface &si,  CouenneCutGenerator & couenneCg, bool getObj = 1, bool solveNlp = 1);
59
60 
61  /** To set some application specific defaults. */
62  virtual void setAppDefaultOptions(Ipopt::SmartPtr<Ipopt::OptionsList> Options);
63
64  /// return value of have_nlp_solution_
65  bool haveNlpSolution ()
66  {return have_nlp_solution_;}
67
68protected:
69
70  /// true if we got an integer feasible solution from initial solve
71  bool have_nlp_solution_;
72};
73
74} /** end Bonmin namespace. */
75#endif
Note: See TracBrowser for help on using the repository browser.