00001
00002
00003
00004
00005
00006
00007
00008 #ifndef CbcFollowOn_H
00009 #define CbcFollowOn_H
00010
00011 #include "CbcBranchBase.hpp"
00012 #include "CoinPackedMatrix.hpp"
00013
00023 class CbcFollowOn : public CbcObject {
00024
00025 public:
00026
00027
00028 CbcFollowOn ();
00029
00032 CbcFollowOn (CbcModel * model);
00033
00034
00035 CbcFollowOn ( const CbcFollowOn &);
00036
00038 virtual CbcObject * clone() const;
00039
00040
00041 CbcFollowOn & operator=( const CbcFollowOn& rhs);
00042
00043
00044 ~CbcFollowOn ();
00045
00047 virtual double infeasibility(const OsiBranchingInformation * info,
00048 int &preferredWay) const;
00049
00050 using CbcObject::feasibleRegion ;
00052 virtual void feasibleRegion();
00053
00055 virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ;
00057 virtual int gutsOfFollowOn(int & otherRow, int & preferredWay) const;
00058
00059 protected:
00062 CoinPackedMatrix matrix_;
00064 CoinPackedMatrix matrixByRow_;
00066 int * rhs_;
00067 };
00068
00072 class CbcFixingBranchingObject : public CbcBranchingObject {
00073
00074 public:
00075
00076
00077 CbcFixingBranchingObject ();
00078
00079
00080 CbcFixingBranchingObject (CbcModel * model,
00081 int way,
00082 int numberOnDownSide, const int * down,
00083 int numberOnUpSide, const int * up);
00084
00085
00086 CbcFixingBranchingObject ( const CbcFixingBranchingObject &);
00087
00088
00089 CbcFixingBranchingObject & operator=( const CbcFixingBranchingObject& rhs);
00090
00092 virtual CbcBranchingObject * clone() const;
00093
00094
00095 virtual ~CbcFixingBranchingObject ();
00096
00097 using CbcBranchingObject::branch ;
00099 virtual double branch();
00100
00101 #ifdef JJF_ZERO
00102
00106 virtual void previousBranch();
00107 #endif
00108
00109 using CbcBranchingObject::print ;
00112 virtual void print();
00113
00115 virtual CbcBranchObjType type() const {
00116 return FollowOnBranchObj;
00117 }
00118
00126 virtual int compareOriginalObject(const CbcBranchingObject* brObj) const;
00127
00136 virtual CbcRangeCompare compareBranchingObject
00137 (const CbcBranchingObject* brObj, const bool replaceIfOverlap = false);
00138
00139 private:
00142 int numberDown_;
00144 int numberUp_;
00146 int * downList_;
00148 int * upList_;
00149 };
00150
00151 #endif
00152