00001 // Copyright (C) 2003, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef SbbCutGenerator_H 00004 #define SbbCutGenerator_H 00005 00006 #include "OsiSolverInterface.hpp" 00007 #include "OsiCuts.hpp" 00008 00009 class SbbModel; 00010 class OsiRowCut; 00011 class OsiRowCutDebugger; 00012 class CglCutGenerator; 00013 00014 //############################################################################# 00015 00045 class SbbCutGenerator { 00046 00047 public: 00048 00064 bool generateCuts( OsiCuts &cs, bool fullScan); 00066 00067 00070 00071 SbbCutGenerator (); 00072 00074 SbbCutGenerator(SbbModel * model,CglCutGenerator * generator, 00075 int howOften=1, const char * name=NULL, 00076 bool normal=true, bool atSolution=false, 00077 bool infeasible=false); 00078 00080 SbbCutGenerator (const SbbCutGenerator &); 00081 00083 SbbCutGenerator & operator=(const SbbCutGenerator& rhs); 00084 00086 ~SbbCutGenerator (); 00088 00096 void refreshModel(SbbModel * model); 00097 00099 inline const char * cutGeneratorName() const 00100 { return generatorName_;}; 00101 00116 void setHowOften(int value) ; 00117 00119 inline int howOften() const 00120 { return whenCutGenerator_;}; 00121 00123 inline bool normal() const 00124 { return normal_;}; 00126 inline void setNormal(bool value) 00127 { normal_=value;}; 00129 inline bool atSolution() const 00130 { return atSolution_;}; 00132 inline void setAtSolution(bool value) 00133 { atSolution_=value;}; 00137 inline bool whenInfeasible() const 00138 { return whenInfeasible_;}; 00142 inline void setWhenInfeasible(bool value) 00143 { whenInfeasible_=value;}; 00145 inline CglCutGenerator * generator() const 00146 { return generator_;}; 00148 00149 private: 00151 SbbModel *model_; 00152 00153 // The CglCutGenerator object 00154 CglCutGenerator * generator_; 00155 00159 int whenCutGenerator_; 00160 00162 char * generatorName_; 00163 00165 bool normal_; 00166 00168 bool atSolution_; 00169 00171 bool whenInfeasible_; 00172 00173 }; 00174 00175 #endif