coin-Cgl
CglCutGenerator.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 #ifndef CglCutGenerator_H
4 #define CglCutGenerator_H
5 
6 #include "OsiCuts.hpp"
7 #include "OsiSolverInterface.hpp"
8 #include "CglTreeInfo.hpp"
9 
10 //-------------------------------------------------------------------
11 //
12 // Abstract base class for generating cuts.
13 //
14 //-------------------------------------------------------------------
16 
22 
23 public:
24 
31  virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
32  const CglTreeInfo info = CglTreeInfo()) const=0;
34 
35 
38  CglCutGenerator ();
40 
43 
45  virtual CglCutGenerator * clone() const = 0;
46 
49 
51  virtual ~CglCutGenerator ();
52 
63  virtual std::string generateCpp( FILE * ) {return "";}
64 
66  virtual void refreshSolver(OsiSolverInterface * ) {}
68 
75  inline int getAggressiveness() const
76  { return aggressive_;}
77 
82  inline void setAggressiveness(int value)
83  { aggressive_=value;}
84 
92  virtual bool mayGenerateRowCutsInTree() const;
94  virtual bool needsOptimalBasis() const;
96  virtual int maximumLengthOfCutInTree() const
97  { return COIN_INT_MAX;}
99 
100  // test this class
101  //static void unitTest();
102 
103 // private:
104 
110 };
111 
112 #endif