- Main Page
- Namespaces
- Classes
- Files
- Directories

- Search for |

- File List
- File Members

# 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()) const=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;}
    00086
    00094   virtual bool mayGenerateRowCutsInTree() const;
    00096   virtual bool needsOptimalBasis() const;
    00098   virtual int maximumLengthOfCutInTree() const
    00099   { return COIN_INT_MAX;}
    00101
    00102   // test this class
    00103   //static void unitTest();
    00104
    00105 // private:
    00106
    00111   int aggressive_;
    00112 };
    00113
    00114 #endif