00001
00002
00003
00004
00005
00006
00007
00008 #ifndef CbcBranchDecision_H
00009 #define CbcBranchDecision_H
00010
00011 #include "CbcBranchBase.hpp"
00012
00025 class CbcModel;
00026 class OsiChooseVariable;
00027
00028 class CbcBranchDecision {
00029 public:
00031 CbcBranchDecision ();
00032
00033
00034 CbcBranchDecision ( const CbcBranchDecision &);
00035
00037 virtual ~CbcBranchDecision();
00038
00040 virtual CbcBranchDecision * clone() const = 0;
00041
00043 virtual void initialize(CbcModel * model) = 0;
00044
00054 virtual int
00055 betterBranch (CbcBranchingObject * thisOne,
00056 CbcBranchingObject * bestSoFar,
00057 double changeUp, int numberInfeasibilitiesUp,
00058 double changeDown, int numberInfeasibilitiesDown) = 0 ;
00059
00066 virtual int
00067 bestBranch (CbcBranchingObject ** objects, int numberObjects, int numberUnsatisfied,
00068 double * changeUp, int * numberInfeasibilitiesUp,
00069 double * changeDown, int * numberInfeasibilitiesDown,
00070 double objectiveValue) ;
00071
00074 virtual int whichMethod() {
00075 return 2;
00076 }
00077
00080 virtual void saveBranchingObject(OsiBranchingObject * ) {}
00083 virtual void updateInformation(OsiSolverInterface * ,
00084 const CbcNode * ) {}
00086 virtual void setBestCriterion(double ) {}
00087 virtual double getBestCriterion() const {
00088 return 0.0;
00089 }
00091 virtual void generateCpp( FILE * ) {}
00093 inline CbcModel * cbcModel() const {
00094 return model_;
00095 }
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107 OsiChooseVariable * chooseMethod() const {
00108 return chooseMethod_;
00109 }
00111 void setChooseMethod(const OsiChooseVariable & method);
00112
00113 protected:
00114
00115
00116 CbcBranchingObject * object_;
00118 CbcModel * model_;
00119
00120
00121
00122 OsiChooseVariable * chooseMethod_;
00123 private:
00125 CbcBranchDecision & operator=(const CbcBranchDecision& rhs);
00126
00127 };
00128 #endif
00129