00001 /*===========================================================================* 00002 * This file is part of the Abstract Library for Parallel Search (ALPS). * 00003 * * 00004 * ALPS is distributed under the Common Public License as part of the * 00005 * COIN-OR repository (http://www.coin-or.org). * 00006 * * 00007 * Authors: * 00008 * * 00009 * Yan Xu, Lehigh University * 00010 * Ted Ralphs, Lehigh University * 00011 * * 00012 * Conceptual Design: * 00013 * * 00014 * Yan Xu, Lehigh University * 00015 * Ted Ralphs, Lehigh University * 00016 * Laszlo Ladanyi, IBM T.J. Watson Research Center * 00017 * Matthew Saltzman, Clemson University * 00018 * * 00019 * * 00020 * Copyright (C) 2001-2007, Lehigh University, Yan Xu, and Ted Ralphs. * 00021 *===========================================================================*/ 00022 00023 //############################################################################# 00024 // This file is modified from SbbCutGenerator.hpp 00025 //############################################################################# 00026 00027 #ifndef AbcCutGenerator_h_ 00028 #define AbcCutGenerator_h_ 00029 00030 #include "OsiSolverInterface.hpp" 00031 #include "OsiCuts.hpp" 00032 00033 class AbcModel; 00034 class OsiRowCut; 00035 class OsiRowCutDebugger; 00036 class CglCutGenerator; 00037 00038 //############################################################################# 00039 00069 class AbcCutGenerator { 00070 00071 public: 00072 00089 bool generateCuts( OsiCuts &cs, bool fullScan); 00091 00092 00095 00096 AbcCutGenerator (); 00097 00099 AbcCutGenerator(AbcModel * model,CglCutGenerator * generator, 00100 int howOften=1, const char * name=NULL, 00101 bool normal=true, bool atSolution=false, 00102 bool infeasible=false); 00103 00105 AbcCutGenerator (const AbcCutGenerator &); 00106 00108 AbcCutGenerator & operator=(const AbcCutGenerator& rhs); 00109 00111 ~AbcCutGenerator (); 00113 00121 void refreshModel(AbcModel * model); 00122 00124 inline const char * cutGeneratorName() const 00125 { 00126 return generatorName_; 00127 } 00128 00143 void setHowOften(int value) ; 00144 00146 inline int howOften() const 00147 { return whenCutGenerator_; } 00148 00150 inline bool normal() const 00151 { return normal_; } 00153 inline void setNormal(bool value) 00154 { normal_=value; } 00156 inline bool atSolution() const 00157 { return atSolution_; } 00159 inline void setAtSolution(bool value) 00160 { atSolution_=value; } 00164 inline bool whenInfeasible() const 00165 { return whenInfeasible_; } 00169 inline void setWhenInfeasible(bool value) 00170 { whenInfeasible_=value; } 00172 inline CglCutGenerator * generator() const 00173 { return generator_; } 00175 00176 private: 00178 AbcModel *model_; 00179 00180 // The CglCutGenerator object 00181 CglCutGenerator * generator_; 00182 00186 int whenCutGenerator_; 00187 00189 char * generatorName_; 00190 00192 bool normal_; 00193 00195 bool atSolution_; 00196 00198 bool whenInfeasible_; 00199 }; 00200 00201 #endif