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

Last change on this file since 77 was 77, checked in by stefan, 11 years ago

merge changeset 70 from trunk into stable: compile Couenne library without ASL

File size: 2.0 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#ifdef COIN_HAS_ASL   
42  /** read ampl file using inputed options, journalist....*/
43  virtual void readAmplNlFile(char **& argv, Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions,
44                              Ipopt::SmartPtr<Ipopt::OptionsList> options,
45                              Ipopt::SmartPtr<Ipopt::Journalist> journalist);
46#endif
47  /** \name Overloaded methods to build outer approximations */
48  //@{
49  /** \brief Extract a linear relaxation of the MINLP.
50   * Solve the continuous relaxation and takes first-order
51   * outer-approximation constraints at the optimum.
52   * The put everything in an OsiSolverInterface.
53   */
54  virtual void extractLinearRelaxation
55  (OsiSolverInterface &si,  CouenneCutGenerator & couenneCg, bool getObj = 1, bool solveNlp = 1);
56
57 
58  /** To set some application specific defaults. */
59  virtual void setAppDefaultOptions(Ipopt::SmartPtr<Ipopt::OptionsList> Options);
60
61  /// return value of have_nlp_solution_
62  bool haveNlpSolution ()
63  {return have_nlp_solution_;}
64
65protected:
66
67  /// true if we got an integer feasible solution from initial solve
68  bool have_nlp_solution_;
69};
70
71} /** end Bonmin namespace. */
72#endif
Note: See TracBrowser for help on using the repository browser.