- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# /home/coin/SVN-release/Cgl-0.53.1/Cgl/src/CglTreeInfo.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2000, International Business Machines
    00002 // Corporation and others.  All Rights Reserved.
    00003
    00004 #ifndef CglTreeInfo_H
    00005 #define CglTreeInfo_H
    00006
    00007 #include "OsiCuts.hpp"
    00008 #include "OsiSolverInterface.hpp"
    00009 #include "CoinHelperFunctions.hpp"
    00010 class CglStored;
    00013 class CglTreeInfo {
    00014 public:
    00016   int level;
    00019   int pass;
    00022   int formulation_rows;
    00024   bool inTree;
    00034   OsiRowCut ** strengthenRow;
    00036   CoinThreadRandom * randomNumberGenerator;
    00038   CglTreeInfo ();
    00039
    00041   CglTreeInfo (
    00042     const CglTreeInfo &);
    00044   virtual CglTreeInfo * clone() const;
    00045
    00047   CglTreeInfo &
    00048     operator=(
    00049     const CglTreeInfo& rhs);
    00050
    00052   virtual
    00053     ~CglTreeInfo ();
    00055   virtual void fixes(int variable, int toValue, int fixedVariable,bool fixedToLower) {}
    00058   virtual int initializeFixing(const OsiSolverInterface * model) {return 0;}
    00059
    00060 };
    00061
    00063 typedef struct {
    00064   unsigned int oneFixed:1; //  nonzero if variable fixed to 1
    00065   unsigned int sequence:31; //  variable (in matrix)
    00066 } fixEntry;
    00067
    00068 class CglTreeProbingInfo : public CglTreeInfo {
    00069 public:
    00071   CglTreeProbingInfo ();
    00073   CglTreeProbingInfo (const OsiSolverInterface * model);
    00074
    00076   CglTreeProbingInfo (
    00077     const CglTreeProbingInfo &);
    00079   virtual CglTreeInfo * clone() const;
    00080
    00082   CglTreeProbingInfo &
    00083     operator=(
    00084     const CglTreeProbingInfo& rhs);
    00085
    00087   virtual
    00088     ~CglTreeProbingInfo ();
    00089   OsiSolverInterface * analyze(const OsiSolverInterface & si, int createSolver=0);
    00091   virtual void fixes(int variable, int toValue, int fixedVariable,bool fixedToLower);
    00094   virtual int initializeFixing(const OsiSolverInterface * model) ;
    00096   int fixColumns(OsiSolverInterface & si) const;
    00098   int packDown();
    00100   void generateCuts(const OsiSolverInterface & si, OsiCuts & cs,
    00101                     const CglTreeInfo info) const;
    00103   inline fixEntry * fixEntries() const
    00104   { convert(); return fixEntry_;}
    00106   inline int * toZero() const
    00107   { convert(); return toZero_;}
    00109   inline int * toOne() const
    00110   { convert(); return toOne_;}
    00112   inline int * integerVariable() const
    00113   { return integerVariable_;}
    00115   inline int * backward() const
    00116   { return backward_;}
    00118   inline int numberVariables() const
    00119   { return numberVariables_;}
    00121   inline int numberIntegers() const
    00122   { return numberIntegers_;}
    00123 private:
    00125   void convert() const;
    00126 protected:
    00128   mutable fixEntry * fixEntry_;
    00130   mutable int * toZero_;
    00132   mutable int * toOne_;
    00134   int * integerVariable_;
    00136   int * backward_;
    00138   mutable int * fixingEntry_;
    00140   int numberVariables_;
    00142   int numberIntegers_;
    00144   int maximumEntries_;
    00146   mutable int numberEntries_;
    00147 };
    00148
    00149 #endif