Bonmin
1.7
|
00001 // (C) Copyright International Business Machines 2006 00002 // All Rights Reserved. 00003 // This code is published under the Common Public License. 00004 // 00005 // Authors : 00006 // P. Bonami, Carnegie Mellon University 00007 // 00008 // Date : 12/26/2006 00009 00010 00011 #ifndef BonOaFeasibilityChecker_HPP 00012 #define BonOaFeasibilityChecker_HPP 00013 #include "BonOaDecBase.hpp" 00014 00015 namespace Bonmin 00016 { 00018 class OaFeasibilityChecker : public OaDecompositionBase 00019 { 00020 public: 00022 OaFeasibilityChecker(BabSetupBase &b); 00024 OaFeasibilityChecker(const OaFeasibilityChecker ©) 00025 : 00026 OaDecompositionBase(copy), 00027 pol_(copy.pol_), 00028 type_(copy.type_), 00029 cut_count_(copy.cut_count_), 00030 maximum_oa_cuts_(copy.maximum_oa_cuts_) 00031 {} 00033 ~OaFeasibilityChecker(); 00034 00036 static void registerOptions(Ipopt::SmartPtr<Bonmin::RegisteredOptions> roptions); 00037 00038 virtual CglCutGenerator * clone() const 00039 { 00040 return new OaFeasibilityChecker(*this); 00041 } 00042 protected: 00044 virtual double performOa(OsiCuts & cs, solverManip &lpManip, 00045 BabInfo * babInfo, double &cutoff, const CglTreeInfo & info) const; 00047 virtual bool doLocalSearch(BabInfo * babInfo) const 00048 { 00049 return 0; 00050 } 00051 00053 enum CutsPolicies { 00054 DetectCycles = 0, 00055 KeepAll, 00056 TreatAsNormal}; 00058 CutsPolicies pol_; 00059 00061 enum CutsTypes { 00062 OA = 0, 00063 Benders}; 00065 CutsTypes type_; 00066 00068 mutable unsigned int cut_count_; 00070 unsigned int maximum_oa_cuts_; 00071 }; 00072 } 00073 #endif