00001 // Copyright (C) 2000, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef CglLiftAndProject_H 00004 #define CglLiftAndProject_H 00005 00006 #include <string> 00007 00008 #include "CglCutGenerator.hpp" 00009 00011 class CglLiftAndProject : public CglCutGenerator { 00012 friend void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP, 00013 const std::string mpdDir ); 00014 00015 public: 00022 virtual void generateCuts(const OsiSolverInterface & si, OsiCuts & cs, 00023 const CglTreeInfo info = CglTreeInfo()) const; 00024 00028 double getBeta() const { 00029 return beta_; 00030 } 00031 00035 void setBeta(int oneOrMinusOne){ 00036 if (oneOrMinusOne==1 || oneOrMinusOne==-1){ 00037 beta_= (double)oneOrMinusOne; 00038 } 00039 else { 00040 throw CoinError("Unallowable value. Beta must be 1 or -1", 00041 "cutGeneration","CglLiftAndProject"); 00042 } 00043 } 00044 00046 00049 00050 CglLiftAndProject (); 00051 00053 CglLiftAndProject ( 00054 const CglLiftAndProject &); 00055 00057 virtual CglCutGenerator * clone() const; 00058 00060 CglLiftAndProject & 00061 operator=( 00062 const CglLiftAndProject& rhs); 00063 00065 virtual 00066 ~CglLiftAndProject (); 00068 virtual std::string generateCpp( FILE * fp); 00070 00071 private: 00072 00073 // Private member methods 00074 00077 00079 00080 // Private member data 00081 00084 00085 double beta_; 00087 double epsilon_; 00089 double onetol_; 00091 }; 00092 00093 //############################################################################# 00099 void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP, 00100 const std::string mpdDir ); 00101 00102 #endif