Cbc
trunk
|
00001 // $Id$ 00002 // Copyright (C) 2004, 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 // Edwin 11/13/2009-- carved out of CbcBranchCut 00007 00008 #ifndef CbcBranchToFixLots_H 00009 #define CbcBranchToFixLots_H 00010 00011 #include "CbcBranchCut.hpp" 00012 #include "CbcBranchBase.hpp" 00013 #include "OsiRowCut.hpp" 00014 #include "CoinPackedMatrix.hpp" 00015 00023 class CbcBranchToFixLots : public CbcBranchCut { 00024 00025 public: 00026 00027 // Default Constructor 00028 CbcBranchToFixLots (); 00029 00036 CbcBranchToFixLots (CbcModel * model, double djTolerance, 00037 double fractionFixed, int depth, 00038 int numberClean = 0, 00039 const char * mark = NULL, 00040 bool alwaysCreate = false); 00041 00042 // Copy constructor 00043 CbcBranchToFixLots ( const CbcBranchToFixLots &); 00044 00046 virtual CbcObject * clone() const; 00047 00048 // Assignment operator 00049 CbcBranchToFixLots & operator=( const CbcBranchToFixLots& rhs); 00050 00051 // Destructor 00052 ~CbcBranchToFixLots (); 00053 00058 int shallWe() const; 00059 00061 virtual double infeasibility(const OsiBranchingInformation * info, 00062 int &preferredWay) const; 00065 virtual bool canDoHeuristics() const { 00066 return true; 00067 } 00068 00070 virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ; 00072 virtual void redoSequenceEtc(CbcModel * model, int numberColumns, const int * originalColumns); 00073 00074 00075 protected: 00077 00079 double djTolerance_; 00081 double fractionFixed_; 00083 char * mark_; 00085 CoinPackedMatrix matrixByRow_; 00087 int depth_; 00089 int numberClean_; 00091 bool alwaysCreate_; 00092 }; 00093 #endif 00094