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

- File List
- File Members

# /home/coin/SVN-release/Blis-0.91.0/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;
    00029   int options;
    00031   bool inTree;
    00041   OsiRowCut ** strengthenRow;
    00043   CoinThreadRandom * randomNumberGenerator;
    00045   CglTreeInfo ();
    00046
    00048   CglTreeInfo (
    00049     const CglTreeInfo &);
    00051   virtual CglTreeInfo * clone() const;
    00052
    00054   CglTreeInfo &
    00055     operator=(
    00056     const CglTreeInfo& rhs);
    00057
    00059   virtual
    00060     ~CglTreeInfo ();
    00062   virtual void fixes(int variable, int toValue, int fixedVariable,bool fixedToLower) {}
    00065   virtual int initializeFixing(const OsiSolverInterface * model) {return 0;}
    00066
    00067 };
    00068
    00070 typedef struct {
    00071   unsigned int oneFixed:1; //  nonzero if variable fixed to 1
    00072   unsigned int sequence:31; //  variable (in matrix)
    00073 } fixEntry;
    00074
    00075 class CglTreeProbingInfo : public CglTreeInfo {
    00076 public:
    00078   CglTreeProbingInfo ();
    00080   CglTreeProbingInfo (const OsiSolverInterface * model);
    00081
    00083   CglTreeProbingInfo (
    00084     const CglTreeProbingInfo &);
    00086   virtual CglTreeInfo * clone() const;
    00087
    00089   CglTreeProbingInfo &
    00090     operator=(
    00091     const CglTreeProbingInfo& rhs);
    00092
    00094   virtual
    00095     ~CglTreeProbingInfo ();
    00096   OsiSolverInterface * analyze(const OsiSolverInterface & si, int createSolver=0);
    00098   virtual void fixes(int variable, int toValue, int fixedVariable,bool fixedToLower);
    00101   virtual int initializeFixing(const OsiSolverInterface * model) ;
    00103   int fixColumns(OsiSolverInterface & si) const;
    00105   int fixColumns(int iColumn, int value, OsiSolverInterface & si) const;
    00107   int packDown();
    00109   void generateCuts(const OsiSolverInterface & si, OsiCuts & cs,
    00110                     const CglTreeInfo info) const;
    00112   inline fixEntry * fixEntries() const
    00113   { convert(); return fixEntry_;}
    00115   inline int * toZero() const
    00116   { convert(); return toZero_;}
    00118   inline int * toOne() const
    00119   { convert(); return toOne_;}
    00121   inline int * integerVariable() const
    00122   { return integerVariable_;}
    00124   inline int * backward() const
    00125   { return backward_;}
    00127   inline int numberVariables() const
    00128   { return numberVariables_;}
    00130   inline int numberIntegers() const
    00131   { return numberIntegers_;}
    00132 private:
    00134   void convert() const;
    00135 protected:
    00137   mutable fixEntry * fixEntry_;
    00139   mutable int * toZero_;
    00141   mutable int * toOne_;
    00143   int * integerVariable_;
    00145   int * backward_;
    00147   mutable int * fixingEntry_;
    00149   int numberVariables_;
    00151   int numberIntegers_;
    00153   int maximumEntries_;
    00155   mutable int numberEntries_;
    00156 };
    00157
    00158 #endif