Cgl  trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CglOddHole.hpp
Go to the documentation of this file.
00001 // $Id$
00002 // Copyright (C) 2000, International Business Machines
00003 // Corporation and others.  All Rights Reserved.
00004 // This code is licensed under the terms of the Eclipse Public License (EPL).
00005 
00006 #ifndef CglOddHole_H
00007 #define CglOddHole_H
00008 
00009 #include <string>
00010 
00011 #include "CglCutGenerator.hpp"
00012 
00014 class CglOddHole : public CglCutGenerator {
00015    friend void CglOddHoleUnitTest(const OsiSolverInterface * siP,
00016                                   const std::string mpdDir );
00017  
00018 public:
00019     
00020   
00041   virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
00042                              const CglTreeInfo info = CglTreeInfo()) const;
00044 
00047 
00048 
00049 
00050   void createRowList( const OsiSolverInterface & si,
00051                       const int * possible=NULL);
00053   void createRowList(int numberRows, const int * whichRow);
00055 
00058 
00059 
00060   void createCliqueList(int numberCliques, const int * cliqueStart,
00061                      const int * cliqueMember);
00063 
00066 
00067   int numberPossible();
00069 
00071 
00072   double getMinimumViolation() const;
00073   void setMinimumViolation(double value);
00075   double getMinimumViolationPer() const;
00076   void setMinimumViolationPer(double value);
00078   int getMaximumEntries() const;
00079   void setMaximumEntries(int value);
00081 
00084 
00085   CglOddHole ();
00086  
00088   CglOddHole (
00089     const CglOddHole &);
00090 
00092   virtual CglCutGenerator * clone() const;
00093 
00095   CglOddHole &
00096     operator=(
00097     const CglOddHole& rhs);
00098   
00100   virtual
00101     ~CglOddHole ();
00102 
00104   virtual void refreshSolver(OsiSolverInterface * solver);
00106       
00107 private:
00108   
00109  // Private member methods
00110 
00111 
00114 
00115 
00116   void generateCuts(const OsiRowCutDebugger * debugger, 
00117                     const CoinPackedMatrix & rowCopy,
00118                     const double * solution, const double * dj,
00119                     OsiCuts & cs, const int * suitableRow,
00120                     const int * fixedColumn,const CglTreeInfo info,
00121                     bool packed);
00123 
00124   // Private member data
00125 
00128 
00129   int * suitableRows_;
00131   int * startClique_;
00133   int * member_;
00135   double epsilon_;  
00137   double onetol_;
00139   double minimumViolation_;
00141   double minimumViolationPer_;
00143   int maximumEntries_;
00145   int numberRows_;
00147   int numberCliques_;
00149 };
00150 
00151 //#############################################################################
00157 void CglOddHoleUnitTest(const OsiSolverInterface * siP,
00158                         const std::string mpdDir );
00159   
00160 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines