00001
00002
00003 #ifndef CglOddHole_H
00004 #define CglOddHole_H
00005
00006 #include <string>
00007
00008 #include "CglCutGenerator.hpp"
00009
00011 class CglOddHole : public CglCutGenerator {
00012 friend void CglOddHoleUnitTest(const OsiSolverInterface * siP,
00013 const std::string mpdDir );
00014
00015 public:
00016
00017
00038 virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs) const;
00040
00043
00044
00045
00046 void createRowList( const OsiSolverInterface & si,
00047 const int * possible=NULL);
00049 void createRowList(int numberRows, const int * whichRow);
00051
00054
00055
00056 void createCliqueList(int numberCliques, const int * cliqueStart,
00057 const int * cliqueMember);
00059
00062
00063 int numberPossible();
00065
00067
00068 double getMinimumViolation() const;
00069 void setMinimumViolation(double value);
00071 double getMinimumViolationPer() const;
00072 void setMinimumViolationPer(double value);
00074 int getMaximumEntries() const;
00075 void setMaximumEntries(int value);
00077
00080
00081 CglOddHole ();
00082
00084 CglOddHole (
00085 const CglOddHole &);
00086
00088 CglOddHole &
00089 operator=(
00090 const CglOddHole& rhs);
00091
00093 virtual
00094 ~CglOddHole ();
00095
00097 virtual void refreshSolver(OsiSolverInterface * solver);
00099
00100 private:
00101
00102
00103
00104
00107
00108
00109 void generateCuts(const OsiRowCutDebugger * debugger,
00110 const CoinPackedMatrix & rowCopy,
00111 const double * solution, const double * dj,
00112 OsiCuts & cs, const int * suitableRow,
00113 const int * fixedColumn,
00114 bool packed);
00116
00117
00118
00121
00122 int * suitableRows_;
00124 int * startClique_;
00126 int * member_;
00128 double epsilon_;
00130 double onetol_;
00132 double minimumViolation_;
00134 double minimumViolationPer_;
00136 int maximumEntries_;
00138 int numberRows_;
00140 int numberCliques_;
00142 };
00143
00144
00150 void CglOddHoleUnitTest(const OsiSolverInterface * siP,
00151 const std::string mpdDir );
00152
00153 #endif