Go to the documentation of this file.00001
00002 #ifndef CbcBranchDecision_H
00003 #define CbcBranchDecision_H
00004
00005 #include "CbcBranchBase.hpp"
00006
00019 class CbcModel;
00020 class OsiChooseVariable;
00021
00022 class CbcBranchDecision {
00023 public:
00025 CbcBranchDecision ();
00026
00027
00028 CbcBranchDecision ( const CbcBranchDecision &);
00029
00031 virtual ~CbcBranchDecision();
00032
00034 virtual CbcBranchDecision * clone() const = 0;
00035
00037 virtual void initialize(CbcModel * model) = 0;
00038
00048 virtual int
00049 betterBranch (CbcBranchingObject * thisOne,
00050 CbcBranchingObject * bestSoFar,
00051 double changeUp, int numberInfeasibilitiesUp,
00052 double changeDown, int numberInfeasibilitiesDown) = 0 ;
00053
00060 virtual int
00061 bestBranch (CbcBranchingObject ** objects, int numberObjects, int numberUnsatisfied,
00062 double * changeUp, int * numberInfeasibilitiesUp,
00063 double * changeDown, int * numberInfeasibilitiesDown,
00064 double objectiveValue) ;
00065
00068 virtual int whichMethod() {
00069 return 2;
00070 }
00071
00074 virtual void saveBranchingObject(OsiBranchingObject * ) {}
00077 virtual void updateInformation(OsiSolverInterface * ,
00078 const CbcNode * ) {}
00080 virtual void setBestCriterion(double ) {}
00081 virtual double getBestCriterion() const {
00082 return 0.0;
00083 }
00085 virtual void generateCpp( FILE * ) {}
00087 inline CbcModel * cbcModel() const {
00088 return model_;
00089 }
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101 OsiChooseVariable * chooseMethod() const {
00102 return chooseMethod_;
00103 }
00105 void setChooseMethod(const OsiChooseVariable & method);
00106
00107 protected:
00108
00109
00110 CbcBranchingObject * object_;
00112 CbcModel * model_;
00113
00114
00115
00116 OsiChooseVariable * chooseMethod_;
00117 private:
00119 CbcBranchDecision & operator=(const CbcBranchDecision& rhs);
00120
00121 };
00122 #endif
00123