coin-Cgl
/tmp/buildd/coinor-cgl-0.55.0/Cgl/src/CglCutGenerator.hpp
Go to the documentation of this file.
00001 // Copyright (C) 2000, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 #ifndef CglCutGenerator_H
00004 #define CglCutGenerator_H
00005 
00006 #include "OsiCuts.hpp"
00007 #include "OsiSolverInterface.hpp"
00008 #include "CglTreeInfo.hpp"
00009 
00010 //-------------------------------------------------------------------
00011 //
00012 // Abstract base class for generating cuts.
00013 //
00014 //-------------------------------------------------------------------
00016 
00021 class CglCutGenerator  {
00022   
00023 public:
00024     
00031   virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
00032                              const CglTreeInfo info = CglTreeInfo()) const=0; 
00034 
00035     
00038 
00039   CglCutGenerator (); 
00040  
00042   CglCutGenerator ( const CglCutGenerator &);
00043 
00045   virtual CglCutGenerator * clone() const = 0;
00046 
00048   CglCutGenerator & operator=(const CglCutGenerator& rhs);
00049 
00051   virtual ~CglCutGenerator ();
00052 
00063   virtual std::string generateCpp( FILE * ) {return "";}
00064 
00066   virtual void refreshSolver(OsiSolverInterface * ) {}
00068   
00075   inline int getAggressiveness() const
00076   { return aggressive_;}
00077 
00082   inline void setAggressiveness(int value)
00083   { aggressive_=value;}
00084 
00092   virtual bool mayGenerateRowCutsInTree() const;
00094   virtual bool needsOptimalBasis() const;
00096   virtual int maximumLengthOfCutInTree() const
00097   { return COIN_INT_MAX;}
00099   
00100   // test this class
00101   //static void unitTest();
00102   
00103 // private:
00104   
00109   int aggressive_;
00110 };
00111 
00112 #endif