Couenne  0.5.8
BonCouenneSetup.hpp
Go to the documentation of this file.
1 /* $Id: BonCouenneSetup.hpp 804 2012-01-30 23:40:42Z pbelotti $ */
2 // (C) Copyright International Business Machines Corporation 2007
3 // All Rights Reserved.
4 // This code is published under the Eclipse Public License (EPL).
5 //
6 // Authors :
7 // Pierre Bonami, International Business Machines Corporation
8 //
9 // Date : 04/18/2007
10 
11 #ifndef BonCouenneSetup_H
12 #define BonCouenneSetup_H
13 
14 #include "BonBabSetupBase.hpp"
15 #include "BonBonminSetup.hpp"
16 #include "CbcFeasibilityBase.hpp"
17 
18 #include "CouenneTNLP.hpp"
19 
20 struct ASL;
21 
22 namespace Bonmin{
23  class Bab;
24 }
25 
26 namespace Couenne {
27 
28  class CouenneInterface;
29  class CouenneCutGenerator;
30  class CouenneProblem;
31  class CouenneTNLP;
32 
34  public:
35  ASL * asl;
38  asl(NULL)
39  {}
40  virtual ~SmartAsl();
41  };
42 
44  public:
47  BonminSetup(),
48  aslfg_(NULL),
49  CouennePtr_ (NULL),
50  displayStats_ (false),
51  couenneProb_ (NULL),
52  couenneProb_is_own_(true) {}
53 
55  CouenneSetup(const CouenneSetup& other):
56  BonminSetup(other),
57  aslfg_(NULL),
58  displayStats_ (other.displayStats_),
59  couenneProb_ (other.couenneProb_) {}
60 
62  virtual Bonmin::BabSetupBase * clone () const
63  {return new CouenneSetup (*this);}
64 
66  virtual ~CouenneSetup();
67 
69  bool InitializeCouenne(char ** argv = NULL,
70  CouenneProblem *couenneProb = NULL,
71  Ipopt::SmartPtr<Bonmin::TMINLP> tminlp = NULL,
72  CouenneInterface *ci = NULL,
73  Bonmin::Bab *bb = NULL);
74 
76  virtual void registerOptions();
79 
81  virtual void readOptionsFile(){
82  if (readOptions_) return;
84  }
85 
88  {return CouennePtr_;}
89 
91  bool displayStats ()
92  {return displayStats_;}
93 
96 
98  inline void setDoubleParameter (const DoubleParameter &p, const double val)
99  {doubleParam_ [p] = val;}
100 
102  inline double getDoubleParameter (const DoubleParameter &p) const
103  {return doubleParam_ [p];}
104 
106  {nodeComparisonMethod_ = c;}
107 
108 private:
110 
115  CouenneCutGenerator *CouennePtr_;
116 
118  bool displayStats_;
119 
121  CouenneProblem *couenneProb_;
122 
124  bool couenneProb_is_own_;
125  };
126 }
127 
128 #endif
virtual void readOptionsFile()
NodeComparison nodeComparisonMethod_
Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions()
double doubleParam_[NumberDoubleParam]
BonminSetup(const CoinMessageHandler *handler=NULL)
Cut Generator for linear convexifications.
Class for MINLP problems with symbolic information.
virtual void readOptionsFile()
Get the basic options if don't already have them.
bool InitializeCouenne(char **argv=NULL, CouenneProblem *couenneProb=NULL, Ipopt::SmartPtr< Bonmin::TMINLP > tminlp=NULL, CouenneInterface *ci=NULL, Bonmin::Bab *bb=NULL)
Initialize from command line arguments.
bool displayStats()
true if one wants to display statistics at the end of program
virtual void registerOptions()
register the options
void setNodeComparisonMethod(Bonmin::BabSetupBase::NodeComparison c)
double getDoubleParameter(const DoubleParameter &p) const
modify parameter (used for MaxTime)
CouenneCutGenerator * couennePtr() const
return pointer to cut generator (used to get pointer to problem)
CouenneSetup(const CouenneSetup &other)
Copy constructor.
void setDoubleParameter(const DoubleParameter &p, const double val)
modify parameter (used for MaxTime)
virtual Bonmin::BabSetupBase * clone() const
virtual copy constructor.
CouenneSetup()
Default constructor.
void addMilpCutGenerators()
add cut generators
virtual ~CouenneSetup()
destructor
static void registerAllOptions(Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
Register all Couenne options.
virtual ~SmartAsl()
general include file for different compilers