# CglCutGenerator.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2000, International Business Machines
    00002 // Corporation and others.  All Rights Reserved.
    00003 // This code is licensed under the terms of the Eclipse Public License (EPL).
    00004
    00005 #ifndef CglCutGenerator_H
    00006 #define CglCutGenerator_H
    00007
    00008 #include "OsiCuts.hpp"
    00009 #include "OsiSolverInterface.hpp"
    00010 #include "CglTreeInfo.hpp"
    00011
    00012 //-------------------------------------------------------------------
    00013 //
    00014 // Abstract base class for generating cuts.
    00015 //
    00016 //-------------------------------------------------------------------
    00018
    00023 class CglCutGenerator  {
    00024
    00025 public:
    00026
    00033   virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
    00034                              const CglTreeInfo info = CglTreeInfo())=0;
    00036
    00037
    00040
    00041   CglCutGenerator ();
    00042
    00044   CglCutGenerator ( const CglCutGenerator &);
    00045
    00047   virtual CglCutGenerator * clone() const = 0;
    00048
    00050   CglCutGenerator & operator=(const CglCutGenerator& rhs);
    00051
    00053   virtual ~CglCutGenerator ();
    00054
    00065   virtual std::string generateCpp( FILE * ) {return "";}
    00066
    00068   virtual void refreshSolver(OsiSolverInterface * ) {}
    00070
    00077   inline int getAggressiveness() const
    00078   { return aggressive_;}
    00079
    00084   inline void setAggressiveness(int value)
    00085   { aggressive_=value;}
    00087   inline void setGlobalCuts(bool trueOrFalse)
    00088   { canDoGlobalCuts_ = trueOrFalse;}
    00090   inline bool canDoGlobalCuts() const
    00091   {return canDoGlobalCuts_;}
    00099   virtual bool mayGenerateRowCutsInTree() const;
    00101   virtual bool needsOptimalBasis() const;
    00103   virtual int maximumLengthOfCutInTree() const
    00104   { return COIN_INT_MAX;}
    00106
    00107   // test this class
    00108   //static void unitTest();
    00109
    00110 // private:
    00111
    00116   int aggressive_;
    00118   bool canDoGlobalCuts_;
    00119 };
    00120
    00121 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines